/* pbPT system menu (system-ui.js). Everything is drawn with the game's own art,
   decoded into system-assets/: ExitMenu planks and chains for the menu, the
   Help box (box1-9), title bar, leather buttons and scroll bar for the windows,
   and the MessageBox CutBox for the confirmation. */
#pb-system { --pbs-gold:#ffd623; --pbs-head:#f0c419; --pbs-text:#e9e4d2; --pbs-dim:#9f9a86; --pbs-bronze:#a88a52; color:var(--pbs-text); font:12px/1.45 Tahoma,Verdana,sans-serif; }
#pb-system * { box-sizing:border-box; }
#pb-system [hidden] { display:none!important; }
#pb-system,#pb-system * { cursor:url('login-assets/game-cursor.png') 0 0,auto; }
.pbs-window { position:fixed; z-index:130; isolation:isolate; text-shadow:0 1px 1px #000; }
#pb-system button { margin:0; font:inherit; color:var(--pbs-gold); }
#pb-system :focus-visible { outline:1px dotted var(--pbs-gold); outline-offset:2px; }

/* Menu: rises from the System button of the game's bottom bar (system-ui.js
   places it from the button position the game sends), like the legacy menu.
   Planks and chains are ExitMenu.tga / Option.bmp with the baked text removed;
   sizes are game pixels times --pbs-s, the HUD scale. */
#pbs-menu { right:max(16px,env(safe-area-inset-right)); bottom:96px; width:calc(134px * var(--pbs-s,1)); display:flex; flex-direction:column; filter:drop-shadow(0 3px 4px #000a); transform-origin:100% 100%; animation:pbs-rise .14s ease-out; }
#pbs-menu.pbs-anchored { right:auto; bottom:auto; }
#pbs-menu h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
#pbs-menu button { height:calc(21px * var(--pbs-s,1)); padding:0; border-style:solid; border-width:calc(4px * var(--pbs-s,1)) calc(12px * var(--pbs-s,1)) calc(4px * var(--pbs-s,1)) calc(11px * var(--pbs-s,1)); border-image:url('system-assets/plank.png') 4 12 4 11 fill repeat; background:none; color:var(--pbs-gold); font:bold calc(13px * var(--pbs-s,1))/1 Georgia,'Times New Roman',serif; letter-spacing:.06em; text-shadow:1px 1px 0 #2b1600,-1px 0 0 #4a2a00,0 -1px 0 #4a2a00; white-space:nowrap; }
#pbs-menu button:not(:disabled):hover,#pbs-menu button:not(:disabled):focus-visible { filter:brightness(1.35); color:#ffe789; text-shadow:1px 1px 0 #1b0e00; outline:none; }
.pbs-chain { display:block; height:calc(10px * var(--pbs-s,1)); border-style:solid; border-width:0 calc(10px * var(--pbs-s,1)); border-image:url('system-assets/chain.png') 0 10 fill repeat; }
@keyframes pbs-rise { from { opacity:0; transform:translateY(10px) scaleY(.94); } to { opacity:1; transform:none; } }

/* Settings and Help: the Help box frame (box1-9). Its bottom 32px are the
   leather strip that holds the buttons, like the game's own windows. */
.pbs-large { left:50%; top:50%; transform:translate(-50%,-50%); width:min(440px,calc(100vw - 24px)); height:min(500px,calc(100dvh - 24px)); display:flex; flex-direction:column; padding:30px 18px 50px; }
#pbs-help { width:min(420px,calc(100vw - 24px)); }
/* The box is translucent in the game; a dark layer under it keeps text readable
   over bright scenes. */
.pbs-large::after { content:''; position:absolute; inset:6px 6px 10px; z-index:-2; background:#040a07b3; }
.pbs-large::before { content:''; position:absolute; inset:0; z-index:-1; border-style:solid; border-width:32px 64px 64px; border-image:url('system-assets/native/frame.png') 32 64 64 fill repeat; opacity:.97; }
.pbs-large header h2 { position:absolute; left:50%; top:-12px; transform:translateX(-50%); width:190px; max-width:calc(100% - 60px); height:28px; margin:0; border-style:solid; border-width:4px 34px; border-image:url('system-assets/native/title.png') 4 34 fill repeat; display:grid; place-items:center; color:var(--pbs-gold); font:bold 13px/1 Georgia,serif; letter-spacing:.08em; text-shadow:1px 1px 0 #1b0e00,-1px 0 0 #000; white-space:nowrap; }
.pbs-x { position:absolute; right:8px; top:6px; width:23px; height:23px; padding:0; border-style:solid; border-width:3px 6px; border-image:url('system-assets/native/plate.png') 3 6 fill repeat; background:none; font:bold 13px/1 Georgia,serif!important; }

/* Leather buttons (box-test-title2.bmp) for tabs, actions and dialogs. */
#pb-system .pbs-plate,.pbs-tabs button,.pbs-x { background:none; }
#pb-system .pbs-plate,.pbs-tabs button { min-width:74px; height:23px; padding:0 8px; border-style:solid; border-width:3px 6px; border-image:url('system-assets/native/plate.png') 3 6 fill repeat; color:var(--pbs-gold); font:bold 12px/1 Georgia,serif; text-shadow:1px 1px 0 #1b0e00; white-space:nowrap; }
#pb-system .pbs-plate.pbs-primary { filter:brightness(1.15); }
.pbs-tabs { display:flex; gap:6px; margin:6px 0 10px; }
.pbs-tabs button[aria-selected=false] { filter:brightness(.82) saturate(.85); color:#d9c38a; }
.pbs-tabs button[aria-selected=true] { filter:brightness(1.18); }
/* State rules follow selected/primary styling and include the system host, so
   an inactive tab or a primary action cannot override the hover highlight. */
#pb-system .pbs-plate:not(:disabled):hover,
#pb-system .pbs-tabs button:not(:disabled):hover,
#pb-system .pbs-x:not(:disabled):hover,
#pb-system .pbs-plate:not(:disabled):focus-visible,
#pb-system .pbs-tabs button:not(:disabled):focus-visible,
#pb-system .pbs-x:not(:disabled):focus-visible { filter:brightness(1.35) drop-shadow(0 0 2px #ffd62355); color:#ffe789; text-shadow:1px 1px 0 #1b0e00; }
#pb-system .pbs-plate:not(:disabled):focus-visible,
#pb-system .pbs-tabs button:not(:disabled):focus-visible,
#pb-system .pbs-x:not(:disabled):focus-visible { outline:1px dotted #ffd623; outline-offset:-4px; }
#pb-system .pbs-plate:not(:disabled):active,
#pb-system .pbs-tabs button:not(:disabled):active,
#pb-system .pbs-x:not(:disabled):active { filter:brightness(1.48); color:#ffe789; }
#pb-system .pbs-plate:disabled,
#pb-system .pbs-tabs button:disabled,
#pb-system .pbs-x:disabled,
#pbs-menu button:disabled { filter:grayscale(.8) brightness(.7); color:#b8ae93; cursor:default; box-shadow:none; animation:none; outline:none; }

/* Body: scrolls with the game's scroll bar (scl_bar / scl_icon). */
.pbs-body { flex:1; min-height:0; overflow:auto; padding-right:10px; }
.pbs-body::-webkit-scrollbar { width:16px; }
.pbs-body::-webkit-scrollbar-track { box-sizing:border-box; border:solid transparent; border-width:2px 4px 8px; border-image:url('system-assets/native/scroll-bar.png') 2 0 8 fill repeat; border-image-outset:0 0 6px; background:none; }
.pbs-body::-webkit-scrollbar-thumb { min-height:16px; background:url('system-assets/native/scroll-thumb.png') center/16px 16px no-repeat; }
#pb-system fieldset { margin:0 0 6px; padding:0; border:0; }
#pb-system legend { display:block; width:100%; margin:6px 0 4px; padding:0 0 3px; background:linear-gradient(#a88a52,#a88a52) left bottom/100% 2px no-repeat; color:var(--pbs-head); font-weight:bold; }
.pbs-tip { margin:0 0 4px; color:var(--pbs-dim); font-size:11px; }
.pbs-row + .pbs-tip { margin-left:20px; }

/* Checkbox: bronze square with a gold check. */
.pbs-row { display:flex; align-items:center; gap:8px; min-height:22px; }
.pbs-row input { position:absolute; opacity:0; pointer-events:none; }
.pbs-switch { flex:none; width:12px; height:12px; border:1px solid var(--pbs-bronze); background:#0b120d; box-shadow:inset 0 0 0 1px #000; display:grid; place-items:center; color:var(--pbs-gold); font:bold 11px/1 Tahoma,sans-serif; }
.pbs-row input:checked + .pbs-switch::after { content:'✓'; }
.pbs-row input:focus-visible + .pbs-switch { outline:1px dotted var(--pbs-gold); outline-offset:2px; }

/* Slider: horizontal scl_bar with the scl_icon diamond as the handle.
   The source is 256px long but only its first 250px contain the rail. Keep
   the two native end caps and tile the continuous center. The six-pixel
   outset holds only the transparent tail; no painted pixel leaves the box. */
.pbs-range,.pbs-select { display:grid; grid-template-columns:120px 1fr 38px; align-items:center; gap:8px; min-height:24px; }
.pbs-select { grid-template-columns:auto 1fr; }
.pbs-range input { min-width:0; width:100%; height:16px; margin:0; padding:0; border:0; background:none; -webkit-appearance:none; appearance:none; }
.pbs-range input::-webkit-slider-runnable-track { box-sizing:border-box; height:8px; border:solid transparent; border-width:0 8px 0 2px; border-image:url('system-assets/native/scroll-bar-h.png') 0 8 0 2 fill repeat; border-image-outset:0 6px 0 0; background:none; }
.pbs-range input::-webkit-slider-thumb { -webkit-appearance:none; width:16px; height:16px; margin-top:-4px; border:0; background:url('system-assets/native/scroll-thumb.png') center/16px no-repeat; }
.pbs-range input::-moz-range-track { box-sizing:border-box; height:8px; border:solid transparent; border-width:0 8px 0 2px; border-image:url('system-assets/native/scroll-bar-h.png') 0 8 0 2 fill repeat; border-image-outset:0 6px 0 0; background:none; }
.pbs-range input::-moz-range-progress { border:0; height:8px; background:transparent; }
.pbs-range input::-moz-range-thumb { width:16px; height:16px; border:0; border-radius:0; background:url('system-assets/native/scroll-thumb.png') center/16px no-repeat; }
.pbs-range input:not(:disabled):hover::-webkit-slider-thumb,
.pbs-range input:not(:disabled):focus-visible::-webkit-slider-thumb { filter:brightness(1.3); }
.pbs-range input:not(:disabled):hover::-moz-range-thumb,
.pbs-range input:not(:disabled):focus-visible::-moz-range-thumb { filter:brightness(1.3); }
.pbs-range input:disabled { filter:grayscale(.8) brightness(.7); cursor:default; }
.pbs-range output { color:#c9c2a8; text-align:right; }
.pbs-select select,.pbs-search input { width:100%; height:20px; padding:0 6px; border:1px solid var(--pbs-bronze); border-radius:0; background:#0b120d; color:var(--pbs-text); font:11px Tahoma,sans-serif; }
.pbs-select select { max-width:170px; }
.pbs-search { margin:4px 0 6px; }
#pbs-fullscreen { margin:2px 0 4px; }

/* Footer on the leather strip. */
.pbs-large footer { position:absolute; left:18px; right:18px; bottom:23px; transform:translateY(50%); display:flex; align-items:center; justify-content:flex-end; gap:8px; }
#pbs-status { flex:1; color:#b9e39a; font-size:11px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#pbs-reset { margin-right:auto; }

/* Six tabs in Settings */
#pbs-settings { width:min(520px,calc(100vw - 24px)); }
#pbs-settings .pbs-tabs button { flex:1; min-width:0; padding:0 4px; }

/* Account forms and status lines */
.pbs-field { display:grid; grid-template-columns:150px 1fr; align-items:center; gap:8px; min-height:26px; margin:0 0 4px; }
.pbs-field input { width:100%; height:20px; padding:0 6px; border:1px solid var(--pbs-bronze); border-radius:0; background:#0b120d; color:var(--pbs-text); font:12px Tahoma,sans-serif; }
#pb-system form .pbs-plate,#pbs-unstuck,#pbs-loot-all { margin:4px 0; }
.pbs-message { min-height:16px; margin:2px 0 4px; color:#f0a88a; font-size:11px; }
.pbs-message.pbs-ok { color:#b9e39a; }

/* Low life: the screen edge pulses red (system-ui.js lowLife). */
.pb-low-life #pb-system::before { content:''; position:fixed; inset:0; z-index:125; pointer-events:none; box-shadow:inset 0 0 140px 50px rgba(215,0,0,.72); animation:pbs-pulse 1.1s ease-in-out infinite; }
@keyframes pbs-pulse { 50% { box-shadow:inset 0 0 100px 30px rgba(215,0,0,.42); } }

/* Keys page */
.pbs-keyrow { display:grid; grid-template-columns:1fr 104px; align-items:center; gap:8px; min-height:27px; }
#pb-system .pbs-keybtn { min-width:104px; font-family:Tahoma,sans-serif; }
#pb-system .pbs-capturing { animation:pbs-blink .9s steps(2) infinite; color:#fff; }
@keyframes pbs-blink { 50% { filter:brightness(1.6); } }

/* Help list */
#pbs-help-body dl { margin:0; }
.pbs-help-row { display:grid; grid-template-columns:120px 1fr; gap:8px; padding:2px 0; }
.pbs-help-row dt { color:var(--pbs-gold); font-weight:bold; }
.pbs-help-row dd { margin:0; }

/* Help > Wiki (system-wiki.js): list on the left, entry on the right. */
#pbs-help.pbs-wiki-open { width:min(800px,calc(100vw - 24px)); height:min(560px,calc(100dvh - 24px)); }
.pbs-wiki-tabs button { flex:1; min-width:0; padding:0 3px; font-size:11px!important; }
.pbs-wiki { flex:1; min-height:0; display:grid; grid-template-columns:250px 1fr; gap:12px; }
.pbs-wiki.pbs-wiki-wide { grid-template-columns:1fr; }
.pbs-wiki.pbs-wiki-wide .pbs-wiki-side { display:none; }
.pbs-wiki-side { min-height:0; display:flex; flex-direction:column; gap:6px; }
.pbs-wiki-chips { display:flex; flex-wrap:wrap; gap:4px; }
#pb-system .pbs-chip { min-width:0; height:21px; padding:0 6px; font-size:11px; }
#pb-system .pbs-chip[aria-pressed=false] { filter:brightness(.62) saturate(.7); color:#d9c38a; }
.pbs-wiki-list { flex:1; min-height:0; overflow:auto; border:1px solid #3d3322; background:#0000003a; }
.pbs-wiki-row { display:block; width:100%; padding:4px 8px; border:0; border-bottom:1px solid #ffffff0d; background:none; text-align:left; font:12px/1.35 Tahoma,sans-serif!important; color:var(--pbs-text)!important; }
.pbs-wiki-row b { display:block; color:var(--pbs-gold); font-weight:bold; }
.pbs-wiki-row span { color:var(--pbs-dim); font-size:11px; }
.pbs-wiki-row:hover,.pbs-wiki-row[aria-selected=true] { background:#5d452033; box-shadow:inset 2px 0 0 var(--pbs-gold); }
.pbs-wiki-detail { min-height:0; overflow:auto; padding:2px 8px 6px 2px; }
.pbs-wiki-detail h3 { margin:0; color:var(--pbs-gold); font:bold 15px Georgia,serif; text-shadow:1px 1px 0 #1b0e00; }
.pbs-wiki-detail h4 { margin:10px 0 4px; padding-bottom:3px; background:linear-gradient(#a88a52,#a88a52) left bottom/100% 2px no-repeat; color:var(--pbs-head); font-size:12px; }
.pbs-wiki-sub { margin:2px 0 8px; color:var(--pbs-dim); font-size:11px; }
.pbs-wiki-table { border-collapse:collapse; min-width:60%; }
.pbs-wiki-table th { width:170px; padding:1px 14px 1px 0; color:#c9c2a8; font-weight:normal; text-align:left; }
.pbs-wiki-table td { padding:1px 0; color:#fff; }
.pbs-wiki-links { display:flex; flex-wrap:wrap; gap:4px 6px; margin:0; }
.pbs-wiki-link { padding:1px 6px; border:1px solid #6e5530; background:#21190d; color:var(--pbs-gold)!important; font:11px Tahoma,sans-serif!important; }
.pbs-wiki-link:hover { border-color:#e4bd78; }
.pbs-wiki-map { display:block; max-width:100%; max-height:220px; margin:4px 0; border:1px solid #6e5530; }
.pbs-wiki-text { white-space:pre-line; }
.pbs-wiki-grid { width:100%; border-collapse:collapse; font-size:12px; }
.pbs-wiki-grid th,.pbs-wiki-grid td { padding:3px 6px; text-align:center; border-bottom:1px solid #ffffff0d; }
.pbs-wiki-grid tr:first-child th { color:var(--pbs-head); background:#0000004d; }
.pbs-wiki-grid tr th:first-child { color:var(--pbs-gold); }
.pbs-wiki-sheltoms td { padding-top:0; color:var(--pbs-dim); font-size:11px; text-align:left; }

/* Quit confirmation: the MessageBox CutBox (left, center, right). */
#pbs-quit { left:50%; top:50%; transform:translate(-50%,-50%); width:min(340px,calc(100vw - 24px)); padding:20px 26px 18px; text-align:center; }
#pbs-quit::before { content:''; position:absolute; inset:0 0 -22px; z-index:-1; border-style:solid; border-width:4px 4px 26px; border-image:url('system-assets/native/dialog.png') 4 4 26 repeat; pointer-events:none;}
#pbs-quit h2 { margin:0; color:var(--pbs-gold); font:bold 12px/1.4 Tahoma,sans-serif; }
#pbs-quit p { margin:0 0 10px; color:#fff; }
#pbs-quit footer { display:flex; gap:10px; justify-content:center; }

/* The HTML menu replaces the in-world language box: its setting is in Game. Only
   once the client polls the menu, so a client without it keeps the box. */
.pb-system-ready #pb-game-language { display:none!important; }

/* Touch (mobile.js .pt-touch): larger targets; the Touch help section only here. */
html:not(.pt-touch) .pbs-touch-only { display:none!important; }
.pt-touch #pb-system .pbs-plate,.pt-touch .pbs-tabs button,.pt-touch .pbs-x { height:34px; min-width:88px; font-size:14px; }
.pt-touch .pbs-x { width:34px; min-width:34px; right:6px; top:4px; }
.pt-touch .pbs-row { min-height:34px; gap:10px; font-size:13px; }
.pt-touch .pbs-switch { width:18px; height:18px; font-size:15px; }
.pt-touch .pbs-select select,.pt-touch .pbs-search input,.pt-touch .pbs-field input { height:30px; font-size:14px; }
.pt-touch .pbs-field { grid-template-columns:1fr; gap:2px; }
.pt-touch .pbs-range input { height:30px; }
.pt-touch .pbs-range input::-webkit-slider-thumb { width:24px; height:24px; margin-top:-8px; background-size:24px; }
.pt-touch .pbs-range input::-moz-range-thumb { width:24px; height:24px; background-size:24px; }
.pt-touch .pbs-large { padding-bottom:58px; }
.pt-touch .pbs-large footer { bottom:23px; }

@media (max-height:500px) {
  #pbs-menu:not(.pbs-anchored) { bottom:auto; top:50%; transform:translateY(-50%); }
  .pbs-tip { display:none; }
}
@media (max-width:600px) {
  .pbs-wiki { grid-template-columns:1fr; grid-template-rows:40% 1fr; }
}
@media (max-width:520px) {
  #pbs-settings .pbs-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  #pbs-settings .pbs-tabs button { width:100%; }
  .pbs-range { grid-template-columns:1fr 38px; }
  .pbs-range span { grid-column:1 / -1; }
  .pbs-help-row { grid-template-columns:1fr; gap:0; }
}

#pbs-quit::after{content:'';position:absolute;inset:4px;z-index:-2;background:#000900cc;pointer-events:none}
/* textos 07/11: as 8 abas da Ajuda nao cabem numa linha no computador ("Como jogar" cortava); duas linhas de 4, como no toque */
#pbs-help .pbs-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
#pbs-help .pbs-tabs button { min-width:0; }
/* ajuda-20261115: Ajuda ilustrada com os itens do jogo. Ícones DISCRETOS (dono): nunca maiores que no jogo (casa de 22 px; na aba
   Como jogar no máximo 22 px de altura, os de 2x2 casas ficam em 22 px), sem moldura, só com a sombra do jogo; o texto é o principal. Teclado e Mouse somem com o HUD de toque ligado. */
html.pth-on .pbs-pc-only { display:none!important; }
#pbs-help { width:min(460px,calc(100vw - 24px)); }
.pbs-help-row-ic dt { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.pbs-help-icons { display:flex; flex-wrap:wrap; align-items:flex-end; gap:2px; max-width:100%; }
.pbs-help-ic { display:block; flex:none; width:auto; height:auto; max-width:44px; max-height:22px; filter:drop-shadow(0 1px 1px #000); }
.pbs-help-ic.pbs-help-hud { width:24px; height:24px; object-fit:contain; image-rendering:auto; }
.pbs-help-names { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.pbs-help-row { grid-template-columns:136px 1fr; border-bottom:1px solid #ffffff0a; }
/* Wiki > Itens: ícone na lista (até 32 px, nunca ampliado) e na ficha (até 44x66, nunca ampliado, à direita do título) */
.pbs-wiki-row.pbs-wiki-row-ic { display:grid; grid-template-columns:36px minmax(0,1fr); column-gap:6px; align-items:center; }
.pbs-wiki-row-ic .pbs-wiki-ic-row { grid-row:1 / span 2; justify-self:center; width:auto; height:auto; max-width:32px; max-height:32px; filter:drop-shadow(0 1px 1px #000); }
.pbs-wiki-row-ic b,.pbs-wiki-row-ic span { grid-column:2; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.pbs-wiki-ic-big { float:right; width:auto; height:auto; max-width:44px; max-height:66px; margin:0 0 6px 10px; filter:drop-shadow(0 1px 1px #000); }
@media (max-width:520px) { .pbs-help-row { grid-template-columns:1fr; } .pbs-help-row-ic dt { flex-direction:row; align-items:center; flex-wrap:wrap; gap:4px 8px; } }
/* celular deitado (altura até 500 px): a Ajuda fica larga e as 8 abas numa linha só, para sobrar altura para o texto */
@media (max-height:500px) {
  #pbs-help { width:min(780px,calc(100vw - 24px)); }
  #pbs-help .pbs-tabs { grid-template-columns:repeat(8,minmax(0,1fr)); margin:4px 0 6px; }
  #pbs-help .pbs-tabs button { padding:0 2px; font-size:12px; }
  .pt-touch #pbs-help .pbs-search input { height:28px; }
  #pbs-help .pbs-wiki { grid-template-columns:290px 1fr; }
  .pt-touch #pb-system #pbs-help .pbs-chip { height:26px; min-width:0; padding:0 6px; font-size:11px; }
}
/* ajuda2-20261115 (dono: "toda a aba de ajuda bem explicada e ilustrada em todas as abas"): explicação para o iniciante em cada
   aba e ficha, ilustrações SÓ do jogo e PEQUENAS (rostos do guia de nível 56 px, ícones no tamanho do jogo, mapa guia em
   miniatura com as mesmas marcas do Mapa do jogo). A explicação NÃO usa .pbs-tip (o celular deitado esconde .pbs-tip). */
.pbs-wiki-explica { margin:0 0 5px; color:#bfb79e; font-size:11px; line-height:1.4; }
.pbs-wiki-explica b,.pbs-wiki-intro b { color:var(--pbs-gold); font-weight:bold; }
.pbs-wiki-intro p { margin:0 0 7px; line-height:1.45; }
.pbs-wiki-intro h3 { margin-bottom:2px; }
.pbs-wiki-pics { display:flex; flex-wrap:wrap; align-items:flex-end; gap:6px 8px; margin:6px 0 8px; }
.pbs-wiki-pics .pbs-wiki-explica { flex-basis:100%; margin:0; }
.pbs-wiki-pics .pbs-wiki-links { flex-basis:100%; }
.pbs-wiki-art { display:block; flex:none; width:56px; height:56px; object-fit:contain; filter:drop-shadow(0 1px 1px #000); }
.pbs-wiki-art-r { float:right; margin:0 0 6px 10px; }
.pbs-wiki-win { display:block; flex:none; width:160px; height:auto; border:1px solid #6e5530; }
.pbs-wiki-ic-intro { display:block; flex:none; width:auto; height:auto; max-width:44px; max-height:44px; filter:drop-shadow(0 1px 1px #000); }
/* tabela com a explicação de cada número embaixo do nome */
.pbs-wiki-qt th { width:64%; padding:2px 12px 3px 0; vertical-align:top; }
.pbs-wiki-qt th small { display:block; color:var(--pbs-dim); font-size:10.5px; line-height:1.25; }
.pbs-wiki-qt td { padding:2px 0 3px; vertical-align:top; white-space:nowrap; }
/* resistências em barras, na cor do elemento */
.pbs-wiki-res { display:grid; gap:3px; max-width:330px; margin:0 0 2px; }
.pbs-wiki-res div { display:grid; grid-template-columns:78px minmax(0,1fr) 40px; align-items:center; gap:6px; }
.pbs-wiki-res span { color:#c9c2a8; }
.pbs-wiki-res i { display:block; height:7px; border:1px solid #3d3322; background:#0b120d; }
.pbs-wiki-res i b { display:block; height:100%; background:#a88a52; }
.pbs-wiki-res em { font-style:normal; color:#fff; text-align:right; }
.pbs-res-fire i b { background:#d0542c; } .pbs-res-ice i b { background:#5fa8d8; } .pbs-res-lightning i b { background:#dcc84a; }
.pbs-res-poison i b { background:#6aa84f; } .pbs-res-organic i b { background:#9a7a46; } .pbs-res-magic i b { background:#9b6fd0; }
/* mapa guia em miniatura (as marcas seguem o Mapa do jogo: círculo vermelho = respawn, ponto = NPC, losango = chefe) */
.pbs-wiki-wheres { display:flex; flex-wrap:wrap; gap:8px 14px; margin:2px 0 4px; }
.pbs-wiki-where { display:flex; gap:8px; align-items:flex-start; min-width:0; }
.pbs-wiki-where p { margin:0; max-width:140px; color:var(--pbs-dim); font-size:11px; }
.pbs-wiki-where p b { color:var(--pbs-gold); }
.pbs-mini { position:relative; flex:none; width:150px; height:150px; overflow:hidden; border:1px solid #6e5530; background:#000; }
.pbs-mini-big { width:min(100%,300px); height:auto; aspect-ratio:1 / 1; margin:4px 0 2px; }
.pbs-mini-img { display:block; width:100%; height:100%; }
.pbs-mk { position:absolute; transform:translate(-50%,-50%); pointer-events:none; }
.pbs-mk-rp { border-radius:50%; background:radial-gradient(circle,#e8382acc,#d42e22a6 45%,#b8221a8c 64%,#7a120e00 72%); box-shadow:inset 0 0 0 1px #ff7a66cc; }
.pbs-mk-npc { width:6px; height:6px; border-radius:50%; background:#ffd623; border:1px solid #0b0905; box-shadow:0 0 2px #000; }
.pbs-mini-big .pbs-mk-npc { width:8px; height:8px; }
.pbs-mk-boss { width:9px; height:9px; background:#ff3b2f; border:1px solid #fff; transform:translate(-50%,-50%) rotate(45deg); }
/* ícones pequenos nas listas de links, nas Sheltoms e nas classes (nunca maiores que no jogo) */
.pbs-wiki-links-ic .pbs-wiki-link { display:inline-flex; align-items:center; gap:4px; }
.pbs-wiki-ic-link,.pbs-wiki-ic-sh { flex:none; width:auto; height:auto; max-width:22px; max-height:22px; vertical-align:middle; filter:drop-shadow(0 1px 1px #000); }
.pbs-wiki-ic-sh { margin-right:5px; }
.pbs-wiki-sh th { width:auto; }
.pbs-wiki-sheltoms span { display:inline-flex; align-items:center; gap:3px; margin:0 10px 2px 0; white-space:nowrap; }
.pbs-wiki-sheltoms .pbs-wiki-ic-sh { margin:0; max-height:16px; }
.pbs-wiki-classes { display:flex; flex-wrap:wrap; gap:3px 12px; margin:0; }
.pbs-wiki-classes span { display:inline-flex; align-items:center; gap:5px; }
.pbs-wiki-face { flex:none; width:23px; height:19px; border:1px solid #6e5530; }
.pbs-wiki-fala { margin:0; padding:4px 8px; border-left:2px solid #6e5530; background:#0000002e; }
/* "Como usar esta aba", primeira linha da lista */
.pbs-wiki-row.pbs-wiki-about { background:#5d452026; }
.pbs-wiki-row.pbs-wiki-about b::before { content:'?'; display:inline-grid; place-items:center; width:14px; height:14px; margin-right:6px; border:1px solid var(--pbs-gold); border-radius:50%; font-size:10px; line-height:1; vertical-align:1px; }
@media (max-width:600px) {
  .pbs-mini { width:118px; height:118px; }
  .pbs-mini-big { width:min(100%,260px); height:auto; }
  .pbs-wiki-art { width:48px; height:48px; }
  .pbs-wiki-win { width:132px; }
}
.pbs-help-ic.pbs-help-face { width:32px; height:32px; max-width:none; max-height:none; object-fit:contain; }
/* números explicados: grade de 2 colunas (1 no celular em pé); rótulo e valor na linha, explicação embaixo */
.pbs-wiki-qg { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:4px 14px; margin:0 0 2px; }
.pbs-wiki-qg div { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; padding:2px 0 3px; border-bottom:1px solid #ffffff0d; }
.pbs-wiki-qg span { color:#c9c2a8; }
.pbs-wiki-qg b { color:#fff; font-weight:bold; text-align:right; white-space:nowrap; }
.pbs-wiki-qg small { grid-column:1 / -1; color:var(--pbs-dim); font-size:10.5px; line-height:1.25; }
.pbs-wiki-top { float:right; margin:0 0 6px 10px; }
.pbs-wiki-top .pbs-mini { width:112px; height:112px; }
.pbs-mk-npc.pbs-mk-alvo { width:10px; height:10px; border:2px solid #fff; box-shadow:0 0 0 2px #000a, 0 0 8px #ffd623; }
.pbs-wiki-head { display:flow-root; margin-bottom:2px; }
.pbs-wiki-head .pbs-wiki-explica { margin-top:2px; }
.pbs-wiki-top .pbs-mini { width:100px; height:100px; }
.pbs-wiki-chip-ic { display:inline-flex; align-items:center; gap:4px; color:var(--pbs-text)!important; }
/* celular em pé: a Ajuda aberta numa aba da wiki usa a altura toda, para a lista não ficar com uma linha só */
@media (max-width:600px) {
  #pbs-help.pbs-wiki-open { height:calc(100dvh - 24px); }
  .pt-touch #pb-system #pbs-help .pbs-chip { height:26px; min-width:0; padding:0 6px; font-size:11px; }
}
/* celular em pé: a tabela do Aging (6 colunas) com letra e espaço menores */
@media (max-width:600px) { .pbs-wiki-grid { font-size:11px; } .pbs-wiki-grid th,.pbs-wiki-grid td { padding:3px 2px; } }
/* ajuda2 v2: retratos dos monstros (recorte sem fundo, tirado no jogo), fotos dos NPCs e dos lugares, pequenos */
.pbs-wiki-ret { display:block; flex:none; object-fit:contain; filter:drop-shadow(0 1px 2px #000); }
.pbs-wiki-row-ic .pbs-wiki-ret.pbs-wiki-ic-row { width:32px; height:32px; max-width:none; max-height:none; }
.pbs-wiki-ret-big { float:left; width:64px; height:64px; margin:0 10px 4px 0; border:1px solid #6e5530; background:radial-gradient(circle at 50% 60%,#2c2416,#0b0d09 72%); }
.pbs-wiki-ret-intro { width:56px; height:56px; border:1px solid #6e5530; background:radial-gradient(circle at 50% 60%,#2c2416,#0b0d09 72%); }
.pbs-wiki-foto { display:block; width:min(100%,360px); height:auto; margin:4px 0 6px; border:1px solid #6e5530; }
/* ajuda2 v2: aba Habilidades (ícones das folhas que a Auto-caça já usa: hud-assets/skills-<classe>.webp, 49x46 por ícone) */
#pbs-help .pbs-tabs { grid-template-columns:repeat(5,minmax(0,1fr)); }
@media (max-height:500px) { #pbs-help .pbs-tabs { grid-template-columns:repeat(9,minmax(0,1fr)); } #pbs-help .pbs-tabs button { font-size:11px; } }
.pbs-sk-ic { display:block; flex:none; width:32px; height:30px; background-repeat:no-repeat; border:1px solid #6e5530; box-shadow:0 1px 2px #000; }
.pbs-wiki-row-ic .pbs-sk-ic.pbs-wiki-ic-row { grid-row:1 / span 2; justify-self:center; }
.pbs-sk-ic-big { float:left; width:49px; height:46px; margin:0 10px 4px 0; }
.pbs-sk-ic-intro { width:32px; height:30px; }
#pb-system .pbs-wiki-chips .pbs-chip .pbs-wiki-face { width:18px; height:15px; margin-right:4px; vertical-align:-3px; border:0; }
#pb-system .pbs-wiki-chips .pbs-chip { display:inline-flex; align-items:center; }
.pbs-sk-tab { max-width:100%; overflow-x:auto; }
.pbs-sk-grid th,.pbs-sk-grid td { white-space:nowrap; padding:2px 6px; }
.pbs-sk-grid tr:first-child th { white-space:normal; font-size:11px; vertical-align:bottom; }
.pbs-wiki-row-ic .pbs-sk-ic.pbs-wiki-ic-row { width:32px; height:30px; max-width:none; max-height:none; }
.pbs-wiki-chips-sk { flex-wrap:nowrap; gap:3px; }
#pb-system .pbs-wiki-chips-sk .pbs-chip { flex:1 1 0; min-width:0; padding:0 2px; justify-content:center; }
#pb-system .pbs-wiki-chips-sk .pbs-chip .pbs-wiki-face { width:22px; height:18px; margin:0; }
.pbs-sk-ic-intro + .pbs-sk-ic-intro { margin-left:0; }
#pb-system .pbs-wiki-chips-sk .pbs-chip[data-filter=all] { flex:none; padding:0 6px; }
