/* RD-20 společný rámec (32_shell.js): HUD v záhlaví, levá lišta kategorií, katalog „Více“, hráči a chat.
   Reference: output/redesign/queue/RD-20/navigation-more.png a output/redesign/full/locations-a/ashford.png. */
.icon-sh-hero { --icon: url('../assets/ui/foundation/person-badge.svg'); }
.icon-sh-hammer { --icon: url('../assets/ui/foundation/sh-hammer.svg'); }
.icon-sh-people { --icon: url('../assets/ui/foundation/sh-people.svg'); }
.icon-sh-cart { --icon: url('../assets/ui/foundation/cart.svg'); }
.icon-sh-dots { --icon: url('../assets/ui/foundation/sh-dots.svg'); }
.icon-sh-swords { --icon: url('../assets/ui/foundation/sh-swords.svg'); }
.icon-sh-map { --icon: url('../assets/ui/foundation/sh-map.svg'); }
.icon-sh-gift { --icon: url('../assets/ui/foundation/gift.svg'); }
.icon-sh-bag { --icon: url('../assets/ui/foundation/sh-bag.svg'); }
.icon-sh-bolt { --icon: url('../assets/ui/foundation/lightning-fill.svg'); }
.icon-sh-sun { --icon: url('../assets/ui/foundation/sun-fill.svg'); }
.icon-sh-trophy { --icon: url('../assets/ui/foundation/trophy.svg'); }
.icon-sh-journal { --icon: url('../assets/ui/foundation/journal-text.svg'); }
.icon-sh-gear { --icon: url('../assets/ui/foundation/gear-fill.svg'); }
.icon-sh-gavel { --icon: url('../assets/ui/foundation/sh-gavel.svg'); }
.icon-sh-gem { --icon: url('../assets/ui/foundation/sh-gem.svg'); }
.icon-sh-coins { --icon: url('../assets/ui/foundation/sh-coins.svg'); }
.icon-sh-chat { --icon: url('../assets/ui/foundation/chat-dots.svg'); }

