/* 05_mesto.css – Živé město, cech dobrodruhů, domov, čekání na akce.
   Sloučeno z: 15_zive_mesto.css, 16_cech_dobrodruhu.css, 17_cech_zalozky_zkouska_zakazky.css, 18_domov.css, 19_cekani_na_akci_a_cooldowny.css (pořadí zachováno). */

/* ===== 15_zive_mesto.css ===== */
/* RD06 inner content only; the shared game shell remains authoritative. */
body:not([data-mobile="true"]) #center:has(> #tab-loc:not(.hidden) > .town-screen),
body[data-mobile="true"][data-mp="game"] #center:has(> #tab-loc:not(.hidden) > .town-screen) {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
#center > #tab-loc:not(.hidden):has(> .town-screen) {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden;
}
#tab-loc:not(.hidden) > .town-screen { flex: 1 1 auto; }
.town-screen { height: 100%; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; box-sizing: border-box; overflow: hidden; container: city / size; color: #eee3ce; background: #0b151eee; }
.town-screen * { box-sizing: border-box; }
.town-screen h2, .town-screen h3, .town-screen p { margin: 0; }
.town-screen h2 { font-size: var(--fs-xl); color: #efcf83; }
.town-screen h3 { font-size: var(--fs-l); color: #edce8f; }
.town-screen .btn { min-height: 44px; min-width: 44px; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; }
.town-screen .btn:disabled { opacity: .5; }
.town-screen .btn:focus-visible, .town-screen summary:focus-visible { outline: 2px solid #70e5f2; outline-offset: -3px; }
.town-screen .city-icon { display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; vertical-align: middle; filter: invert(85%) sepia(35%) saturate(430%); }
.town-screen .city-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; min-height: 52px; padding-bottom: 5px; border-bottom: 1px solid #9a7840; }
.town-screen .city-heading > div { min-width: 0; }
.town-screen .city-heading p { font-size: var(--fs-m); margin-top: 3px; }
.town-screen .city-heading > .btn { flex: 0 0 auto; }
.town-screen .city-footer { display: flex; gap: 8px; flex: 0 0 auto; }
.town-screen .city-footer > .btn { flex: 1; min-width: 0; }
.town-screen .city-fast-actions .btn { min-height: 54px; font-size: var(--fs-l); }
.town-screen .city-access .btn { font-size: var(--fs-m); }
.town-screen .city-overview-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 28%); gap: 9px; flex: 1; min-height: 0; }
.town-screen .city-scene { min-width: 0; min-height: 0; position: relative; overflow: hidden; border: 1px solid #ac8749; }
.town-screen .city-scene-art { width: 100%; height: 100%; object-fit: cover; object-position: center; image-rendering: auto; display: block; }
.town-screen .city-scene-links { position: absolute; inset: auto 8px 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.town-screen .city-scene-links .btn { font-size: var(--fs-m); }
.town-screen .city-paths { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.town-screen .city-exit-list { display: grid; align-content: start; gap: 8px; min-height: 0; flex: 1; }
.town-screen .city-exit-list .btn { min-height: 60px; font-size: var(--fs-m); text-align: left; justify-content: flex-start; }
.town-screen .city-narrative { flex: 0 1 70px; min-height: 35px; padding: 9px 13px; border: 1px solid #8c703f; font-size: var(--fs-l); line-height: 1.3; font-style: italic; overflow: auto; overscroll-behavior: contain; }
.town-screen .city-service-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(44px, 1fr); gap: 9px; }
.town-screen .city-service-grid .btn { justify-content: flex-start; text-align: left; font-size: var(--fs-l); }
.town-screen .city-pager { display: flex; justify-content: center; align-items: center; gap: 13px; flex: 0 0 44px; min-height: 44px; }
.town-screen .city-pager .btn { font-size: 0; padding: 8px; width: 44px; flex: 0 0 44px; }
.town-screen .city-next .city-icon { transform: rotate(180deg); }
.town-screen .city-reader { min-height: 0; overflow: auto; overscroll-behavior: contain; line-height: 1.35; }
.town-screen > .city-reader { flex: 1; }
.town-screen .city-reader p + p { margin-top: 8px; }
.town-screen .city-note { flex: 0 0 auto; font-size: var(--fs-s); line-height: 1.25; }
.town-screen details.city-note { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.town-screen details.city-note > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 5px 8px; border: 1px solid #6f613f; }
.town-screen details.city-note[open] > .city-reader { position: absolute; z-index: 8; bottom: 100%; left: 0; right: 0; max-height: min(230px, 55cqh); background: #101c29; border: 1px solid #c7a365; padding: 12px; box-shadow: 0 4px 16px #000; }
.town-screen .city-empty { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; text-align: center; }
.town-screen .city-legacy-service, .town-screen .city-legacy-activity { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; } /* Internal redesign belongs to home/guildhall/raid/arena cards. */
.town-screen .character-art { position: relative; overflow: hidden; min-width: 0; min-height: 0; container-type: size; background: #101922; }
.town-screen .character-art > span { position: absolute; width: max(100cqw, 75cqh); height: max(133.3333cqw, 100cqh); left: 50%; top: 12%; transform: translate(-50%, -12%); background-image: var(--portrait-image); background-size: 400% 200%; background-position: var(--portrait-x) var(--portrait-y); image-rendering: auto; }
.town-screen .character-art > img, .town-screen .city-portrait-fallback { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.town-screen .city-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: 1; min-height: 0; }
.town-screen .city-person { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 8px; border: 1px solid #8c703f; min-height: 0; }
.town-screen .city-person > div:last-child { overflow: auto; min-height: 0; overflow-wrap: anywhere; }
.town-screen .city-bubble { color: #91e7ef; font-style: italic; }
.town-screen .emote-bar { display: flex; flex: 0 0 auto; gap: 4px; flex-wrap: wrap; }
.town-screen .emote-bar .btn { padding: 4px; }
body[data-mobile='true'] .town-screen { padding: 6px; gap: 6px; }
body[data-mobile='true'] .town-screen h2 { font-size: var(--fs-l); }
body[data-mobile='true'] .town-screen .city-heading p { font-size: var(--fs-s); }
body[data-mobile='true'] .town-screen .city-heading > .btn { font-size: 0; padding: 6px; }
body[data-mobile='true'] .town-screen .city-overview-main { display: block; }
body[data-mobile='true'] .town-screen .city-scene { height: 100%; }
body[data-mobile='true'] .town-screen .city-scene-art[src='assets/ui/city-dun-kharag.png'] { object-position: 70% center; }
body[data-mobile='true'] .town-screen .city-paths { display: none; }
body[data-mobile='true'] .town-screen .city-scene-links { grid-template-columns: 1fr; inset: auto 6px 6px auto; max-width: 65%; gap: 4px; }
body[data-mobile='true'] .town-screen .city-scene-links .btn { min-height: 44px; font-size: var(--fs-s); padding: 4px 7px; }
body[data-mobile='true'] .town-screen .city-fast-actions .btn { flex-direction: column; font-size: var(--fs-m); padding: 4px; }
body[data-mobile='true'] .town-screen .city-narrative { font-size: var(--fs-m); flex-basis: 84px; padding: 6px 8px; }
body[data-mobile='true'] .town-screen .city-access { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
body[data-mobile='true'] .town-screen .city-service-grid .btn { font-size: var(--fs-m); }
body[data-mobile='true'] .town-screen .city-people { grid-template-columns: 1fr; }
body[data-mobile='true'] .town-screen .emote-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
@container city (max-height: 370px) {
  #tab-loc .town-screen .city-heading { min-height: 44px; padding: 0; }
  #tab-loc .town-screen .city-heading h2 { font-size: var(--fs-l); }
  #tab-loc .town-screen .city-heading p { display: none; }
  #tab-loc .town-screen .city-fast-actions .btn { min-height: 44px; font-size: var(--fs-s); }
  #tab-loc .town-screen .city-service-grid .btn { font-size: var(--fs-m); }
  #tab-loc .town-screen .city-scene-links { display: none; }
  #tab-loc .town-screen .city-narrative { font-size: var(--fs-m); }
  #tab-loc .town-screen .city-note { font-size: var(--fs-s); }
}
@media (max-height: 500px) and (orientation: landscape) {
  body[data-mobile='true'] .town-screen[data-city-panel='overview'] { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 44px minmax(0, 1fr) 44px; gap: 4px 8px; padding: 4px; }
  body[data-mobile='true'] .town-screen[data-city-panel='overview'] > .city-heading { grid-column: 1 / -1; }
  body[data-mobile='true'] .town-screen[data-city-panel='overview'] .city-narrative { min-height: 0; }
  body[data-mobile='true'] .town-screen .city-fast-actions .btn { flex-direction: row; }
  body[data-mobile='true'] .town-screen .city-fast-actions .city-icon { display: none; }
  body[data-mobile='true'] .town-screen .city-access { display: flex; gap: 3px; }
  body[data-mobile='true'] .town-screen .city-access .btn { font-size: var(--fs-s); padding: 3px; }
  body[data-mobile='true'] .town-screen .city-access .city-icon { display: none; }
  body[data-mobile='true'] .town-screen[data-city-panel='people'] { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 44px minmax(0, 1fr) 44px; }
  body[data-mobile='true'] .town-screen[data-city-panel='people'] > .city-heading { grid-column: 1 / -1; }
  body[data-mobile='true'] .town-screen[data-city-panel='people'] .emote-bar { grid-template-columns: repeat(4, 1fr); grid-row: 2; grid-column: 2; }
}

/* ===== 16_cech_dobrodruhu.css ===== */
/* Guild service is bounded inside RD01 center. */
.town-screen .city-service { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; gap: 8px; }
.town-screen .adv-guild { border: 1px solid #a48147; padding: 9px; background: linear-gradient(#14212bee, #0a141e); }
.town-screen .adv-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; flex: 0 0 auto; }
.town-screen .adv-tabs .btn { font-size: var(--fs-m); }
.town-screen .adv-body { display: flex; flex-direction: column; gap: 9px; flex: 1; min-height: 0; }
.town-screen .adv-card-layout { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) minmax(90px, .45fr); gap: 12px; flex: 1; min-height: 0; }
.town-screen .adv-card { display: grid; grid-template-columns: minmax(90px, 36%) minmax(0, 1fr); border: 1px solid #b28f50; padding: 12px; gap: 12px; min-height: 0; }
.town-screen .adv-card > div:last-child { min-height: 0; overflow: auto; line-height: 1.4; }
.town-screen .adv-card p { margin-top: 8px; font-size: var(--fs-l); }
.town-screen .adv-card-stats { grid-column: 2; border: 1px solid #8f7548; display: flex; align-content: center; justify-content: space-around; flex-wrap: wrap; gap: 8px; padding: 12px; font-size: var(--fs-m); min-height: 0; overflow: auto; }
.town-screen .adv-reception { min-height: 0; display: grid; grid-template-columns: 25% minmax(0, 1fr); gap: 9px; border: 1px solid #8f7548; padding: 8px; font-size: var(--fs-m); }
.town-screen .adv-reception h3 { font-size: var(--fs-l); }
.town-screen .adv-progress { border: 1px solid #b28f50; padding: 14px; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.town-screen .adv-rank-change { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 8px; }
.town-screen .adv-rank-change b { font-size: var(--fs-xl); padding: 6px 14px; color: #efd07e; border: 2px solid #b28f50; background: #0b131a; }
.town-screen .adv-rank-change > span:last-child { flex-basis: 100%; text-align: center; }
.town-screen .adv-progress > p { font-size: var(--fs-m); }
.town-screen .adv-progress .bar { flex: 0 0 27px; height: 27px; }
.town-screen .adv-unregistered { display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; padding: 18px; justify-content: center; }
.town-screen .adv-unregistered .btn { align-self: center; }
body[data-mobile='true'] .town-screen .adv-guild { padding: 5px; gap: 6px; }
body[data-mobile='true'] .town-screen .adv-tabs { gap: 3px; }
body[data-mobile='true'] .town-screen .adv-tabs .btn { font-size: var(--fs-s); }
body[data-mobile='true'] .town-screen .adv-card-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto 70px auto; gap: 6px; }
body[data-mobile='true'] .town-screen .adv-card { padding: 8px; }
body[data-mobile='true'] .town-screen .adv-card p { font-size: var(--fs-m); margin-top: 4px; }
body[data-mobile='true'] .town-screen .adv-progress { padding: 8px; gap: 5px; }
body[data-mobile='true'] .town-screen .adv-progress h3 { font-size: var(--fs-l); }
body[data-mobile='true'] .town-screen .adv-progress p { font-size: var(--fs-s); }
body[data-mobile='true'] .town-screen .adv-rank-change b { font-size: var(--fs-xl); padding: 3px 10px; }
body[data-mobile='true'] .town-screen .adv-rank-change > span:last-child { flex-basis: auto; }
body[data-mobile='true'] .town-screen .adv-card-stats { grid-column: 1; padding: 6px; font-size: var(--fs-s); justify-content: space-between; }
body[data-mobile='true'] .town-screen .adv-reception { padding: 4px; font-size: var(--fs-s); grid-template-columns: 55px minmax(0, 1fr); }
body[data-mobile='true'] .town-screen .adv-reception h3 { font-size: var(--fs-m); }
@container city (max-height: 370px) {
  #tab-loc .town-screen .adv-guild { display: grid; grid-template-columns: minmax(150px, 28%) minmax(0, 1fr); grid-template-rows: 44px minmax(0, 1fr); padding: 4px; gap: 5px; }
  #tab-loc .town-screen .adv-guild > .city-heading { grid-column: 1; grid-row: 1; }
  #tab-loc .town-screen .adv-guild > .city-heading > .btn { font-size: 0; width: 44px; padding: 5px; }
  #tab-loc .town-screen .adv-tabs { grid-column: 2; grid-row: 1; }
  #tab-loc .town-screen .adv-tabs .btn { font-size: var(--fs-s); padding: 3px; }
  #tab-loc .town-screen .adv-body { grid-column: 1 / -1; grid-row: 2; gap: 4px; }
  #tab-loc .town-screen .adv-card-layout { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) 44px; gap: 6px; position: relative; }
  #tab-loc .town-screen .adv-card { padding: 5px; gap: 6px; }
  #tab-loc .town-screen .adv-card p { font-size: var(--fs-s); margin-top: 2px; }
  #tab-loc .town-screen .adv-card-stats { grid-column: 2; padding: 2px 5px; font-size: var(--fs-xs); gap: 4px; }
  #tab-loc .town-screen .adv-reception { grid-column: 1; grid-row: 2; font-size: var(--fs-xs); padding: 3px; grid-template-columns: 38px minmax(0, 1fr); }
  #tab-loc .town-screen .adv-reception h3 { font-size: var(--fs-s); }
  #tab-loc .town-screen .adv-progress { padding: 6px; gap: 4px; overflow: auto; }
  #tab-loc .town-screen .adv-progress h3 { font-size: var(--fs-m); }
  #tab-loc .town-screen .adv-progress p { font-size: var(--fs-s); }
  #tab-loc .town-screen .adv-rank-change b { font-size: var(--fs-l); padding: 2px 8px; }
  #tab-loc .town-screen .adv-rank-change > span:last-child { flex-basis: auto; font-size: var(--fs-s); }
}

/* ===== 17_cech_zalozky_zkouska_zakazky.css ===== */
.town-screen .adv-collection-tabs { display: none; }
.town-screen .adv-compact-note { display: none; }
.town-screen .adv-quests { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; flex: 1; min-height: 0; }
.town-screen .adv-quest-section { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 8px; padding: 10px; border: 1px solid #a48248; }
.town-screen .adv-quest-section > h3 { font-size: var(--fs-l); }
.town-screen .adv-quest-card { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 10px; }
.town-screen .adv-quest-card h3 { font-size: var(--fs-xl); }
.town-screen .adv-quest-card .city-reader { flex: 1; font-size: var(--fs-l); }
.town-screen .adv-quest-card .bar { flex: 0 0 23px; height: 23px; }
.town-screen .adv-reward { font-size: var(--fs-l); color: #e6ce91; }
.town-screen .adv-quest-card > .btn { flex: 0 0 auto; min-height: 50px; font-size: var(--fs-l); }
.town-screen .adv-exam { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; flex: 1; }
.town-screen .adv-exam-person { display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 12px; border: 1px solid #a48248; padding: 10px; min-height: 0; }
.town-screen .adv-exam-person > div:last-child { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.town-screen .adv-exam-person p { font-size: var(--fs-l); font-style: italic; }
.town-screen .adv-exam > section { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.town-screen .adv-exam > section > .adv-progress { flex: 1; }
.town-screen .adv-exam + .city-footer .btn { min-height: 54px; font-size: var(--fs-xl); }
.town-screen .adv-ranks-body { flex: 1; min-height: 0; }
.town-screen .adv-ranks { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-m); }
.town-screen .adv-ranks th, .town-screen .adv-ranks td { border: 1px solid #726142; padding: 10px 7px; overflow-wrap: anywhere; }
.town-screen .adv-ranks th:nth-child(2) { width: 27%; }
.town-screen .adv-ranks .cur { background: #62441a; }
.town-screen .adv-rank-detail { margin: 0; padding: 14px; border: 1px solid #aa874e; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; font-size: var(--fs-l); }
.town-screen .adv-rank-detail dd { margin: 0; color: #f2d48b; text-align: right; overflow-wrap: anywhere; }
body[data-mobile='true'] .town-screen .adv-collection-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
body[data-mobile='true'] .town-screen .adv-quests { display: flex; }
body[data-mobile='true'] .town-screen .adv-quest-section { display: none; flex: 1; padding: 7px; gap: 5px; }
body[data-mobile='true'] .town-screen .adv-quest-section.selected { display: flex; }
body[data-mobile='true'] .town-screen .adv-quest-section > h3 { font-size: var(--fs-m); }
body[data-mobile='true'] .town-screen .adv-quest-card { gap: 7px; }
body[data-mobile='true'] .town-screen .adv-quest-card h3 { font-size: var(--fs-l); }
body[data-mobile='true'] .town-screen .adv-quest-card .city-reader, body[data-mobile='true'] .town-screen .adv-reward { font-size: var(--fs-m); }
body[data-mobile='true'] .town-screen .adv-quest-card > .btn { min-height: 44px; font-size: var(--fs-l); }
body[data-mobile='true'] .town-screen .adv-exam { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 7px; }
body[data-mobile='true'] .town-screen .adv-exam-person { grid-template-columns: 32% minmax(0, 1fr); padding: 7px; }
body[data-mobile='true'] .town-screen .adv-exam-person h3 { font-size: var(--fs-l); }
body[data-mobile='true'] .town-screen .adv-exam-person p { font-size: var(--fs-m); }
body[data-mobile='true'] .town-screen .adv-exam + .city-footer .btn { min-height: 48px; font-size: var(--fs-l); }
@container city (max-height: 370px) {
  #tab-loc .town-screen .adv-quests { display: flex; }
  #tab-loc .town-screen .adv-quest-section { display: none; flex: 1; padding: 3px; gap: 3px; }
  #tab-loc .town-screen .adv-quest-section.selected { display: flex; }
  #tab-loc .town-screen .adv-quest-section > h3 { display: none; }
  #tab-loc .town-screen .adv-collection-tabs { display: flex; gap: 4px; }
  #tab-loc .town-screen .adv-guild:is([data-adv-tab='jobs'],[data-adv-tab='board']) .adv-body { display: grid; grid-template-columns: 145px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  #tab-loc .town-screen .adv-collection-tabs { flex-direction: column; }
  #tab-loc .town-screen .adv-body > p.city-note { display: none; }
  #tab-loc .town-screen .adv-compact-note { display: block; }
  #tab-loc .town-screen .adv-quest-card { display: grid; grid-template-columns: minmax(0, 1fr) 190px; grid-template-rows: auto minmax(0, 1fr); gap: 3px 8px; }
  #tab-loc .town-screen .adv-quest-card h3 { font-size: var(--fs-m); grid-column: 1; grid-row: 1; }
  #tab-loc .town-screen .adv-quest-card .city-reader { font-size: var(--fs-s); grid-column: 1; grid-row: 2; }
  #tab-loc .town-screen .adv-quest-card > .bar { grid-column: 1; grid-row: 3; height: 18px; }
  #tab-loc .town-screen .adv-reward { grid-column: 2; grid-row: 1; font-size: var(--fs-s); }
  #tab-loc .town-screen .adv-quest-card > .btn { grid-column: 2; grid-row: 2 / 4; align-self: end; min-height: 44px; font-size: var(--fs-m); }
  #tab-loc .town-screen .adv-guild[data-adv-tab='exam'] .adv-body { display: grid; grid-template-columns: minmax(0, 1fr) 185px; }
  #tab-loc .town-screen .adv-exam { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 6px; }
  #tab-loc .town-screen .adv-exam-person { grid-template-columns: 27% minmax(0, 1fr); padding: 5px; gap: 5px; }
  #tab-loc .town-screen .adv-exam-person h3 { font-size: var(--fs-m); }
  #tab-loc .town-screen .adv-exam-person p { font-size: var(--fs-s); }
  #tab-loc .town-screen .adv-exam > section { gap: 4px; font-size: var(--fs-s); }
  #tab-loc .town-screen .adv-exam + .city-footer { align-self: end; }
  #tab-loc .town-screen .adv-exam + .city-footer .btn { min-height: 44px; font-size: var(--fs-m); }
  #tab-loc .town-screen .adv-guild[data-adv-tab='ranks'] .adv-body { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) 44px; }
  #tab-loc .town-screen .adv-ranks-body { grid-column: 1 / -1; overflow: auto; }
  #tab-loc .town-screen .adv-rank-detail { grid-template-columns: repeat(3, auto minmax(0, 1fr)); padding: 5px; gap: 5px 8px; font-size: var(--fs-s); }
  #tab-loc .town-screen .adv-guild[data-adv-tab='ranks'] .city-note { min-width: 0; }
  #tab-loc .town-screen .adv-guild[data-adv-tab='ranks'] .city-note summary { padding: 3px; }
}

/* ===== 18_domov.css ===== */
/* RD19 personal home. Existing expedition CSS is independent. */
.rd19-home{--hg:#bd9654;display:flex;flex:1;flex-direction:column;gap:8px;height:100%;min-height:0;min-width:0;overflow:hidden;color:#f8eed7;font:var(--fs-l)/1.35 var(--font-ui);background:url('../assets/ui/foundation-stone.png') center/cover;container-type:size;container-name:personal-home}
.rd19-home *{box-sizing:border-box}.rd19-home [hidden]{display:none!important}.rd19-home h2,.rd19-home h3{margin:0;padding:0;border:0;color:#fff0cd;font-family:var(--font-display)}.rd19-home h2{font-size:var(--fs-xl)}.rd19-home h3{font-size:var(--fs-xl);line-height:1.15;overflow-wrap:anywhere}.rd19-home p{margin:8px 0}
.rd19-home .home-heading{display:flex;align-items:center;flex:0 0 48px;gap:8px;min-width:0}.rd19-home .home-heading h2{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.rd19-home .home-icon{width:30px;height:30px;display:inline-block;flex:0 0 30px;background:#e7bd73;mask:var(--home-icon) center/contain no-repeat}.rd19-home .home-tabs{display:flex;flex:0 0 46px;gap:4px}.rd19-home .home-tabs>.home-btn{flex:1;font-size:var(--fs-m);padding:5px}.rd19-home .home-content{display:flex;flex:1;min-height:0;min-width:0;overflow:hidden}.rd19-home .home-content>div,.rd19-home .home-content>section{flex:1}
.rd19-home .home-btn{appearance:none;display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:44px;padding:8px 12px;border:1px solid #a88751;border-radius:5px;background:linear-gradient(#293037,#10171b 55%,#17212b);box-shadow:inset 0 0 0 2px #0b0c0d,inset 0 3px #ffffff35;color:#fff0d0;font:700 var(--fs-l)/1.15 var(--font-ui);text-align:center;cursor:pointer;overflow-wrap:anywhere}.rd19-home .home-btn.is-primary,.rd19-home .home-btn[aria-pressed=true]{border-color:#f6cf73;background:linear-gradient(#aa741e,#593804 68%,#805216);box-shadow:inset 0 0 0 2px #4b2f0c,0 0 9px #ffba3b4a}.rd19-home .home-btn:disabled{opacity:.5;cursor:default}.rd19-home :is(button,input,textarea,select,[tabindex]):focus-visible{outline:2px solid #ffd985;outline-offset:-3px}
.rd19-home :is(input,select,textarea){width:100%;min-width:0;min-height:44px;margin:0;padding:7px 9px;border:1px solid var(--hg);border-radius:4px;background:#10191f;color:#f8efd9;font:var(--fs-m)/1.3 var(--font-ui)}.rd19-home textarea{resize:none}.rd19-home label{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:var(--fs-m)}
.rd19-home .home-card{display:flex;flex-direction:column;min-width:0;min-height:0;gap:10px;padding:13px;border:1px solid var(--hg);border-radius:8px;background:linear-gradient(130deg,#17212bef,#0a1119eb);overflow:hidden}.rd19-home .home-reader{flex:1 1 0;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;overflow-wrap:anywhere}.rd19-home .home-reader h3{font-size:var(--fs-l)}.rd19-home .home-actions{display:flex;gap:8px;flex:0 0 auto}.rd19-home .home-actions>.home-btn{flex:1;min-height:50px}.rd19-home .home-pager{display:flex;align-items:center;justify-content:space-between;flex:0 0 44px;min-width:0;gap:6px}.rd19-home .home-pager>.home-btn{font-size:var(--fs-m);padding:5px 8px}.rd19-home .home-pager output{white-space:nowrap;font-size:var(--fs-m)}
.rd19-home .home-scene{position:relative;display:flex;margin:0;min-width:0;min-height:0;overflow:hidden;border:1px solid var(--hg);border-radius:7px;background:#1d150c}.rd19-home .home-scene>img{width:100%;height:100%;object-fit:cover;object-position:center}.rd19-home .home-scene figcaption{position:absolute;left:0;bottom:0;right:0;padding:8px 12px;background:#110c07bb;font-size:var(--fs-l)}.rd19-home .home-room-layout{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-height:0}.rd19-home .home-metrics{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-block:1px solid #79623e}.rd19-home .home-metrics span{flex:1}.rd19-home .home-metrics b{display:block;font-size:var(--fs-xl)}.rd19-home .home-warning{color:#f4ba98}
.rd19-home .home-chest-layout{display:grid;grid-template-columns:minmax(0,.3fr) minmax(0,.3fr) minmax(0,.4fr);gap:10px;min-height:0}.rd19-home .home-item-list{padding:8px}.rd19-home .home-item-list h3{font-size:var(--fs-xl)}.rd19-home .home-item-rows{display:flex;flex-direction:column;gap:7px;min-height:0;flex:1}.rd19-home .home-item-rows>.home-btn{justify-content:flex-start;flex:1 1 0;max-height:105px;text-align:left;padding:7px}.rd19-home .home-item-rows b{display:block;font-size:var(--fs-l)}.rd19-home .home-item-rows small{display:block;color:#bfc4cc;font-size:var(--fs-m);font-weight:400}.rd19-home .home-item-art{width:58px;height:58px;object-fit:contain;flex:0 0 58px}.rd19-home .home-item-title{display:flex;align-items:center;gap:10px;min-width:0;flex:0 0 auto}.rd19-home .home-item-title>.home-item-art{width:78px;height:78px;flex-basis:78px}.rd19-home .home-source{display:flex;gap:5px}.rd19-home .home-source>.home-btn{flex:1}
.rd19-home .home-filter-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:10px;min-height:0;flex:1}.rd19-home .home-garden-layout{display:grid;grid-template-columns:minmax(0,.62fr) minmax(0,.38fr);gap:12px;min-height:0}.rd19-home .home-plots{display:flex;flex-direction:column;gap:9px;min-height:0}.rd19-home .home-plot-grid{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:minmax(0,1fr);gap:9px}.rd19-home .home-plot{align-items:center;text-align:center;justify-content:center}.rd19-home .home-seed-art{width:68px;height:68px;object-fit:contain;image-rendering:pixelated}.rd19-home .home-plot h3{font-size:var(--fs-l)}
.rd19-home .home-catalog{display:grid;grid-template-columns:minmax(0,.48fr) minmax(0,.52fr);gap:12px;min-height:0}.rd19-home .home-catalog-list{padding:10px}.rd19-home .home-furniture-art{display:block;width:64px;height:64px;flex:0 0 64px;object-fit:contain;font-size:var(--fs-xl);text-align:center}.rd19-home .home-catalog-detail>.home-furniture-art{width:110px;height:110px;flex-basis:110px;align-self:center;font-size:var(--fs-xl)}
.rd19-home .home-book-layout{display:grid;grid-template-columns:minmax(0,.4fr) minmax(0,.6fr);gap:12px;min-height:0}.rd19-home .home-book-records{display:flex;flex-direction:column;gap:7px;min-height:0;flex:1}.rd19-home .home-book-entry{border:1px solid #746244;border-radius:5px;padding:9px;margin-bottom:8px;background:#ffffff05}.rd19-home .home-book-entry header{display:flex;justify-content:space-between;gap:10px}.rd19-home .home-book-entry time{font-size:var(--fs-s);color:#c4c9ca}.rd19-home .home-message{display:flex;flex-direction:column;gap:7px;flex:0 0 192px;min-height:0}.rd19-home .home-message textarea{flex:1;min-height:44px}.rd19-home .home-message-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:var(--fs-s)}.rd19-home .home-message-meta output{white-space:nowrap}.rd19-home .home-guest{color:#b8f6ff;border:1px solid #56aabb;border-radius:4px;padding:4px 8px}
.rd19-home .home-neighbors-layout{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-height:0}.rd19-home .home-neighbors{display:flex;flex-direction:column;gap:8px;min-height:0}.rd19-home .home-neighbor-list{display:flex;flex-direction:column;gap:8px;min-height:0;flex:1}.rd19-home .home-neighbor-list>.home-card{flex:1;padding:10px;gap:5px}.rd19-home .home-neighbor-list p{margin:0;font-size:var(--fs-m)}
body[data-mobile=true] .rd19-home{gap:6px;font-size:var(--fs-m)}body[data-mobile=true] .rd19-home .home-heading{flex-basis:44px}body[data-mobile=true] .rd19-home h2{font-size:var(--fs-xl)}body[data-mobile=true] .rd19-home h3{font-size:var(--fs-xl)}body[data-mobile=true] .rd19-home .home-view{flex-direction:row;align-items:center;flex:0 0 44px}body[data-mobile=true] .rd19-home .home-view>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}body[data-mobile=true] .rd19-home .home-card{padding:10px;gap:7px}
body[data-mobile=true] .rd19-home .home-room-layout,body[data-mobile=true] .rd19-home .home-book-layout{display:flex;flex-direction:column}body[data-mobile=true] .rd19-home .home-scene{flex:0 0 112px}body[data-mobile=true] .rd19-home .home-scene figcaption{display:none}body[data-mobile=true] .rd19-home .home-room-copy,body[data-mobile=true] .rd19-home .home-book{flex:1}body[data-mobile=true] .rd19-home .home-room-copy>.home-actions{flex-direction:column}body[data-mobile=true] .rd19-home .home-room-copy>.home-actions>.home-btn{flex:0 0 auto}
body[data-mobile=true] .rd19-home .home-chest-layout{display:flex}body[data-mobile=true] .rd19-home .home-item-detail{flex:1}body[data-mobile=true] .rd19-home .home-item-title>.home-item-art{width:65px;height:65px;flex-basis:65px}body[data-mobile=true] .rd19-home .home-garden-layout{display:flex;flex-direction:column;gap:7px}body[data-mobile=true] .rd19-home .home-plots{flex:1;gap:5px}body[data-mobile=true] .rd19-home .home-plot-grid{display:flex;flex-direction:column;gap:5px}body[data-mobile=true] .rd19-home .home-plot{flex:1;flex-direction:row;justify-content:flex-start;text-align:left;gap:10px}body[data-mobile=true] .rd19-home .home-plot p{margin:2px 0}body[data-mobile=true] .rd19-home .home-seed-art{width:46px;height:46px}body[data-mobile=true] .rd19-home .home-plant{flex:0 0 160px}
body[data-mobile=true] .rd19-home .home-catalog{grid-template-columns:minmax(0,.42fr) minmax(0,.58fr);gap:6px}body[data-mobile=true] .rd19-home .home-catalog-list h3{font-size:var(--fs-l)}body[data-mobile=true] .rd19-home .home-catalog-list .home-item-rows>.home-btn{flex-direction:column;max-height:none;justify-content:center}body[data-mobile=true] .rd19-home .home-catalog-list .home-item-rows b{font-size:var(--fs-m)}body[data-mobile=true] .rd19-home .home-catalog-detail>.home-furniture-art{width:70px;height:70px;flex-basis:70px;font-size:var(--fs-xl)}body[data-mobile=true] .rd19-home .home-catalog-detail h3{font-size:var(--fs-l)}body[data-mobile=true] .rd19-home .home-catalog-list .home-pager{flex-wrap:wrap;flex-basis:auto}body[data-mobile=true] .rd19-home .home-catalog-list .home-pager output{order:-1;flex-basis:100%;text-align:center}body[data-mobile=true] .rd19-home .home-catalog-list .home-pager>.home-btn{flex:1;font-size:var(--fs-s);padding:4px}
body[data-mobile=true] .rd19-home .home-book-layout>.home-scene{flex-basis:75px}body[data-mobile=true] .rd19-home .home-message{flex-basis:164px}body[data-mobile=true] .rd19-home .home-message-meta small{font-size:var(--fs-xs)}body[data-mobile=true] .rd19-home .home-neighbors-layout{display:flex;flex-direction:column}body[data-mobile=true] .rd19-home .home-district{flex:0 0 125px}body[data-mobile=true] .rd19-home .home-neighbors{flex:1}
@container personal-home (max-height:360px){.rd19-home .home-room-layout>.home-scene{display:none}.rd19-home .home-room-layout{display:flex}.rd19-home .home-room-copy{flex:1}.rd19-home .home-catalog-detail>.home-furniture-art{display:none}.rd19-home .home-plot h3{font-size:var(--fs-l)}}
@container personal-home (min-width:471px) and (max-height:330px){
body[data-mobile=true] .rd19-home .home-card{padding:5px;gap:4px}body[data-mobile=true] .rd19-home .home-room-copy{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr)}body[data-mobile=true] .rd19-home .home-room-copy>.home-actions{grid-column:2;grid-row:1/3;justify-content:center}body[data-mobile=true] .rd19-home .home-room-copy h3{font-size:var(--fs-l)}
body[data-mobile=true] .rd19-home .home-chest-layout>.home-item-detail{display:grid;grid-template-columns:.42fr .58fr;grid-template-rows:44px minmax(0,1fr) 44px}body[data-mobile=true] .rd19-home .home-source{grid-column:1;grid-row:1}body[data-mobile=true] .rd19-home .home-item-title{grid-column:1;grid-row:2}body[data-mobile=true] .rd19-home .home-item-title h3{font-size:var(--fs-l)}body[data-mobile=true] .rd19-home .home-item-title>.home-item-art{width:36px;height:36px;flex-basis:36px}body[data-mobile=true] .rd19-home .home-item-detail>.home-reader{grid-column:2;grid-row:1/3}body[data-mobile=true] .rd19-home .home-item-detail>.home-pager{grid-column:1;grid-row:3}body[data-mobile=true] .rd19-home .home-item-detail>.home-actions{grid-column:2;grid-row:3}body[data-mobile=true] .rd19-home .home-actions>.home-btn{min-height:44px;padding:4px;font-size:var(--fs-m)}
body[data-mobile=true] .rd19-home .home-garden-layout{display:grid;grid-template-columns:1fr 1fr}body[data-mobile=true] .rd19-home .home-plots{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr) 44px;gap:4px}body[data-mobile=true] .rd19-home .home-plots>h3{display:none}body[data-mobile=true] .rd19-home .home-plot-grid{grid-column:1/3;grid-row:1}body[data-mobile=true] .rd19-home .home-plots>.home-pager{grid-column:1;grid-row:2}body[data-mobile=true] .rd19-home .home-plots>.home-btn{grid-column:2;grid-row:2;font-size:var(--fs-m)}body[data-mobile=true] .rd19-home .home-plant{flex:auto;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr) 44px}body[data-mobile=true] .rd19-home .home-plant>label{grid-column:1;grid-row:1;font-size:var(--fs-s)}body[data-mobile=true] .rd19-home .home-plant>.home-reader{grid-column:2;grid-row:1;font-size:var(--fs-m)}body[data-mobile=true] .rd19-home .home-plant>.home-btn{grid-column:1/3;grid-row:2}
body[data-mobile=true] .rd19-home .home-book-layout>.home-scene{display:none}body[data-mobile=true] .rd19-home .home-book{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr)}body[data-mobile=true] .rd19-home .home-book>h3{display:none}body[data-mobile=true] .rd19-home .home-message{flex:auto;gap:3px}body[data-mobile=true] .rd19-home .home-message-meta small{display:none}body[data-mobile=true] .rd19-home .home-message label{font-size:var(--fs-s)}body[data-mobile=true] .rd19-home .home-message-meta{position:absolute;right:12px;pointer-events:none}
body[data-mobile=true] .rd19-home .home-filter-fields{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}body[data-mobile=true] .rd19-home .home-filter-fields label{font-size:var(--fs-s)}body[data-mobile=true] .rd19-home .home-neighbors-layout{display:grid;grid-template-columns:.42fr .58fr}body[data-mobile=true] .rd19-home .home-neighbor-list>.home-card{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 44px}body[data-mobile=true] .rd19-home .home-neighbor-list .home-btn{grid-column:2;grid-row:1/3}
}
@media(min-width:471px) and (max-height:500px){body[data-mobile=true] .rd19-home{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:44px minmax(0,1fr);gap:5px 10px}body[data-mobile=true] .rd19-home>.home-heading{grid-column:1;grid-row:1}body[data-mobile=true] .rd19-home>.home-view{grid-column:2;grid-row:1}body[data-mobile=true] .rd19-home>.home-content{grid-column:1/3;grid-row:2}}
body[data-mobile=true][data-keyboard=true] .rd19-home[data-home-view=book]>.home-heading,body[data-mobile=true][data-keyboard=true] .rd19-home[data-home-view=book]>.home-view{display:none}body[data-mobile=true][data-keyboard=true] .rd19-home[data-home-view=book]{display:flex}body[data-mobile=true][data-keyboard=true] .rd19-home .home-book-layout>.home-scene,body[data-mobile=true][data-keyboard=true] .rd19-home .home-book-records,body[data-mobile=true][data-keyboard=true] .rd19-home .home-book>h3{display:none}body[data-mobile=true][data-keyboard=true] .rd19-home .home-book{display:flex;padding:3px}body[data-mobile=true][data-keyboard=true] .rd19-home .home-message{flex:1;min-height:0;gap:3px}body[data-mobile=true][data-keyboard=true] .rd19-home .home-message label,body[data-mobile=true][data-keyboard=true] .rd19-home .home-message-meta{display:none}

/* ===== 19_cekani_na_akci_a_cooldowny.css ===== */
/* ---------- čekání na akci a cooldowny ---------- */
.btn { position: relative; overflow: hidden; }
.btn.busy { cursor: progress; opacity: 1; color: #fff; border-color: #c8a040; }
.btn.busy::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--busy-from, 0%);
  background: linear-gradient(90deg, rgba(200,160,64,.25), rgba(255,208,112,.55)); box-shadow: 2px 0 6px #ffd070;
  animation: busyfill var(--busy-dur, 1s) linear forwards; pointer-events: none; }
@keyframes busyfill { from { width: var(--busy-from, 0%); } to { width: 100%; } }
.btn .cdbar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--cyan, #5fd7ff); box-shadow: 0 0 4px var(--cyan, #5fd7ff);
  transition: width .3s linear; pointer-events: none; }
.btn:disabled .cdbar { opacity: .9; }
