/* Account forms share the warm parchment used by character setup and settings. */
#account-dialog,#account-end{width:min(520px,92vw);max-height:94dvh;margin:auto;padding:clamp(20px,4vw,38px);color:#392a17;background:linear-gradient(120deg,#fff5d8,#e4c993);border:5px ridge #bf9957;border-radius:18px;box-shadow:0 18px 60px #0009;overflow:auto;text-align:left}
.account-panel h2{font:700 clamp(26px,4vw,38px) Georgia,serif;text-align:center;margin:6px 30px 22px}
.account-panel label{display:block;font-weight:700;margin:14px 0 6px}
.account-panel input{width:100%;box-sizing:border-box;background:#fffcf4;color:#392a17;border:2px solid #94713e;border-radius:8px;min-height:44px;padding:9px;font-size:18px}
.account-panel button{min-height:44px;padding:9px 14px;background:linear-gradient(#fff0c9,#d9b576);color:#392a17;border:2px solid #94713e;border-radius:9px;font-weight:700;cursor:pointer}
.account-panel button.primary{background:linear-gradient(#f4d68d,#c69b4c)}
.account-panel button:focus-visible,.account-panel input:focus-visible{outline:3px solid #784b14;outline-offset:3px}
.account-panel .close{position:absolute;right:10px;top:10px;font-size:26px}
.account-name-row{display:flex;gap:8px}.account-name-row input{min-width:0}.account-name-row button{flex:0 0 130px;font-size:14px}
.account-panel .note,.account-privacy{font-size:14px;line-height:1.45;color:#57452e}.account-privacy{border-top:1px solid #ad8b55;padding-top:12px;margin-bottom:0}
#account-submit{width:100%;margin-top:6px;font-size:18px}
#account-error,#account-end-error{color:#88291c;font-weight:600;line-height:1.4}
.account-end-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
#account-bar{display:flex;align-items:center;gap:10px;margin-left:auto;padding-left:10px;font-size:12px;color:#f6e7bd}
#account-bar button{padding:5px 12px;min-height:32px;border:1px solid #c7a76c;background:#173835;color:#fff2cb;border-radius:6px;cursor:pointer;font:600 13px system-ui}
.world-top .stars{margin-left:auto}
.start-menu #account-login,.start-menu #account-register{width:100%;margin-bottom:8px}
.start-menu #new-game{margin-top:5px}
@media(max-width:900px){#account-save-status{max-width:110px;line-height:1.15}#account-bar{gap:5px;padding-left:5px;font-size:10px}#account-bar button{font-size:11px;padding:4px 7px}.world-top{gap:6px}}
@media(max-height:500px){#account-dialog,#account-end{padding:16px 24px}.account-panel h2{margin-bottom:12px}.account-panel label{margin-top:8px}.account-panel .note,.account-privacy{font-size:12px;margin:6px 0}.account-panel input{min-height:38px;padding:6px}}

#account-bar{pointer-events:auto;flex:none}#account-dialog p,#account-end p{color:#57452e}#account-dialog[open],#account-end[open]{display:block}
@media(max-width:700px){#account-save-status{display:none}}

#account-dialog[open],#account-end[open]{top:calc(var(--view-top,0px) + var(--view-height,100dvh)/2);bottom:auto;transform:translateY(-50%);margin:0 auto;max-height:calc(var(--view-height,100dvh) - 24px)}

/* Normal saves take no header space. A network problem appears below the bar. */
#account-bar.save-warning #account-save-status{display:block;position:absolute;right:8px;top:calc(100% + 8px);width:max-content;max-width:min(320px,calc(100vw - 24px));padding:10px 14px;border:1px solid #c7a76c;border-radius:8px;background:#173835;color:#fff2cb;box-shadow:0 4px 16px #0005;font-size:14px;line-height:1.4;pointer-events:none}
