/* Lobby: quiet status bar, open walking space, one task shelf at a time.
   These rules follow the legacy town styles; illustration and world art are unchanged. */
.town-hud [hidden] {display:none!important}
.town-hud {padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));gap:0}
.town-hud .town-header {display:flex;align-items:center;justify-content:space-between;gap:12px}
.town-hud .town-header>.town-identity {padding:4px 12px;border-left:2px solid #b9a775;background:linear-gradient(90deg,#11170ecc,transparent)}
.town-hud .town-header h1 {margin:0;font-size:20px;line-height:1.4;color:#f1e4c6;text-shadow:0 2px 5px #000}
.town-hud .town-tools {display:flex;gap:10px;align-items:center;padding:0 0 0 12px;background:#11170ed9;border:1px solid #82755070;box-shadow:none}
.town-hud .town-tools .wallet {font-size:14px;white-space:nowrap;color:#efe0b7}
.town-hud .town-tools .wallet .game-icon {display:inline-block;width:22px;height:22px}
.town-hud .town-tools .icon-btn {width:48px;height:48px;min-width:48px;min-height:48px;border:0;border-left:1px solid #82755060;background:transparent}
.town-hud .town-dock {position:relative;width:min(680px,100%);max-width:680px;align-self:center;margin-top:auto;padding:0;border:1px solid #938157;border-bottom:1px solid #655c40;background:var(--ui-panel-surface,#182014);box-shadow:0 3px 18px #0009,inset 0 0 0 3px #c9ae6320;pointer-events:auto}
.town-hud .town-interaction {position:absolute;bottom:calc(100% + 10px);left:0;right:0;display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:32px;margin:0;pointer-events:none}
.town-hud .town-interaction>span {font-size:12px;line-height:1.5;padding:5px 8px;max-width:70%;background:#10170dd9;color:#dfd7bf;border-left:1px solid #a5905655}
.town-hud .town-interaction button {max-width:50%;min-height:48px;padding:8px 14px;font-size:14px;line-height:1.3;background:#263021f5;white-space:normal}
.town-hud .shelf-open .town-interaction {visibility:hidden}
.town-hud .town-departure {display:flex;flex-wrap:nowrap;gap:14px;align-items:center;padding:12px 14px}
.town-hud .town-departure>div {flex:1 1 0;min-width:0}
.town-hud .town-run-summary b {display:block;color:#f1e4c6;font-size:16px;line-height:1.4}
.town-hud .town-departure small {font-size:12px;line-height:1.5;color:#c6c4ae;margin-top:2px;word-break:keep-all}
.town-hud .town-departure>.btn-primary {min-width:166px;min-height:54px;margin:0;padding:10px 16px;font-size:16px;white-space:nowrap}
.town-hud .town-departure>.btn-primary span {padding-left:10px}
.town-hud .town-navigation {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #8b7b4d77;background:#10170cb5}
.town-hud .town-navigation>button {position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px 7px;min-width:0;min-height:58px;padding:8px 6px;border:0;border-right:1px solid #8b7b4d44;border-top:2px solid transparent;background:transparent;color:#d7d3bd;font-size:14px;line-height:1.3}
.town-hud .town-navigation>button:last-child {border-right:0}
.town-hud .town-navigation>button.selected {color:#f4e4b0;background:#85714325;border-top-color:#d4bb78}
.town-hud .town-navigation .game-icon {width:25px;height:25px}
.town-menu-badge {display:inline-block;font-size:12px;font-weight:600;line-height:1.4;padding:1px 5px;color:#eaddaa;background:#76724238;border:1px solid #b7a56c66;border-radius:2px;white-space:nowrap}
.town-hud .town-shelf {position:absolute;bottom:calc(100% + 8px);left:-1px;right:-1px;max-height:calc(100dvh - 245px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;background:var(--ui-panel-surface,#182014);border:1px solid #938157;box-shadow:0 3px 20px #000b,inset 0 0 0 3px #c9ae6320;scrollbar-width:thin;scrollbar-color:#8a7b56 #171c13}
.town-hud .town-shelf-head {position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 8px 3px 16px;background:#1b2017;border-bottom:1px solid #8b7b4d66}
.town-shelf-head h2 {font-size:18px;line-height:1.4;margin:0;color:#eee0b9}
.town-hud .town-shelf-head .icon-btn {width:48px;height:48px;min-width:48px;min-height:48px;background:transparent;border:0;font-size:28px}
.town-shelf-body {padding:12px 14px 16px}
.town-shelf-note,.town-hud .town-progress-line {display:block;margin:0 0 12px;padding:0;background:none;color:#c6c4ae;font-size:13px;line-height:1.65;word-break:keep-all;text-shadow:none}
.town-hud .town-action-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.town-hud .town-service-heading{margin:16px 0 8px;color:#cdbb8b;font-size:12px;font-weight:500;letter-spacing:.04em}
.town-hud .town-service-heading:first-of-type{margin-top:0}
.town-hud .town-action-grid>button {display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;min-height:68px;padding:10px;background:#11190dc7;border:1px solid #8b7b4d66;color:#ebdfc2;text-align:left;line-height:1.4;font-size:14px}
.town-hud .town-action-grid>button>.game-icon {width:32px;height:32px;flex:0 0 32px}
.town-action-grid>button>span {min-width:0}
.town-action-grid b {display:block;font-size:14px;font-weight:600}
.town-action-grid small {display:block;font-size:12px;line-height:1.5;color:#c0bda6;margin-top:3px;word-break:keep-all}
.town-hud .town-preparation {display:flex;flex-direction:column;align-items:stretch;gap:8px;max-height:none;overflow:visible;margin:12px 0;padding:10px 0;border-block:1px solid #8b7b4d44}
.town-loadout-tools {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;min-width:0}
.town-loadout-tools .town-relic-prep {display:contents}
.town-hud .town-relic-prep>span {display:flex;align-items:center;gap:3px;min-width:0;font-size:12px;line-height:1.4;white-space:nowrap;color:#d8cfb3}
.town-equipped-relic-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.town-hud .town-preparation .game-icon {width:20px;height:20px;flex-shrink:0}
.town-hud .town-card-link {display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:48px;padding:6px 8px;border:1px solid #9b895780;background:#4a50312e;color:#f0e0b7;font-size:14px;white-space:nowrap}
.town-hud .town-card-summary {font-size:12px;color:#b7b9a2;line-height:1.5}
.town-hud .town-version {display:block;text-align:left;font-size:12px;color:#a8ac98;margin:14px 0 0}
.town-hud .storage-note {margin:6px 12px;font-size:12px}
.town-hud button {touch-action:manipulation}
.town-hud button:focus-visible {outline:2px solid #ffdf8c;outline-offset:-3px}
.town-hud .town-navigation>button:active,.town-hud .town-action-grid>button:active {background:#796d3940}
@media(hover:hover) {
 .town-hud .town-navigation>button:hover,.town-hud .town-action-grid>button:hover {background:#6b643138;border-color:#c6af76}
}
@media(max-width:600px) {
 .town-hud {padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
 .town-hud .town-header {gap:8px}
 .town-hud .town-header>.town-identity {padding:4px 8px}
 .town-hud .town-header h1 {font-size:18px}
 .town-hud .town-tools {gap:6px;padding-left:8px}
 .town-hud .town-departure {gap:8px;padding:10px}
 .town-hud .town-departure>.btn-primary {min-width:144px;font-size:15px;padding:10px}
 .town-hud .town-departure>.btn-primary span {padding-left:4px}
 .town-hud .town-navigation>button {min-height:66px;gap:3px 5px;padding:8px 3px}
 .town-hud .town-navigation .game-icon {width:23px;height:23px}
 .town-hud .town-menu-badge {flex-basis:auto;font-size:12px}
 .town-hud .town-shelf {max-height:calc(100dvh - 240px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 .town-shelf-body {padding:10px}
 .town-hud .town-action-grid>button {gap:7px;padding:8px;min-height:72px}
 .town-hud .town-action-grid>button>.game-icon {width:28px;height:28px;flex-basis:28px}
 .town-loadout-tools {gap:5px}
 .town-hud .town-card-link {font-size:13px;padding:5px}
 .town-hud .town-preparation .game-icon {width:18px;height:18px}
 .town-hud .town-interaction>span {font-size:12px;max-width:68%}
}
@media(max-width:360px) {
 .town-hud .town-header h1 {font-size:16px}
 .town-hud .town-departure>.btn-primary {min-width:135px}
 .town-hud .town-navigation>button {flex-direction:column;gap:2px;font-size:13px;min-height:76px}
 .town-hud .town-loadout-tools {grid-template-columns:minmax(0,1fr) auto}
 .town-hud .town-relic-prep>span:first-child {grid-column:1/-1}
 .town-hud .town-shelf {max-height:calc(100dvh - 250px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}
@media(max-height:520px) and (min-width:601px) {
 .town-hud {padding:max(6px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 .town-hud .town-header h1 {font-size:18px}
 .town-hud .town-dock {width:min(520px,60%);align-self:flex-end}
 .town-hud .town-departure {padding:6px 10px}
 .town-hud .town-departure>.btn-primary {min-height:48px}
 .town-hud .town-navigation>button {min-height:48px;padding:5px}
 .town-hud .town-shelf {left:auto;right:calc(100% + 12px);bottom:-1px;width:min(320px,calc(100vw - min(520px,60vw) - 44px));min-width:0;max-height:calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 .town-hud .town-action-grid {grid-template-columns:1fr}
 .town-hud .town-loadout-tools {grid-template-columns:1fr auto}
 .town-hud .town-relic-prep>span:first-child {grid-column:1/-1}
 .town-hud .town-interaction>span {max-width:70%}
 .town-hud .town-progress-line,.town-hud .town-preparation {display:flex}
}

/* Approved proposal 04: gold lettering above a fine line, without a filled plate. */
.town-hud .town-departure>.departure-threshold {
 position:relative;display:flex;align-items:center;justify-content:center;gap:12px;
 flex:0 1 auto;max-width:66%;isolation:isolate;border:0;border-radius:0;
 color:#e4d1a1;background:radial-gradient(ellipse at center,#bfa06914,transparent 72%);
 box-shadow:none;text-shadow:0 1px 4px #000;font-family:Constantia,"Batang",Georgia,serif;
 font-weight:400;letter-spacing:.015em;line-height:1.35;white-space:normal;
 transition:color .14s,filter .14s,transform .1s;
}
.town-hud .town-departure>.departure-threshold::before,
.town-hud .town-departure>.departure-threshold::after {content:"";position:absolute;pointer-events:none}
.town-hud .town-departure>.departure-threshold::before {
 left:7px;right:7px;top:auto;bottom:7px;height:1px;border:0;opacity:1;
 background:linear-gradient(90deg,transparent,#8a7852 15%,#d8bc7c 50%,#8a7852 85%,transparent);
}
.town-hud .town-departure>.departure-threshold::after {
 left:50%;right:auto;top:auto;bottom:6px;width:3px;height:3px;border:0;
 transform:rotate(45deg);background:#ead59e;box-shadow:0 0 8px #c9af7950;
}
.town-hud .town-departure>.departure-threshold span {padding:0;position:relative;z-index:1}
.town-hud .departure-threshold .departure-label {min-width:0;overflow-wrap:break-word}
.town-hud .departure-threshold .departure-arrow {display:block;width:18px;height:18px;flex:0 0 18px;transition:transform .15s}
.town-hud .departure-arrow svg {display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.3}
.town-hud .town-departure>.departure-threshold:focus-visible {outline:2px solid #f1d398;outline-offset:3px}
.town-hud .town-departure>.departure-threshold:active:not(:disabled) {transform:translateY(1px);filter:brightness(.78);box-shadow:none}
.town-hud .town-departure>.departure-threshold:disabled {opacity:.38;filter:saturate(.1);transform:none;cursor:default;box-shadow:none}
@media(hover:hover){
 .town-hud .town-departure>.departure-threshold:hover:not(:disabled) {color:#fff1ce;background:radial-gradient(ellipse at center,#bfa06922,transparent 72%);box-shadow:none;transform:none}
 .town-hud .departure-threshold:hover:not(:disabled) .departure-arrow {transform:translateX(3px)}
 html[dir="rtl"] .town-hud .departure-threshold:hover:not(:disabled) .departure-arrow {transform:translateX(-3px)}
}
html[dir="rtl"] .town-hud .departure-arrow svg {transform:scaleX(-1)}
@media(max-width:600px){.town-hud .town-departure>.departure-threshold {gap:8px}}
@media(prefers-reduced-motion:reduce){.town-hud .departure-threshold,.town-hud .departure-arrow {transition:none}}

/* A compact wallet opens the production ledger without covering the village by default. */
.town-hud .town-wallet{pointer-events:auto}.town-hud .town-header>.town-identity{min-width:0}.town-hud .town-tools{flex:none}.town-wallet summary:focus-visible{outline:2px solid #f7dca0;outline-offset:2px}
.town-wallet{position:relative;align-self:stretch;display:grid;align-content:center}.town-wallet summary{list-style:none;cursor:pointer;padding:7px 9px;display:grid;gap:4px;min-width:70px;min-height:48px;color:#e7d7b2}.town-wallet summary::-webkit-details-marker{display:none}.town-wallet summary>span{display:flex;gap:7px;align-items:center;justify-content:space-between}.town-wallet summary .game-icon{width:22px;height:22px;flex:none}.town-wallet summary b{font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}.town-wallet[open] summary{background:#97855225}.town-wallet-ledger{position:absolute;top:calc(100% + 8px);right:-49px;width:min(280px,88vw);padding:18px;background:#151a12f5;border:1px solid #9d895966;box-shadow:0 12px 30px #0008;z-index:8}.town-wallet-ledger h2{font-size:19px;margin:0 0 12px}.town-wallet-ledger h3{font-size:14px;margin:18px 0 8px;color:#bfac81}.town-wallet-ledger p{font-size:13px;line-height:1.8;margin:0;color:#cabda0}.town-wallet-ledger ul{list-style:none;padding:0;margin:0}.town-wallet-ledger li{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;margin:8px 0;font-size:14px}.town-wallet-ledger .game-icon{width:28px;height:28px}.town-wallet-ledger b{font-weight:500;font-variant-numeric:tabular-nums}
