/* Home chrome is laid out in two independent columns. Cards use normal flow,
   so longer task text or a full showcase can never cover the next card. */
:root{--home-edge:28px;--home-top:25px;--home-left-width:237px;--home-right-width:220px;--home-stack-top:128px;--home-stack-bottom:140px}
.hud.compact-hud{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:16px;top:var(--home-top);left:var(--home-edge);right:var(--home-edge)}
.compact-hud>.player-card{grid-column:1;justify-self:start;width:var(--home-left-width);min-width:0}
.compact-hud>.hud-center{grid-column:2;margin:0;justify-self:center}
.compact-hud .player-card>span:last-child{min-width:0}
.home-left-stack{position:absolute;top:var(--home-stack-top);bottom:var(--home-stack-bottom);left:calc(var(--home-edge) - 4px);width:calc(var(--home-left-width) + 8px);padding:4px;display:flex;flex-direction:column;gap:16px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9ebc92 transparent;pointer-events:auto}
.home-left-stack>.quest-tracker,.home-left-stack>.home-showcase{position:relative;inset:auto;width:100%;min-height:0;max-height:none;flex:0 0 auto;display:block;margin:0;overflow:visible;box-sizing:border-box}
.home-left-stack>.quest-tracker{padding:15px}.home-left-stack>.home-showcase{padding:12px}
.home-left-stack .quest-tracker h3{overflow-wrap:anywhere;line-height:1.7}
.home-left-stack .quest-tracker button{max-width:100%;white-space:normal}
.home-left-stack .showcase-title{gap:8px}.home-left-stack .showcase-title>span{white-space:nowrap}
.home-left-stack .display-mini{width:100%;min-width:0}.home-left-stack .display-mini>span{min-width:0;flex:1}.home-left-stack .display-mini b{max-width:100%}
.home-right-stack{position:absolute;top:var(--home-top);right:var(--home-edge);width:var(--home-right-width);display:flex;flex-direction:column;gap:12px;pointer-events:auto}
.world-status{width:100%;aspect-ratio:1;display:flex;flex-direction:column;gap:10px;padding:14px;box-sizing:border-box;min-height:0}
.status-time{display:flex;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid #b6cfa9;flex-shrink:0}
.status-time .sun-symbol{font-size:26px;line-height:1}.status-time .day-label{display:block;font-size:14px;letter-spacing:1px}.status-time small{display:block;margin-top:4px;color:#718966;font-size:9px;letter-spacing:.5px}
.status-map{display:flex;flex:1;min-height:0;flex-direction:column;gap:6px}
.status-map .map-title{margin:0;letter-spacing:1px;gap:6px;font-size:11px;flex-shrink:0}
.world-status .map-title button{--button-padding:0px;width:28px;min-width:28px;height:28px;min-height:28px;--button-radius:9px;flex-shrink:0}
.world-status .map-title .mail-entry{margin-left:auto;justify-content:center;position:relative}
.world-status .mail-entry svg{width:17px;height:17px;display:block}
.world-status .mail-entry .mail-dot{width:6px;height:6px;top:2px;right:2px;box-shadow:0 0 0 1px #f8e5be}
.status-map .minimap{width:100%;height:auto;min-height:0;flex:1;border-radius:9px}
.status-map .map-caption{display:block;margin:0;font-size:8px;line-height:1.4;flex-shrink:0}
.home-right-stack .money-card{position:relative;inset:auto;width:100%;padding:11px 14px;gap:8px;min-height:43px;box-sizing:border-box;border-radius:13px;font-size:16px}
.home-right-stack .money-card strong{font-weight:600;font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere}.home-right-stack .money-card>span{font-size:11px;flex-shrink:0}
.account-section-title{font-size:14px;margin:22px 0 12px;padding-top:14px;border-top:1px solid #c3d8b8;color:#496d40}
.account-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.account-shortcuts button{min-width:0;white-space:normal;font-size:12px}
@media(max-width:1000px) and (min-width:701px){:root{--home-edge:20px;--home-left-width:210px;--home-right-width:190px}.compact-hud .hud-center h1{font-size:25px;letter-spacing:6px}.compact-hud .hud-center p{font-size:9px;letter-spacing:1px}.status-time .day-label{font-size:13px}.world-status{padding:12px;gap:8px}.status-time{padding-bottom:8px}.status-map{gap:5px}.status-map .map-caption{font-size:7px}}
@media(max-width:700px){
  :root{--home-edge:12px;--home-top:12px;--home-left-width:clamp(136px,calc(50vw - 25px),176px);--home-right-width:clamp(136px,calc(50vw - 25px),176px);--home-stack-top:104px;--home-stack-bottom:214px}
  .hud.compact-hud{display:flex;gap:0}.compact-hud>.player-card{--button-padding:8px;gap:6px;align-items:center;min-height:66px}.compact-hud>.hud-center{display:none}
  .compact-hud .pixel-portrait{width:34px;height:40px;flex-shrink:0}.compact-hud .player-name{font-size:11px;letter-spacing:1px}.compact-hud .player-name small{font-size:8px;margin-left:3px}.compact-hud .xp-track{width:100%;max-width:89px}.compact-hud .hud-sub{display:block;font-size:8px;line-height:1.6;overflow-wrap:anywhere}
  .home-left-stack{gap:12px}.home-left-stack>.quest-tracker{padding:11px}.home-left-stack>.home-showcase{padding:9px}
  .home-left-stack .quest-tracker h3{font-size:11px;letter-spacing:.5px}.home-left-stack .quest-tracker p{font-size:10px;line-height:1.8;margin:7px 0}.home-left-stack .quest-tracker button{font-size:10px;--button-padding:7px 8px}.home-left-stack .quest-tracker .hint{display:none}
  .home-left-stack .showcase-title{font-size:10px}.home-left-stack .showcase-title button{font-size:9px;--button-padding:4px 6px;min-height:28px}.home-left-stack .showcase-empty{font-size:10px;--button-padding:9px 7px;min-height:36px;text-align:left}
  .home-left-stack .display-mini{--button-padding:6px;gap:6px}.home-left-stack .display-mini canvas{width:32px;height:32px}.home-left-stack .display-mini b{font-size:9px}.home-left-stack .display-mini small,.home-left-stack .display-mini em{font-size:8px}
  .home-right-stack{gap:8px}.world-status{padding:10px;gap:7px;border-radius:15px}.status-time{gap:7px;padding-bottom:7px}.status-time .sun-symbol{font-size:21px}.status-time .day-label{font-size:11px;letter-spacing:.5px}.status-time small{font-size:8px;letter-spacing:0;margin-top:3px}
  .status-map{gap:4px}.status-map .map-title{font-size:10px;letter-spacing:.5px}.world-status .map-title button{width:25px;min-width:25px;height:25px;min-height:25px;--button-radius:8px}.status-map .map-caption{display:none}
  .home-right-stack .money-card{min-height:35px;padding:7px 11px;font-size:13px;border-radius:11px}.home-right-stack .money-card>span{font-size:10px}
}
@media(max-width:380px){:root{--home-edge:10px;--home-left-width:calc(50vw - 22px);--home-right-width:calc(50vw - 22px)}.compact-hud .pixel-portrait{width:29px;height:36px}.compact-hud>.player-card{--button-padding:7px;gap:5px}.compact-hud .player-name{font-size:10px}.home-left-stack>.quest-tracker{padding:9px}.home-left-stack .quest-tracker button{--button-padding:7px 6px;font-size:9px}.home-left-stack .task-center-link{font-size:9px}.status-time .sun-symbol{font-size:19px}.status-time .day-label{font-size:10px}.status-time small{font-size:7px}.world-status{padding:8px}.home-left-stack .showcase-title{font-size:9px;gap:4px}}
@media(max-height:600px) and (min-width:701px){:root{--home-top:14px;--home-stack-top:108px;--home-stack-bottom:110px;--home-left-width:210px;--home-right-width:174px}.world-status{padding:10px;gap:6px}.status-time{padding-bottom:6px}.status-map .map-caption{display:none}.home-left-stack{gap:12px}.home-left-stack>.quest-tracker{padding:11px}.home-left-stack .quest-tracker p{font-size:10px}.home-left-stack .quest-tracker .hint{display:none}.home-right-stack{gap:8px}.home-right-stack .money-card{padding:7px 11px;min-height:35px;font-size:13px}}
@media(max-height:500px) and (max-width:700px){:root{--home-top:8px;--home-stack-top:86px;--home-stack-bottom:214px;--home-right-width:132px}.home-left-stack{gap:9px}.home-left-stack>.quest-tracker{padding:9px}.home-left-stack .quest-tracker p{font-size:9px}.home-left-stack .quest-tracker button{font-size:9px;--button-padding:6px;min-height:30px}.world-status{padding:8px}.status-time{padding-bottom:5px}.status-time small{display:none}.status-time .day-label{font-size:10px}.status-map .map-title{font-size:9px}.home-right-stack{gap:6px}.home-right-stack .money-card{min-height:30px;padding:5px 9px;font-size:12px}}
@media(max-height:500px) and (max-width:700px) and (orientation:landscape){:root{--home-stack-bottom:90px}.dpad{left:calc(var(--home-edge) + var(--home-left-width) + 16px);bottom:99px;grid-template-columns:repeat(3,30px);grid-template-rows:repeat(3,30px)}.dpad button{min-width:30px;min-height:30px;width:30px;height:30px}}


.player-display-name{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
#rename-player-form{margin:16px 0}#rename-player-form input{width:100%;box-sizing:border-box}#player-name-status{min-height:1.5em}
