/* 09_shell.css – Rozhraní: průvodce, ikony, lišta, průzkum, vzácnosti.
   Sloučeno z: 33_pruvodce.css, 34_foundation.css, 32_mobil.css, 34_exploration.css, 35_shell.css, 36_sjednoceni.css, 37_vzacnosti.css (pořadí zachováno). */

/* ===== 33_pruvodce.css ===== */
/* průvodce pro nové hráče */
#guide-box:empty { display: none; }
.guide { background: linear-gradient(#1e1830, #141020); border: 2px solid #c8a040; box-shadow: 0 4px 0 #000, 0 0 12px #c8a04044; padding: 8px 10px; margin-bottom: 10px; position: relative; }
.guide-head { display: flex; align-items: center; gap: 8px; }
.guide-head b { color: var(--gold); }
.guide-x { margin-left: auto; padding: 0 6px; }
.guide-bar { height: 6px; background: #0a090e; border: 1px solid #000; margin: 6px 0; }
.guide-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c8a040, #ffe08a); }
.guide-title { font-weight: bold; color: #ffe2a0; margin-bottom: 2px; }
.guide .btn.primary { margin-top: 6px; }
.guide-min { background: none; border: none; box-shadow: none; padding: 0; }
/* RD-07 guide: progress is read-only; rewards are automatic. */
#guide-box { flex: 0 0 auto; min-height: 0; }
#guide-box .guide-disclosure { position: relative; z-index: 15; margin-bottom: 4px; }
#guide-box .guide-disclosure > summary { min-height: 44px; padding: 9px 12px; border: 1px solid #b28b46; background: #0a1b25; color: #ffe0a0; font: var(--fs-l)/1.3 var(--font-ui); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guide-box .guide-disclosure[open] > .guide { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(var(--app-height,100dvh) - 110px); overflow: auto; overscroll-behavior: contain; box-shadow: 0 5px 20px #000; }
#guide-box .guide { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 16px; padding: 14px 18px; margin: 0 0 10px; color: #f8e6c6; border: 2px solid #b28b46; background: linear-gradient(#0a1b25e8,#091720e8),url('../assets/ui/foundation-stone.png') center/cover; box-shadow: inset 0 0 0 2px #11100a,inset 0 0 0 3px #8f733a; font: var(--fs-l)/1.3 var(--font-ui); }
#guide-box .guide-head { grid-column: 1 / -1; gap: 14px; flex-wrap: wrap; }
#guide-box .guide-head h2 { display: inline-flex; gap: 9px; align-items: center; margin: 0; border: 0; font-size: var(--fs-xl); color: #ffe0a0; }
#guide-box .guide-reward { color: #ffdf88; font-size: var(--fs-m); }
#guide-box .guide-x { margin-left: auto; font-size: var(--fs-m); }
#guide-box .guide-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; font-size: var(--fs-m); }
#guide-box .guide-bar { flex: 1; height: 12px; margin: 0; border: 1px solid #a58344; background: #06131c; }
#guide-box .guide-bar i { background: linear-gradient(#90faff,#0fb2ce); }
#guide-box .guide-copy { min-width: 0; }
#guide-box .guide-title { font-size: var(--fs-xl); margin: 0 0 5px; }
#guide-box .guide-task { margin: 0 0 4px; font-size: var(--fs-l); }
#guide-box .guide-hint { margin: 0; font-size: var(--fs-m); font-style: italic; color: #e5d7bc; }
#guide-box .guide-show { align-self: center; min-width: 155px; min-height: 52px; font-size: var(--fs-xl); margin: 0; }
#guide-box .guide-min { display: block; padding: 0; margin-bottom: 6px; border: 0; box-shadow: none; background: transparent; }
#guide-box .guide-min .btn { width: 100%; font-size: var(--fs-m); }
#guide-box .guide.guide-combat { display: none !important; } /* Guide reappears unchanged after combat; never displaces defenses. */
body[data-mobile="true"] #guide-box .guide { padding: 9px; gap: 6px; margin-bottom: 7px; grid-template-columns: minmax(0,1fr); font-size: var(--fs-m); }
body[data-mobile="true"] #guide-box .guide-head { gap: 5px 8px; }
body[data-mobile="true"] #guide-box .guide-head h2 { font-size: var(--fs-xl); gap: 5px; }
body[data-mobile="true"] #guide-box .guide-head .rd07-icon { width: 21px; height: 21px; }
body[data-mobile="true"] #guide-box .guide-head .rd07-badge { font-size: var(--fs-s); padding: 3px; }
body[data-mobile="true"] #guide-box .guide-reward { order: 5; width: 100%; font-size: var(--fs-m); }
body[data-mobile="true"] #guide-box .guide-x { font-size: var(--fs-s); padding: 4px 6px; }
body[data-mobile="true"] #guide-box .guide-title { font-size: var(--fs-xl); margin-bottom: 4px; }
body[data-mobile="true"] #guide-box .guide-task { font-size: var(--fs-l); }
body[data-mobile="true"] #guide-box .guide-hint { font-size: var(--fs-m); }
body[data-mobile="true"] #guide-box .guide-show { width: 100%; min-height: 44px; font-size: var(--fs-l); }
@media (max-height: 680px) {
  #guide-box .guide { padding: 6px 8px; gap: 4px 8px; margin-bottom: 5px; }
  #guide-box .guide-head h2 { font-size: var(--fs-l); }
  #guide-box .guide-title { font-size: var(--fs-xl); }
  #guide-box .guide-task { font-size: var(--fs-m); }
  #guide-box .guide-hint { font-size: var(--fs-m); max-height: 38px; overflow: auto; }
  #guide-box .guide-progress { gap: 8px; font-size: var(--fs-s); }
  #guide-box .guide-bar { height: 8px; }
  #guide-box .guide-show { min-height: 44px; min-width: 100px; font-size: var(--fs-l); }
}

/* ===== 34_foundation.css ===== */
/* RD-01 shared viewport and approved components. Feature layouts retain their own owners. */
@font-face { font-family: Cinzel; src: url('../assets/ui/foundation/fonts/Cinzel-variable.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
/* :root – hodnoty jsou v 00_tokens.css */
html, body { width: 100%; height: 100%; min-width: 0; overflow: hidden; }
body { background: #0a121b url('../assets/ui/foundation-stone.png') repeat; background-size: 627px; font: var(--fs-m)/1.45 var(--font); }
.screen { height: var(--app-height); min-height: 0; max-width: 100%; display: flex; flex-direction: column; overflow: hidden; }
.screen > * { min-width: 0; }
.topbar, .site-nav { flex: 0 0 auto; background: #0a141ed9; border-bottom: 1px solid var(--gold); box-shadow: 0 2px 0 #513d26, 0 3px 0 #060a0e; }
.topbar { flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
.foundation-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.foundation-brand img { display: block; width: 180px; height: 54px; object-fit: contain; }
.logo-small { font-family: var(--display-font); letter-spacing: .5px; }
#tabs { order: 10; flex: 1 1 100%; min-width: 0; gap: 4px; }
.tab { font-size: var(--fs-m); border-width: 1px; padding: 5px 9px; }
.tab.active { color: #fff3d6; border-color: var(--gold); box-shadow: inset 0 0 10px #d1a44726; }
.layout { flex: 1 1 auto; height: auto; min-height: 0; min-width: 0; grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) minmax(240px, 300px); padding: 12px; gap: 12px; overflow: hidden; }
.layout > * { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
#center { position: relative; }
#right { overflow: hidden; }
#site-main { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.site-foot { flex: 0 0 auto; }
#scr-chars > .panel { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* Temporary bounded panels until their individual cards implement paging/detail views. */
.panel { border: 1px solid var(--line); background: #101a24d9; box-shadow: inset 0 0 0 2px #050a0b, 0 2px 8px #0005; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
input, textarea, select { color: var(--text); background-color: #0a141e; border-color: var(--line); }
.btn:disabled { opacity: .5; }
.foundation-icon { display: inline-block; width: 1.2em; height: 1.2em; flex: 0 0 auto; vertical-align: -.18em; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.icon-game { --icon: url('../assets/ui/foundation/controller.svg'); }
.icon-hero { --icon: url('../assets/ui/foundation/person-badge.svg'); }
.icon-chat { --icon: url('../assets/ui/foundation/chat-dots.svg'); }
.icon-send { --icon: url('../assets/ui/foundation/send.svg'); }
.icon-close { --icon: url('../assets/ui/foundation/x-lg.svg'); }
.icon-warning { --icon: url('../assets/ui/foundation/exclamation-triangle.svg'); }
.icon-empty { --icon: url('../assets/ui/foundation/journal-text.svg'); }
.icon-retry { --icon: url('../assets/ui/foundation/arrow-clockwise.svg'); }
.icon-back { --icon: url('../assets/ui/foundation/chevron-left.svg'); }
.icon-global { --icon: url('../assets/ui/foundation/globe.svg'); }
.icon-zone { --icon: url('../assets/ui/foundation/geo-alt-fill.svg'); }
.icon-guild { --icon: url('../assets/ui/foundation/shield-shaded.svg'); }
.icon-whisper { --icon: url('../assets/ui/foundation/envelope-fill.svg'); }
.icon-game, .icon-hero, .icon-chat, .icon-empty { mask: none; background: url('../assets/ui/foundation-symbols.png') no-repeat; background-size: 500% auto; }
.icon-game { background-position: 1.859% 48.791%; }
.icon-hero { background-position: 26.203% 46.547%; }
.icon-chat { background-position: 49.971% 51.899%; }
.icon-empty { background-position: 74.373% 48.791%; width: 120px; height: 120px; }
.foundation-surface { position: relative; color: var(--text); background: #0b1621 url('../assets/ui/foundation-stone.png') repeat; background-size: 627px; border: 1px solid #e5bf78; border-radius: 2px; box-shadow: inset 0 0 0 3px #0b1116, inset 0 0 0 4px #866b42, 0 8px 24px #0008; clip-path: polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px); }
.foundation-ornament { display: block; margin: -16px auto 0; width: 135px; height: 32px; background: linear-gradient(90deg, transparent, #40dbea, transparent) center / 135px 1px no-repeat; }
.foundation-ornament > i { display: block; width: 60px; height: 32px; margin: auto; background: url('../assets/ui/foundation-symbols.png') 99.148% 48.101% / 500% auto no-repeat; }
.foundation-chat-empty > .foundation-ornament, .foundation-banner .foundation-ornament, [data-theme='industry'] > .foundation-ornament { display: none; }
.foundation-surface::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg,transparent 8px,#e5bf78 8px 9px,transparent 9px) top left, linear-gradient(225deg,transparent 8px,#e5bf78 8px 9px,transparent 9px) top right, linear-gradient(315deg,transparent 8px,#e5bf78 8px 9px,transparent 9px) bottom right, linear-gradient(45deg,transparent 8px,#e5bf78 8px 9px,transparent 9px) bottom left; background-size: 12px 12px; background-repeat: no-repeat; }
.foundation-state { text-align: center; padding: 22px 28px; width: min(100%, 520px); min-height: 280px; margin: auto; }
.foundation-state h2, .foundation-dialog h2 { font-weight: 600; color: #f5e7c3; font-size: clamp(22px, 2vw, 30px); letter-spacing: 0; line-height: 1.25; border: 0; margin: 10px 0 22px; padding: 0; }
.foundation-state h2 { font-size: var(--fs-xl); margin: 8px 0 16px; }
.foundation-state p { margin: 12px 0 0; font-size: var(--fs-xl); line-height: 1.3; overflow-wrap: anywhere; }
.foundation-state-mark { color: var(--gold); font-size: var(--fs-xl); line-height: 1; }
.foundation-spinner { display: inline-block; width: 112px; height: 112px; border: 6px solid #ad8951; border-right-color: #3cdeef; border-bottom-color: #3cdeef; border-radius: 50%; box-shadow: inset 0 0 0 1px #f5de9b, 0 0 12px #39d7eb40; animation: foundation-spin 1.2s linear infinite; }
@keyframes foundation-spin { to { transform: rotate(360deg); } }
.foundation-state[data-state='error'] .foundation-state-mark, .foundation-state[data-state='reconnecting'] .foundation-state-mark { color: #ff776a; font-size: var(--fs-xl); }
.foundation-state[data-state='error'] p, .foundation-state[data-state='reconnecting'] p { display: flex; align-items: center; justify-content: center; gap: 16px; color: #fff0df; border: 1px solid #ce584c; background: #471d1d99; padding: 10px; margin-top: 10px; }
.foundation-state[data-state='error'] p, .foundation-state[data-state='reconnecting'] p { max-width: 410px; margin-left: auto; margin-right: auto; }
.foundation-retry { margin-top: 22px; width: min(100%, 324px); min-height: 50px; padding: 8px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; font-size: var(--fs-xl); }
.foundation-state[data-state='empty'] .foundation-state-mark { position: relative; margin: 8px auto; width: 100%; }
.foundation-state[data-state='empty'] .foundation-state-mark::before,
.foundation-state[data-state='empty'] .foundation-state-mark::after { content: ''; position: absolute; top: 50%; width: 26%; height: 1px; background: linear-gradient(90deg, transparent, #d9b774); }
.foundation-state[data-state='empty'] .foundation-state-mark::before { left: 0; }
.foundation-state[data-state='empty'] .foundation-state-mark::after { right: 0; transform: rotate(180deg); }
.foundation-state .btn, .foundation-dialog .btn, .foundation-state[data-state='error'] p,
.foundation-state[data-state='reconnecting'] p { clip-path: polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px); }
.foundation-state .btn:focus-visible, .foundation-dialog .btn:focus-visible { border-color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan), 0 0 12px var(--cyan); }
.foundation-state .btn::after, .foundation-dialog .btn::after,
body[data-mobile="true"] .ctab::after, body[data-mobile="true"] .mob-bar button::after,
body[data-mobile="true"] .mob-back::after, body[data-mobile="true"] #chat-form .btn::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg,transparent 5px,#dabb7a 5px 6px,transparent 6px) top left, linear-gradient(225deg,transparent 5px,#dabb7a 5px 6px,transparent 6px) top right, linear-gradient(315deg,transparent 5px,#dabb7a 5px 6px,transparent 6px) bottom right, linear-gradient(45deg,transparent 5px,#dabb7a 5px 6px,transparent 6px) bottom left; background-size: 8px 8px; background-repeat: no-repeat; }
.foundation-banner { flex: 0 0 auto; padding: 4px 12px; }
.foundation-banner .foundation-state { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; padding: 6px 12px; }
.foundation-banner .foundation-state h2 { font-size: var(--fs-m); margin: 0; }
.foundation-banner .foundation-state-mark { display: none; }
.foundation-banner .foundation-state::before { display: none; }
.foundation-banner .foundation-state p { font-size: var(--fs-m); margin: 0; padding: 0; border: 0; background: none; flex: 1; clip-path: none; }
.foundation-banner .foundation-retry { font-size: var(--fs-m); width: auto; min-height: 36px; padding: 4px 12px; margin: 0; }
.foundation-banner .foundation-retry .foundation-icon { display: none; }
.foundation-bootstrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px !important; }
.foundation-state[data-theme='industry'] { --font: system-ui, sans-serif; font-family: var(--font); border-color: #bd9b68; background-color: #0d2130; }
.foundation-state[data-theme='industry'] h2 { font: 600 var(--fs-xl)/1.3 var(--font-ui); }
.foundation-state[data-theme='industry'] { clip-path: none; border-radius: 10px; }
.foundation-state[data-theme='industry']::before, .foundation-state[data-theme='industry']::after { display: none; }
.foundation-state[data-theme='industry'] .icon-empty { width: 52px; height: 52px; color: var(--text); mask: var(--icon) center / contain no-repeat; background: currentColor; }
.foundation-dialog { position: fixed; inset: 0; height: fit-content; margin: auto; width: min(405px, calc(100% - 32px)); max-height: calc(var(--app-height) - 32px); padding: 20px; text-align: center; overflow: auto; }
.foundation-dialog::backdrop { background: #03070bb8; backdrop-filter: blur(2px); }
.foundation-dialog h2 { font-size: var(--fs-xl); margin: 4px 18px 8px; padding-bottom: 6px; border-bottom: 1px solid #806744; }
.foundation-dialog p { margin: 0; font-size: var(--fs-l); line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.foundation-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; padding: 5px; display: grid; place-items: center; }
.foundation-close .foundation-icon { width: 18px; height: 18px; }
.foundation-dialog-actions { display: flex; gap: 16px; margin-top: 16px; }
.foundation-dialog-actions .btn { flex: 1; min-width: 0; min-height: 44px; font-size: var(--fs-l); padding: 6px; overflow-wrap: anywhere; }
.chat { background: #101a24eb; }
#chat-form { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; min-width: 0; }
#chat-input { flex: 1; min-width: 0; border-radius: 3px; }
#chat-form button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; min-height: 38px; }
#chat-form > .foundation-icon, .ctab > .foundation-icon { display: none; }
#chat-log { flex: 1 1 auto; min-height: 0; line-height: 1.55; }
#chat-log:empty { display: none; }
.chat-tabs { flex-wrap: wrap; flex: 0 0 auto; }
.ctab { padding: 5px 8px; font-size: var(--fs-s); }
.ctab.active { color: #d9ffff; border-color: var(--cyan); box-shadow: inset 0 0 8px #3bd8e033; }
.foundation-chat-empty { flex: 1 1 auto; min-height: 0; overflow: auto; width: 100%; max-width: 100%; margin: 10px 0; padding: 16px 10px; border-color: #655c48; display: flex; flex-direction: column; justify-content: safe center; }
.foundation-chat-empty h2 { font-size: var(--fs-l); margin: 4px 0 12px; }
.foundation-chat-empty p { font-size: var(--fs-m); margin-top: 10px; }
.foundation-chat-empty .foundation-state-mark { font-size: var(--fs-xl); }
.foundation-chat-empty .icon-empty { width: 64px; height: 64px; }
.mob-bar { background: #091520; }
.mob-bar button { font-family: var(--font); color: var(--text); background: #101c28; border: 1px solid #675b45; border-radius: 4px; }
.mob-bar button.active { color: #d9ffff; border-color: var(--cyan); background: #17313e; box-shadow: inset 0 0 10px #40dbea26; }
.mob-bar button.active .foundation-icon { color: var(--cyan); }
.mob-bar .foundation-icon { color: var(--gold); }
body[data-mobile="true"][data-connection]:not([data-connection="ready"]) #scr-game { grid-template-rows: auto auto minmax(0, 1fr) auto; }
body[data-mobile="true"][data-keyboard="true"][data-connection]:not([data-connection="ready"]) #scr-game { grid-template-rows: auto auto minmax(0, 1fr); }
body[data-mobile="true"] .foundation-brand img { width: clamp(116px, 35vw, 145px); height: 48px; }
body[data-mobile="true"] .lang-slot button { min-height: 44px; min-width: 44px; }
body[data-mobile="true"] .foundation-close { width: 44px; }
body[data-mobile="true"] .lang-slot button { font: var(--fs-m)/1.2 var(--font); background: none; border-color: transparent; }
body[data-mobile="true"] .lang-slot button.active { border-color: var(--gold); background: #55421c; }
body[data-mobile="true"] .mob-back { font-size: var(--fs-l); padding: 6px 14px; }
body[data-mobile="true"] .ctab { position: relative; font-size: var(--fs-m); background: linear-gradient(#1b2934, #0d1822); }
body[data-mobile="true"] .ctab > .foundation-icon { display: inline-block; width: 24px; height: 24px; margin-right: 6px; color: var(--gold); vertical-align: middle; }
body[data-mobile="true"] .ctab > .icon-chat { width: 32px; height: 32px; margin: -4px 2px -4px 0; }
body[data-mobile="true"] #chat-form > .foundation-icon { width: 32px; height: 32px; }
body[data-mobile="true"] .mob-back .foundation-icon { width: 14px; height: 18px; margin-right: 6px; }
body[data-mobile="true"] #scr-game { border: 2px solid var(--gold); box-shadow: inset 0 0 0 2px #806744; clip-path: polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px); }
body[data-mobile="true"] #scr-game::after { content: ''; position: absolute; z-index: 50; inset: 0; pointer-events: none; background: linear-gradient(135deg,transparent 6px,#e5bf78 6px 8px,transparent 8px) top left, linear-gradient(225deg,transparent 6px,#e5bf78 6px 8px,transparent 8px) top right, linear-gradient(315deg,transparent 6px,#e5bf78 6px 8px,transparent 8px) bottom right, linear-gradient(45deg,transparent 6px,#e5bf78 6px 8px,transparent 8px) bottom left; background-size: 10px 10px; background-repeat: no-repeat; }
body[data-mobile="true"] #chat-log { font-size: var(--fs-l); line-height: 1.35; border: 1px solid #897449; margin: 4px 0 6px; }
body[data-mobile="true"] .mob-bar button { font-size: var(--fs-l); border-color: #b38e50; background: linear-gradient(#24313b, #101c28); }
body[data-mobile="true"] .mob-bar .foundation-icon { width: 40px; height: 40px; margin: -6px 0; }
body[data-mobile="true"] .mob-bar button.active, body[data-mobile="true"] .ctab.active { border-color: var(--cyan); background: #10303b; box-shadow: inset 0 0 0 1px #40dbea80, inset 0 0 14px #40dbea26; }
body[data-mobile="true"] .ctab, body[data-mobile="true"] .mob-bar button, body[data-mobile="true"] .mob-back, body[data-mobile="true"] #chat-form .btn { clip-path: polygon(7px 0,calc(100% - 7px) 0,100% 7px,100% calc(100% - 7px),calc(100% - 7px) 100%,7px 100%,0 calc(100% - 7px),0 7px); }
body[data-mobile="true"] .ctab:focus-visible, body[data-mobile="true"] .mob-bar button:focus-visible, body[data-mobile="true"] .mob-back:focus-visible, body[data-mobile="true"] #chat-form .btn:focus-visible { border-color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); }
body[data-mobile="true"] .topbar .mob-back { margin-left: auto; }
body[data-mobile="true"] .foundation-dialog h2 { font-size: var(--fs-xl); }
body[data-mobile="true"] .foundation-dialog-actions { gap: 12px; }
body[data-mobile="true"] .foundation-dialog-actions .btn { font-size: var(--fs-l); }
body[data-mobile="true"] .foundation-banner .foundation-state { gap: 8px; }
body[data-mobile="true"] .foundation-banner h2 { display: none; }
body[data-mobile="true"][data-keyboard="true"] .foundation-chat-empty { margin: 2px 0; padding: 2px 8px; }
body[data-mobile="true"][data-keyboard="true"] .foundation-chat-empty h2 { font: var(--fs-m)/1.2 var(--font); margin: 0; }
body[data-mobile="true"][data-keyboard="true"] .foundation-chat-empty p,
body[data-mobile="true"][data-keyboard="true"] .foundation-chat-empty .foundation-state-mark { display: none; }
body[data-mobile="true"][data-keyboard="true"] #chat-log { margin: 2px 0; padding: 0 6px; font-size: var(--fs-m); line-height: 1.25; }
body[data-mobile="true"][data-keyboard="true"] .ctab > .foundation-icon { width: 20px; height: 20px; margin: 0 6px 0 0; }
body[data-mobile="true"][data-keyboard="true"][data-connection]:not([data-connection="ready"]) .chat-tabs,
body[data-mobile="true"][data-keyboard="true"][data-connection]:not([data-connection="ready"]) .foundation-chat-empty { display: none; }
#tab-ind { font-family: var(--font-ui); }
@media (min-width: 761px) and (max-width: 1100px) {
  .layout { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(200px, 240px); }
  #right { height: auto; }
}
@media (max-width: 600px) {
  body[data-mobile="true"] .mob-back { width: 44px; min-width: 44px; padding: 8px; }
  body[data-mobile="true"] .mob-back .foundation-icon { margin: 0; }
  body[data-mobile="true"] .mob-back [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body[data-mobile="true"] .mob-bar button { flex-direction: column; gap: 0; min-height: 64px; font-size: var(--fs-m); }
  body[data-mobile="true"] .mob-bar .foundation-icon { width: 36px; height: 30px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .foundation-spinner { animation: none; } }

/* ===== 32_mobil.css ===== */
/* Telefon je určen v 29_mobil.js i při otevření naležato. Úzké okno má stejný fallback.
   Obsahové panely dosud nepřepracovaných karet mají dočasný vnitřní scroll. */
.mob-bar, .mob-back, .mob-players-toggle { display: none; }
html[data-mobile="true"], body[data-mobile="true"] { overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body[data-mobile="true"] input, body[data-mobile="true"] select, body[data-mobile="true"] textarea { font-size: var(--fs-m); }
body[data-mobile="true"] .btn { min-height: 44px; }
body[data-mobile="true"] #scr-game {
  position: fixed; top: var(--app-offset-top, 0px); left: var(--app-offset-left, 0px);
  width: var(--app-width, 100%); height: var(--app-height, 100dvh); min-height: 0; max-height: none;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
body[data-mobile="true"] .topbar { flex-wrap: wrap; gap: 4px; padding: 4px 6px; min-width: 0; position: relative; }
body[data-mobile="true"] .topbar .logo-small { font-size: var(--fs-s); letter-spacing: 1px; margin-right: auto; }
body[data-mobile="true"] .topbar > .muted { font-size: var(--fs-xs); }
body[data-mobile="true"] .topbar #btn-sound, body[data-mobile="true"] .topbar > a[href="#/"] { display: none; }
/* Úzký telefon: záhlaví v jednom řádku (menší logo, bez počtu online, užší Postavy/Účet). */
@media (max-width: 480px) {
  body[data-mobile="true"] .topbar .logo-small img { width: 92px; height: auto; }
  body[data-mobile="true"] .topbar > .muted { display: none; }
  body[data-mobile="true"] .topbar > #btn-switch, body[data-mobile="true"] .topbar > a[href="#/ucet"] { padding: 0 7px; font-size: var(--fs-s); }
}
body[data-mobile="true"] #tabs {
  order: 10; flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 2px;
}
body[data-mobile="true"] .tab { flex: 0 0 auto; padding: 6px 10px; min-height: 44px; white-space: nowrap; scroll-snap-align: start; }
body[data-mobile="true"] .layout { display: block; height: auto; min-height: 0; min-width: 0; padding: 6px; overflow: hidden; }
body[data-mobile="true"] .layout > * { height: 100%; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; }
body[data-mobile="true"][data-mp="game"] #left,
body[data-mobile="true"][data-mp="game"] #right,
body[data-mobile="true"][data-mp="hero"] #center,
body[data-mobile="true"][data-mp="hero"] #right,
body[data-mobile="true"][data-mp="chat"] #left,
body[data-mobile="true"][data-mp="chat"] #center { display: none; }
body[data-mobile="true"][data-mp="chat"] #right { display: flex; flex-direction: column; gap: 4px; height: 100%; overflow: hidden; }
body[data-mobile="true"][data-mp="chat"] #zone-side { display: none; flex: 0 1 45%; max-height: 45%; min-height: 0; overflow: auto; }
body[data-mobile="true"][data-mp="chat"][data-mobile-players="true"] #zone-side { display: block; }
body[data-mobile="true"][data-mp="chat"] .mob-players-toggle { display: block; flex: 0 0 auto; }
body[data-mobile="true"][data-mp="chat"] .chat { min-height: 0; min-width: 0; padding: 4px; overflow: hidden; }
body[data-mobile="true"] .chat-tabs { flex: 0 0 auto; gap: 4px; overflow-x: auto; }
body[data-mobile="true"] .ctab { flex: 1 0 auto; min-height: 44px; padding: 4px 8px; }
body[data-mobile="true"] #chat-log { min-height: 0; min-width: 0; overflow: auto; overflow-wrap: anywhere; }
body[data-mobile="true"] #chat-form { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin: 0; }
body[data-mobile="true"] #chat-input { flex: 1 1 auto; min-width: 0; min-height: 44px; margin: 0; }
body[data-mobile="true"] #chat-form button[type="submit"] { flex: 0 0 auto; white-space: nowrap; }
body[data-mobile="true"] .mob-bar {
  display: flex; position: relative; min-width: 0; gap: 4px; z-index: 40;
  border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
}
body[data-mobile="true"] .mob-bar button {
  flex: 1 1 0; min-width: 0; min-height: 48px; padding: 6px 2px; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mob-bar .mb-dot { position: absolute; top: 3px; right: 18%; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
body[data-mobile="true"]:not([data-mp="game"]) .mob-back { display: block; }
body[data-mobile="true"]:not([data-mp="game"]) #tabs { display: none; }
body[data-mobile="true"]:not([data-mp="game"]) .topbar .logo-small { margin-right: 8px; }
body[data-mobile="true"]:not([data-mp="game"]) .topbar > :not(.logo-small):not(.lang-slot):not(.mob-back) { display: none; }
/* Klávesnice je systémová: aplikace využije pouze skutečný visualViewport. */
body[data-mobile="true"][data-keyboard="true"] #scr-game { grid-template-rows: auto minmax(0, 1fr); }
body[data-mobile="true"][data-keyboard="true"] .mob-bar { display: none; }
body[data-mobile="true"][data-keyboard="true"][data-mp="chat"] .mob-players-toggle,
body[data-mobile="true"][data-keyboard="true"][data-mp="chat"] #zone-side,
body[data-mobile="true"][data-keyboard="true"][data-mp="chat"] .ctab:not(.active) { display: none; }
body[data-mobile="true"][data-keyboard="true"][data-mp="chat"] .ctab { flex: 0 1 auto; min-height: 32px; padding: 2px 8px; }
body[data-mobile="true"][data-keyboard="true"] .layout { padding: 2px 6px; }

/* Stávající úpravy obsahu zůstávají omezené na mobil. Finální rozložení vlastní jeho karta. */
body[data-mobile="true"] .tabpane table, body[data-mobile="true"] .page table { display: block; overflow-x: auto; max-width: 100%; }
body[data-mobile="true"] .fighter { width: 92px; font-size: var(--fs-xs); }
body[data-mobile="true"] .fighter.boss { width: 100%; max-width: 260px; }
body[data-mobile="true"] .fighter.boss img { width: 120px; height: 120px; }
body[data-mobile="true"] .btn.def { min-width: 0; }
body[data-mobile="true"] .log { max-height: 180px; }
body[data-mobile="true"] .scene-title { font-size: var(--fs-s); }
body[data-mobile="true"] .row { flex-wrap: wrap; }
body[data-mobile="true"] .dng-img { max-width: 96px; height: auto; }
body[data-mobile="true"] .av-say { max-width: 120px; }
body[data-mobile="true"] #wm-wrap { margin-left: -6px; margin-right: -6px; }
body[data-mobile="true"] .wm-node .wm-label, body[data-mobile="true"] .wm-node .wm-lvl { font-size: var(--fs-xs); }
body[data-mobile="true"] .page { padding: 10px; }
body[data-mobile="true"] .admin-tabs { flex-wrap: wrap; }
body[data-mobile="true"] .town { aspect-ratio: 1 / 1; }
body[data-mobile="true"] .bld-ico { font-size: var(--fs-l); }
body[data-mobile="true"] .bld-name { font-size: var(--fs-xs); padding: 0 3px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; }

/* ===== 34_exploration.css ===== */
/* RD-07 inner layouts. Shared game/MMO chrome remains owned by the foundation. */
body:not([data-mobile="true"]) #center:has(.tabpane:not(.hidden) > .rd07-page),
body[data-mobile="true"][data-mp="game"] #center:has(.tabpane:not(.hidden) > .rd07-page) {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
#center > .tabpane:not(.hidden):has(> .rd07-page) { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; container-type: size; }
.rd07-page { display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; gap: 10px; padding: 12px; overflow: hidden; color: #f7e5c2; font: var(--fs-l)/1.35 var(--font-ui); background: linear-gradient(#06141ad9,#09151be8),url('../assets/ui/foundation-stone.png') center/cover; }
.rd07-page *, .guide * { box-sizing: border-box; }
.rd07-page [hidden] { display: none; }
.rd07-page h2, .rd07-page h3, .rd07-page p { margin: 0; border: 0; }
.rd07-page h2 { color: #ffe3a1; font-size: clamp(23px,2.2vw,34px); line-height: 1.15; }
.rd07-page h3 { color: #f5d69b; font-size: var(--fs-xl); }
.rd07-page small, .rd07-note { font-size: var(--fs-m); line-height: 1.3; }
.rd07-note { color: #d8ceb9; flex: 0 0 auto; }
.rd07-icon { width: 24px; height: 24px; flex: 0 0 auto; filter: invert(90%) sepia(47%) saturate(400%); }
.rd07-page .btn, .guide .btn { min-height: 44px; padding: 8px 13px; font: inherit; line-height: 1.15; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: normal; overflow-wrap: anywhere; clip-path: polygon(9px 0,calc(100% - 9px) 0,100% 9px,100% calc(100% - 9px),calc(100% - 9px) 100%,9px 100%,0 calc(100% - 9px),0 9px); position: relative; }
.rd07-page .btn::after, .guide .btn::after { content: ''; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(135deg,transparent 5px,#ae8950 5px,#ae8950 6px,transparent 6px) top left/10px 10px no-repeat,linear-gradient(225deg,transparent 5px,#ae8950 5px,#ae8950 6px,transparent 6px) top right/10px 10px no-repeat,linear-gradient(45deg,transparent 5px,#ae8950 5px,#ae8950 6px,transparent 6px) bottom left/10px 10px no-repeat,linear-gradient(315deg,transparent 5px,#ae8950 5px,#ae8950 6px,transparent 6px) bottom right/10px 10px no-repeat; }
.rd07-page .btn:focus-visible, .guide .btn:focus-visible { outline: 3px solid #52e7fa; outline-offset: -4px; }
.rd07-page .btn:disabled, .guide .btn:disabled { opacity: .58; }
.rd07-page .btn small { display: block; }
.rd07-tabs { display: flex; gap: 5px; flex: 0 0 auto; padding-bottom: 3px; }
.rd07-tabs .btn { flex: 1 1 0; min-width: 0; }
.rd07-pager { display: flex; justify-content: center; align-items: center; gap: 14px; flex: 0 0 auto; min-height: 44px; }
.rd07-pager .btn { min-width: 64px; }
.rd07-pager output { flex: 0 0 auto; min-width: 44px; text-align: center; font: var(--fs-m)/1.2 var(--font-ui); }
.rd07-text-pager .btn { padding: 5px 10px; font-size: var(--fs-m); }
.rd07-reader-frame { flex: 1 1 auto; min-height: 48px; min-width: 0; overflow: hidden; }
.rd07-reader { height: 100%; min-height: 0; overflow: hidden; columns: 1; column-fill: auto; column-gap: 24px; overflow-wrap: anywhere; font-size: inherit; }
.rd07-reader p { margin: 0 0 .65em; }
.rd07-card { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid #be9651; box-shadow: inset 0 0 0 3px #0b1319,inset 0 0 0 4px #59492f; background: linear-gradient(#071821bd,#09151cd9),url('../assets/ui/foundation-stone.png') center/cover; }
.rd07-scene { display: block; width: 100%; min-height: 0; height: clamp(90px,22cqh,200px); object-fit: cover; border: 1px solid #9b7845; flex: 0 1 auto; }
.rd07-badge { color: #e7c47b; border: 1px solid #987741; padding: 4px 8px; font-size: var(--fs-m); white-space: nowrap; }
.exploration-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.exploration-hero { display: flex; align-items: stretch; gap: 14px; flex: 0 1 auto; min-height: 0; }
.exploration-hero > .rd07-scene { flex: 1 1 auto; min-width: 0; height: clamp(80px,28cqh,230px); }
.exploration-hero > .btn { flex: 0 0 28%; align-self: center; min-height: 62px; font-size: var(--fs-xl); }
.exploration-content { display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; min-height: 0; min-width: 0; }
.exploration-card-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); min-height: 0; flex: 1 1 auto; gap: 10px; }
.exploration-card-grid article { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #0d2029; border: 1px solid #876d42; min-height: 0; min-width: 0; }
.exploration-card-grid article p { flex: 1; min-height: 0; overflow: auto; font-size: var(--fs-m); }
.exploration-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; min-height: 0; flex: 1; }
.exploration-menu > .btn { min-height: 44px; }
.exploration-log.log { flex: 1 1 auto; max-height: none; min-height: 0; overflow: auto; font-size: var(--fs-m); }
.exploration-result { flex: 1 1 auto; }
.exploration-result > .btn { align-self: center; min-width: 220px; }
.exploration-content > .story-hint { margin: 0; flex: 0 0 auto; font-size: var(--fs-m); }
.exploration-adventure { flex: 1; min-height: 0; overflow: auto; } /* Existing RD08/09 entry panels, not the whole location. */
body[data-mobile="true"] .rd07-page { padding: 7px; gap: 7px; font-size: var(--fs-l); }
body[data-mobile="true"] .rd07-page h2 { font-size: var(--fs-xl); }
body[data-mobile="true"] .rd07-page h3 { font-size: var(--fs-l); }
body[data-mobile="true"] .rd07-card { padding: 10px; gap: 7px; }
body[data-mobile="true"] .rd07-tabs .btn { padding: 6px 3px; font-size: var(--fs-m); gap: 3px; }
body[data-mobile="true"] .rd07-tabs .rd07-icon { width: 18px; height: 18px; }
body[data-mobile="true"] .rd07-note, body[data-mobile="true"] .rd07-page small { font-size: var(--fs-m); }
body[data-mobile="true"] .rd07-badge { font-size: var(--fs-s); padding: 3px 5px; }
body[data-mobile="true"] .exploration-heading { align-items: flex-start; }
body[data-mobile="true"] .exploration-heading h2 { font-size: var(--fs-xl); }
body[data-mobile="true"] .exploration-hero { flex-direction: column; gap: 6px; }
body[data-mobile="true"] .exploration-hero > .rd07-scene { width: 100%; height: clamp(65px,22cqh,145px); flex: 0 1 auto; }
body[data-mobile="true"] .exploration-hero > .btn { flex: 0 0 auto; min-height: 44px; font-size: var(--fs-l); align-self: stretch; }
body[data-mobile="true"] .exploration-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
body[data-mobile="true"] .exploration-card-grid > :only-child { grid-column: 1 / -1; }
body[data-mobile="true"] .exploration-card-grid article { padding: 7px; gap: 5px; }
@container (max-height: 470px) {
  .rd07-page { padding: 6px; gap: 5px; font-size: var(--fs-m); }
  .rd07-page .rd07-scene { height: 65px; }
  .rd07-page.decision .rd07-scene, .rd07-page.dialogue .rd07-scene, .rd07-page.outcome .rd07-scene { display: none; }
  .exploration-hero > .rd07-scene { height: 50px !important; }
  .rd07-card { padding: 8px; gap: 5px; }
  .rd07-page .rd07-reader-frame { min-height: 38px; }
  .rd07-page h2 { font-size: var(--fs-xl); }
  .rd07-page .btn { padding: 5px 7px; }
  .exploration-content > .story-hint { font-size: var(--fs-m); }
}
@container (max-height: 310px) and (min-width: 471px) {
  .exploration-page.idle { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); grid-template-rows: auto 44px minmax(0,1fr); gap: 5px 8px; }
  .exploration-heading { grid-column: 1; grid-row: 1; }
  .exploration-heading h2 { font-size: var(--fs-xl); }
  .exploration-hero { grid-column: 1; grid-row: 2 / -1; flex-direction: column; }
  .exploration-hero > .rd07-scene { flex: 1; height: 0 !important; min-height: 0; }
  .exploration-hero > .btn { min-height: 44px; align-self: stretch; font-size: var(--fs-l); flex: 0 0 auto; }
  .exploration-page.idle > .rd07-tabs { grid-column: 2; grid-row: 1 / 3; }
  .exploration-page.idle > .exploration-content { grid-column: 2; grid-row: 3; }
  .exploration-page.idle > .rd07-tabs .btn { font-size: var(--fs-s); padding: 3px; }
  .exploration-page.idle > .rd07-tabs .rd07-icon { display: none; }
  .exploration-page.idle > .rd07-tabs { align-self: start; }
  .exploration-content > .story-hint { display: none; } /* same quest link remains under More and global tabs */
}
@media (prefers-reduced-motion: reduce) { .rd07-page *, .guide * { animation: none !important; transition: none !important; } }

/* ===== 35_shell.css ===== */
/* 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;
 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: var(--fs-s)/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 var(--fs-m)/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: var(--fs-s); 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: var(--fs-xs); 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 var(--fs-m)/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; }
.shell-badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c0392b; color: #fff;
  font: 700 var(--fs-xs)/18px var(--font-ui); 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: var(--fs-m); 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 var(--fs-xl)/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 var(--fs-l)/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: var(--fs-l); }
.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: var(--fs-s)/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: var(--fs-m); }
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: var(--fs-s); }
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); 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: var(--fs-m); }
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: var(--fs-xl); }
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: var(--fs-m); gap: 6px; 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: var(--fs-s); 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: var(--fs-l); 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: var(--fs-m); }

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

/* odkaz na Discord v horní liště */
.shell-discord { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; height: 38px; padding: 0 13px; border-radius: 999px !important; text-decoration: none;
  background: linear-gradient(180deg, #6b74f0, #4752c4) !important; border: 1px solid #a6adff !important; color: #fff !important; font: 700 var(--fs-s)/1 var(--font); letter-spacing: .02em;
  box-shadow: 0 0 14px rgba(88, 101, 242, .45); transition: filter .15s, box-shadow .15s; }
.shell-discord:hover { filter: brightness(1.15); box-shadow: 0 0 20px rgba(120, 130, 255, .7); }
.shell-discord svg { display: block; flex: none; width: 18px; height: 18px; margin: 0; vertical-align: middle; }
.shell-discord span { display: block; line-height: 1; }
.topbar .shell-discord, body .shell-discord { display: inline-flex !important; align-items: center; height: 38px !important; min-height: 0 !important; }
body[data-mobile="true"] .shell-discord { min-width: 0; height: 40px !important; padding: 0; justify-content: center; border-radius: 12px !important; }
body[data-mobile="true"] .shell-discord svg { width: 20px; height: 20px; }
body[data-mobile="true"] .shell-discord span { display: none; }

/* ===== 36_sjednoceni.css ===== */
/* Sjednocení stylu industriálu (RD-15–RD-18) a domova (RD-19) se zbytkem hry: zlaté akcenty místo tyrkysových
   a stejné patkové písmo. Tyrkysová zůstává jen pro fokus klávesnice (stejně jako v celé hře, viz 34_foundation.css).
   Mění se jen vzhled; rozložení a funkce vlastní původní soubory. */
#tab-ind, #tab-ind *:not(.foundation-icon), #center .rd19-home, #center .rd19-home *:not(.foundation-icon) { }
#tab-ind h2, #tab-ind h3, #center .rd19-home h2, #center .rd19-home h3 { color: #ffe4a8; }

/* Hlavní tlačítka a vybrané položky */
#tab-ind .ind-page .btn.primary, #tab-ind .indprod .btn.primary, #tab-ind .indfamily-home-main > .btn,
#tab-ind .rd17-economy .indeco-btn.is-primary, #tab-ind .rd17-economy .indeco-btn[aria-pressed=true] {
  border-color: #f2ce8b; background: linear-gradient(#b58232, #604011); color: #fff5db;
  box-shadow: inset 0 0 0 1px #080d13, 0 3px 5px #0006; }
#tab-ind .ind-page .selected, #tab-ind .indprod-recipe.selected, #tab-ind .indfamily-animal.selected,
#tab-ind .ind-branch-card.selected {
  border-color: var(--gold); background-image: linear-gradient(#3c2c12e6, #1b1408e6); box-shadow: inset 0 0 14px #e7bf7540; }
#tab-ind .ind-site.selected .ind-site-art { filter: drop-shadow(0 0 4px #e7bf75); }
#tab-ind .ind-site.selected .ind-site-label { border-color: var(--gold); background: #3a2a12ee; }
#tab-ind .ind-site-fallback { background: #1c1810d9; }

/* Čísla, výnosy a průběh */
#tab-ind .rd17-economy { --ie-teal: #e7bf75; }
#tab-ind .indprod-heading h2 small { border-color: #b18a4b; background: #3a2a12; color: #ffe4a8; }
#tab-ind .indprod-list-heading > span:last-child, #tab-ind .indprod-compare-row > b:last-child,
#tab-ind .indprod-mode-potential, #tab-ind .indfamily-metric > strong, #tab-ind .rd17-economy .indeco-metrics > span + span b { color: #ffd77e; }
#tab-ind .indprod-rate, #tab-ind .indprod-flow-rows b, #tab-ind .indfamily-rates strong { color: #a9e597; }
#tab-ind .indprod-progress progress, #tab-ind .indfamily progress { accent-color: #e7bf75; }
#tab-ind .rd17-economy .indeco-live { border-color: #806744; }
body[data-mobile=true] #tab-ind .rd17-economy .indeco-mobile-log { background: #17120b; }

/* Domov: návštěva */
#center .rd19-home .home-guest { color: #ffe4a8; border-color: #806744; }

/* ===== 37_vzacnosti.css ===== */
/* Pět vyšších vzácností výbavy (server: gamedata/content.py HIGH_RARITIES). Barvy podle ikon v output/equipment-assets/design.txt:
   mýtický červená, prastarý tyrkysová, artefakt růžová, nebeský zlatá, božský duhová. */
.r-myticky { color: #ff5a4d; text-shadow: 0 0 6px #ff3b3b88; }
.r-prastary { color: #36e6d4; text-shadow: 0 0 6px #22d6c388; }
.r-artefaktovy { color: #ff7ad6; text-shadow: 0 0 6px #ff4fc588; }
.r-nebesky { color: #ffe066; text-shadow: 0 0 7px #ffd84aaa; }
.r-bozsky { color: #f4f9ff; background: linear-gradient(90deg, #ff9ad5, #ffe27a, #8ff7d6, #9ec8ff, #d9a6ff); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 0 4px #ffffff66); }
/* Rámečky ikon v inventáři a výbavě: výraznější záře u vyšších vzácností. */
:is(.eq-cell, .inv-cell, .slot, .rd10-slot, .rd10-cell, .item-icon).r-myticky { border-color: #ff5a4d; box-shadow: inset 0 0 10px #ff3b3b55; }
:is(.eq-cell, .inv-cell, .slot, .rd10-slot, .rd10-cell, .item-icon).r-prastary { border-color: #36e6d4; box-shadow: inset 0 0 10px #22d6c355; }
:is(.eq-cell, .inv-cell, .slot, .rd10-slot, .rd10-cell, .item-icon).r-artefaktovy { border-color: #ff7ad6; box-shadow: inset 0 0 10px #ff4fc555; }
:is(.eq-cell, .inv-cell, .slot, .rd10-slot, .rd10-cell, .item-icon).r-nebesky { border-color: #ffe066; box-shadow: inset 0 0 12px #ffd84a66; }
:is(.eq-cell, .inv-cell, .slot, .rd10-slot, .rd10-cell, .item-icon).r-bozsky { border-color: #e8f4ff; box-shadow: inset 0 0 14px #c9b8ff77, 0 0 6px #ffe27a55;
  -webkit-text-fill-color: currentColor; background-clip: border-box; }
