/* KORVION v3.4.1 — HUD sin textos encimados (las posiciones las ajusta js/v341/hud_v341.js) */
#hint, #areaname, #banner, #held-name, #ctx-prompt, #ctx-prompt2, #v33-qs, #toasts, #quest-track, #pet-hud, #boss-bar, #v34hull { box-sizing: border-box; }
#banner, #areaname { width: max-content; }
#banner h2, #banner p, #areaname h3, #areaname small { overflow-wrap: anywhere; }
#held-name { white-space: normal; text-align: center; }
#v33-qs:active { transform: scale(.96) !important; }
#toasts .toast { overflow-wrap: anywhere; }

/* Vida del barco: compacta, debajo de la barra de objetos */
#v34hull { top: auto; bottom: calc(3px + var(--sb, 0px)); padding: 1px 8px; font-size: 10px; line-height: 1.35; border-radius: 7px; z-index: 9; }
#v34hull b { width: 70px; height: 6px; margin: 0 6px; }

/* Pantallas bajitas (móvil en horizontal): todo un poco más pequeño */
body.v341-short #hint { font-size: 11px; padding: 4px 10px; }
body.v341-short #banner h2 { font-size: 20px; }
body.v341-short #banner p { font-size: 11.5px; margin-top: 2px; }
body.v341-short #areaname h3 { font-size: 16px; letter-spacing: 1.5px; }
body.v341-short #areaname small { font-size: 10px; }
body.v341-short #held-name { font-size: 11px; }
body.v341-short #ctx-prompt, body.v341-short #ctx-prompt2 { font-size: 11px; }
body.v341-short #v33-qs { font-size: 11px; padding: 4px 10px; }
body.v341-short .toast { font-size: 10.5px; padding: 3px 8px; }
body.v341-short #toasts { gap: 2px; }
body.v341-short #quest-track { font-size: 9.5px; }
body.v341-short #boss-bar .nm { font-size: 11px; }
body.v341-short #pet-hud img { width: 26px; height: 26px; }
body.v341-short #pet-hud small { font-size: 9.5px; }
body.v341-short #v34hull { font-size: 9.5px; }

/* Si un texto no cabe en su hueco, se encoge un poco más */
#hint.v341-sm { font-size: 10px; padding: 3px 8px; }
#banner.v341-sm h2 { font-size: 16px; }
#banner.v341-sm p { font-size: 10px; }
#areaname.v341-sm h3 { font-size: 13px; letter-spacing: 1px; }
#areaname.v341-sm small { font-size: 9px; }
#held-name.v341-sm, #ctx-prompt.v341-sm, #ctx-prompt2.v341-sm, #v33-qs.v341-sm { font-size: 10px; }
#toasts.v341-sm .toast { font-size: 9.5px; padding: 2px 7px; }
#quest-track.v341-sm { font-size: 9px; }
#boss-bar.v341-sm .nm { font-size: 10px; }

/* Botones pequeños compactos cuando chocarían con MAGIA / ACCIÓN (pantallas muy pequeñas) */
#small-btns.v341-tight { gap: 4px; }
#small-btns.v341-tight .sb { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
#small-btns.v341-tight .sb small { font-size: 7px; bottom: -9px; }
#small-btns.v341-wrap { flex-wrap: wrap; justify-content: flex-end; width: 104px; row-gap: 12px; }

/* Sin hueco libre: se oculta un momento en vez de quedar encima de otro texto */
.v341-off { visibility: hidden !important; }

/* Pantallas MUY pequeñas (≤ 340 px de alto o ≤ 600 px de ancho): todo más pequeño */
body.v341-tiny #hud-tl { width: 132px; }
body.v341-tiny .bar { height: 9px; margin-bottom: 2px; }
body.v341-tiny .bar b { font-size: 7.5px; top: -1px; }
body.v341-tiny #lvl { font-size: 9px !important; padding: 0 4px !important; }
body.v341-tiny #surv { font-size: 9.5px; gap: 3px; }
body.v341-tiny #stat-icons span { font-size: 8px; padding: 0 3px; }
body.v341-tiny #run-ind { font-size: 8.5px; padding: 0 5px; }
body.v341-tiny #clock { font-size: 9.5px; padding: 1px 7px; }
body.v341-tiny #gold { font-size: 10px; padding: 0 6px; }
body.v341-tiny .hbtn { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
body.v341-tiny #minimap { width: 60px; height: 60px; }
body.v341-tiny #topbtns { gap: 3px; }
body.v341-tiny .sb { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
body.v341-tiny .sb small { font-size: 7px; bottom: -9px; }
body.v341-tiny .tb span { font-size: 15px; }
body.v341-tiny .tb small { font-size: 7px; }
body.v341-tiny #hint { font-size: 10px; padding: 3px 8px; }
body.v341-tiny #banner h2 { font-size: 17px; }
body.v341-tiny #banner p { font-size: 10px; }
body.v341-tiny #areaname h3 { font-size: 13px; letter-spacing: 1px; }
body.v341-tiny #areaname small { font-size: 9px; }
body.v341-tiny #held-name, body.v341-tiny #ctx-prompt, body.v341-tiny #ctx-prompt2, body.v341-tiny #v33-qs { font-size: 10px; }
body.v341-tiny .toast { font-size: 9.5px; padding: 2px 7px; }
body.v341-tiny #quest-track { font-size: 8.5px; }
body.v341-tiny #boss-bar .nm { font-size: 9.5px; }
body.v341-tiny #boss-bar .bar { height: 7px; }
body.v341-tiny #pet-hud img { width: 22px; height: 22px; }
body.v341-tiny #pet-hud small { font-size: 8.5px; }
body.v341-tiny #pet-hud .bar { width: 64px; height: 6px; }
body.v341-tiny #v34hull { font-size: 8.5px; padding: 0 6px; }
body.v341-tiny #v34hull b { width: 54px; height: 5px; }