/* ---------------------------------------------------------------- záhlaví */
#scr-game .topbar { flex-wrap: nowrap; align-items: center; gap: 14px; }
#scr-game .shell-hud { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 0 10px; position: relative; min-width: 0;
  padding: 2px 10px 2px 2px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.shell-hud:hover .shell-hud-art, .shell-hud[aria-expanded="true"] .shell-hud-art { border-color: #fff0bc; box-shadow: 0 0 10px #e7bf7566; }
.shell-hud-art { grid-row: 1 / span 2; width: 54px; height: 54px; border: 2px solid var(--gold); border-radius: 50%; overflow: hidden; background: #101c28; }
.shell-hud-art.px { image-rendering: pixelated; object-fit: cover; }
.shell-hud-lvl { position: absolute; left: 0; bottom: 0; min-width: 22px; height: 22px; padding: 0 4px; border: 1px solid var(--gold); border-radius: 11px;
  background: #0b1620; color: #ffe4a8; font: 12px/20px var(--font); text-align: center; }
.shell-hud-copy { display: grid; grid-template-columns: auto auto; gap: 0 8px; align-items: center; min-width: 0; }
.shell-hud-copy > b, .shell-hud-copy > small { grid-column: 1 / -1; }
.shell-hud-copy b { color: #ffe4a8; font: 600 15px/1.2 var(--display-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.shell-hud-copy small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.shell-hud-copy .bar { grid-column: span 1; width: 150px; height: 13px; margin: 2px 0 0; border-color: #3a2a18; }
.shell-hud-copy .bar > span { font-size: 10px; line-height: 12px; }
.shell-hud-points { position: absolute; top: 0; left: 38px; }
.shell-money { display: flex; align-items: center; gap: 14px; margin-left: auto; white-space: nowrap; }
.shell-money > span { display: inline-flex; align-items: center; gap: 6px; font: 600 16px/1 var(--font); }
.shell-gold { color: #ffd77e; } .shell-gold .foundation-icon { color: #f0b941; }
.shell-shards { color: #8fe9ff; } .shell-shards .foundation-icon { color: var(--cyan); }
.shell-gear-wrap { position: relative; flex: 0 0 auto; }
.shell-gear { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; }
.shell-gear .foundation-icon { width: 22px; height: 22px; color: var(--gold); }
.shell-menu { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 190px; display: grid; gap: 6px; padding: 10px;
  border: 1px solid var(--gold); background: #0b1620f5; box-shadow: 0 8px 24px #000c; }
.shell-menu[hidden] { display: none; }
.shell-menu > * { display: block !important; width: 100%; text-align: left; }
.shell-menu > .muted { padding: 2px 4px; }
.shell-menu > .hidden { display: none !important; }
.shell-badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c0392b; color: #fff;
  font: 700 11px/18px system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 1px #000; }
.shell-dot { position: absolute; top: 5px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #e04848; box-shadow: 0 0 0 1px #000; }

/* ---------------------------------------------------------------- podnavigace a hráči/chat */
.shell-subnav { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; margin: 0 0 8px; padding: 0 0 6px;
  border-bottom: 1px solid #806744aa; position: sticky; top: 0; z-index: 6; background: #0c1620; }
.shell-subnav #tabs { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 4px; min-width: 0; order: 0; }
#tabs .tab.shell-off { display: none; }
.shell-mmo { display: flex; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.shell-mmo-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px; font-size: 14px; white-space: nowrap; }
.shell-mmo-btn .foundation-icon { color: var(--gold); width: 18px; height: 18px; }
.shell-mmo-btn[aria-pressed="true"] { border-color: var(--cyan); box-shadow: inset 0 0 0 1px #40dbea80, inset 0 0 12px #40dbea26; }

/* ---------------------------------------------------------------- katalog Více */
.shell-more { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; overflow: auto;
  border: 1px solid var(--gold); background: linear-gradient(#0b1620f2, #091520f2), url('../assets/ui/foundation-stone.png') center / 627px;
  box-shadow: inset 0 0 0 2px #050a0b, inset 0 0 0 3px #806744; }
.shell-more[hidden] { display: none; }
.shell-more-head { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #806744aa; }
.shell-more-head h2 { display: inline-flex; align-items: center; gap: 12px; margin: 0; border: 0; color: #ffe4a8; font: 600 28px/1.1 var(--display-font); }
.shell-more-head h2 .foundation-icon { color: var(--gold); width: 26px; height: 26px; }
.shell-more-close { margin-left: auto; width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.shell-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-content: start; }
.shell-group { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid #a4844a; background: #0d1821d9;
  box-shadow: inset 0 0 0 2px #050a0b; }
.shell-group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid #806744aa;
  color: #ffe4a8; font: 600 20px/1.2 var(--display-font); }
.shell-group h3 .foundation-icon { color: var(--gold); width: 24px; height: 24px; }
.shell-dest { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 14px; text-align: left; font-size: 17px; }
.shell-dest .foundation-icon { color: var(--gold); width: 22px; height: 22px; }
.shell-dest > span { flex: 1; min-width: 0; }
.shell-dest.active { border-color: var(--cyan); box-shadow: inset 0 0 0 1px #40dbea80, inset 0 0 12px #40dbea26; }

/* ---------------------------------------------------------------- počítač: lišta, šuplíky */
.shell-rail, .shell-drawer-close { display: none; }
body:not([data-mobile="true"]) #scr-game .layout { position: relative; grid-template-columns: 94px minmax(0, 1fr) minmax(260px, 300px); }
body:not([data-mobile="true"])[data-shell-right="closed"] #scr-game .layout { grid-template-columns: 94px minmax(0, 1fr); }
body:not([data-mobile="true"])[data-shell-right="closed"] #right { display: none; }
body:not([data-mobile="true"]) .shell-rail { display: flex; flex-direction: column; gap: 6px; padding: 4px; overflow: auto;
  border: 1px solid var(--line); background: #0a141ed9; box-shadow: inset 0 0 0 2px #050a0b; }
.shell-rail-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; padding: 6px 2px;
  border: 1px solid transparent; background: none; color: var(--text); font: 12px/1.15 var(--font); text-align: center; cursor: pointer; }
.shell-rail-btn .foundation-icon { width: 30px; height: 30px; color: var(--gold); }
.shell-rail-btn > span { overflow-wrap: anywhere; }
.shell-rail-btn:hover { border-color: #806744; }
.shell-rail-btn.active { border-color: var(--gold); background: linear-gradient(#5a431c, #2a1f0e); color: #fff3d6; box-shadow: inset 0 0 12px #e7bf7540; }
.shell-rail-btn .shell-badge { position: absolute; top: 4px; right: 4px; }
.shell-rail-btn:last-child { margin-top: auto; }
/* Levý panel postavy je šuplík otevíraný z HUD (všechny statistiky, body a výbava zůstávají). */
body:not([data-mobile="true"]) #left { position: absolute; z-index: 37; top: 12px; bottom: 12px; left: 114px; width: 300px; padding: 12px; padding-top: 52px;
  background: #0b1620fa; box-shadow: 8px 0 24px #000c; transform: translateX(-24px); opacity: 0; visibility: hidden; transition: transform .16s, opacity .16s, visibility .16s; }
body:not([data-mobile="true"])[data-shell-left="open"] #left { transform: none; opacity: 1; visibility: visible; }
body:not([data-mobile="true"])[data-shell-left="open"] .shell-drawer-close { display: inline-flex; position: absolute; z-index: 38; top: 20px; left: calc(114px + 300px - 52px);
  width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; }
/* Pod 1280 px je pravý panel (hráči + chat) překryvný šuplík, nad 1280 px pevný sloupec. */
@media (max-width: 1279px) {
  body:not([data-mobile="true"]) #scr-game .layout { grid-template-columns: 94px minmax(0, 1fr); }
  body:not([data-mobile="true"])[data-shell-right="open"] #right { position: absolute; z-index: 36; top: 12px; right: 12px; bottom: 12px; height: auto;
    width: min(340px, 86vw); padding: 8px; background: #0b1620fa; box-shadow: -8px 0 24px #000c; }
}
@media (prefers-reduced-motion: reduce) { body:not([data-mobile="true"]) #left { transition: none; } }

/* ---------------------------------------------------------------- telefon */
body[data-mobile="true"] .shell-mmo { display: none; }
body[data-mobile="true"] #scr-game .topbar { flex-wrap: wrap; gap: 4px 8px; }
body[data-mobile="true"] .shell-money { gap: 10px; }
body[data-mobile="true"] .shell-money > span { font-size: 14px; }
body[data-mobile="true"] .shell-gear { width: 44px; height: 44px; }
body[data-mobile="true"] #scr-game .shell-hud { order: 20; flex: 1 1 100%; grid-template-columns: 46px minmax(0, 1fr); padding: 2px 4px; }
body[data-mobile="true"] .shell-hud-art { width: 46px; height: 46px; }
body[data-mobile="true"] .shell-hud-copy { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body[data-mobile="true"] .shell-hud-copy .bar { width: 100%; }
body[data-mobile="true"] .shell-subnav { margin-bottom: 6px; padding-bottom: 4px; }
body[data-mobile="true"] .shell-subnav #tabs { flex-wrap: nowrap; overflow-x: auto; }
body[data-mobile="true"] .mob-bar { flex-wrap: wrap; }
body[data-mobile="true"] .mob-bar .shell-legacy { display: none; }
.shell-phone-nav, .shell-phone-mmo { display: none; }
body[data-mobile="true"] .shell-phone-nav { display: flex; flex: 1 1 100%; gap: 4px; min-width: 0; }
body[data-mobile="true"] .shell-phone-mmo { display: flex; flex: 1 1 100%; gap: 6px; min-width: 0; }
body[data-mobile="true"]:not([data-mp="game"]) .shell-phone-mmo,
body[data-mobile="true"]:not([data-shell-tab="loc"]):not([data-shell-more="true"]) .shell-phone-mmo { display: none; }
body[data-mobile="true"] .mob-bar .shell-phone-btn { flex: 1 1 0; flex-direction: column; gap: 2px; min-height: 58px; padding: 4px 2px; font-size: 13px; }
body[data-mobile="true"] .mob-bar .shell-phone-btn .foundation-icon { width: 26px; height: 26px; margin: 0; }
body[data-mobile="true"] .mob-bar .shell-phone-btn.active { border-color: var(--gold); background: linear-gradient(#5a431c, #2a1f0e); box-shadow: inset 0 0 12px #e7bf7540; }
body[data-mobile="true"] .mob-bar .shell-phone-btn.active .foundation-icon { color: #ffe4a8; }
body[data-mobile="true"] .mob-bar .shell-phone-btn .shell-badge { position: absolute; top: 2px; right: 10%; }
body[data-mobile="true"] .mob-bar .shell-mmo-btn { flex: 1 1 0; flex-direction: row; justify-content: center; gap: 6px; min-height: 44px; padding: 4px 6px; font-size: 14px; }
body[data-mobile="true"] .mob-bar .shell-mmo-btn .foundation-icon { width: 20px; height: 20px; margin: 0; }
body[data-mobile="true"] .shell-more { padding: 10px; gap: 8px; }
body[data-mobile="true"] .shell-more-head h2 { font-size: 22px; }
body[data-mobile="true"] .shell-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body[data-mobile="true"] .shell-group { padding: 6px; gap: 4px; }
body[data-mobile="true"] .shell-group h3 { font-size: 15px; gap: 6px; margin: 0; padding-bottom: 3px; }
body[data-mobile="true"] .shell-group h3 .foundation-icon { width: 18px; height: 18px; }
body[data-mobile="true"] .shell-dest { min-height: 44px; gap: 6px; padding: 4px 6px; font-size: 13px; line-height: 1.15; }
body[data-mobile="true"] .shell-dest .foundation-icon { width: 17px; height: 17px; }

/* Malovaný portrét rasy v panelu postavy (místo pixelového). */
#left .character-art.left-portrait { flex: 0 0 84px; width: 84px; height: 104px; border: 2px solid var(--gold); box-shadow: inset 0 0 0 1px #000; }
.shell-dest { justify-content: flex-start; }
.shell-dest > span { text-align: left; }
.shell-more-head h2, .shell-group h3 { text-transform: none; letter-spacing: .3px; }
.shell-menu-lang { display: none !important; }
@media (max-width: 480px) {
  body[data-mobile="true"] #scr-game .topbar > .lang-slot { display: none; }
  body[data-mobile="true"] .shell-menu > .shell-menu-lang { display: flex !important; gap: 4px; }
  body[data-mobile="true"] .shell-menu-lang button { flex: 1; min-height: 44px; }
}
body[data-mobile="true"] .shell-more { padding: 8px; gap: 6px; }
body[data-mobile="true"] .shell-more-head { padding-bottom: 4px; }
body[data-mobile="true"] .shell-more-head h2 { font-size: 19px; gap: 8px; }
body[data-mobile="true"] .shell-more-close { width: 40px; height: 40px; min-height: 40px; }
body[data-mobile="true"] .shell-more-grid { gap: 6px; }
body[data-mobile="true"] .shell-group { padding: 5px; gap: 3px; }
body[data-mobile="true"] .shell-group h3 { font-size: 14px; }

/* Delší popisky (DE) v liště: menší písmo, zalomení jen mezi slovy. */
.shell-rail-btn { font-size: 11.5px; }
.shell-rail-btn > span { overflow-wrap: normal; word-break: normal; hyphens: auto; max-width: 100%; }
