/* Lobby face editor (V3): front preview beside the part choices, in the lobby's parchment style. */
.face-edit-open{position:absolute;z-index:3;right:6%;bottom:22%;display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0 18px;border:2px solid #d8ae5f;border-radius:999px;background:linear-gradient(#468257,#2c5a3b 60%,#244c31);color:#fff6df;font:800 15px/1 'Nunito Sans','Noto Sans Thai',Tahoma,sans-serif;text-shadow:0 1px 0 #183221;box-shadow:inset 0 1px #7fb08a,0 3px 0 #183221,0 6px 16px #0006;cursor:pointer}
.face-edit-open:hover{filter:brightness(1.08)}
.face-edit-open:focus-visible{outline:3px solid #f0c75e;outline-offset:2px}
#face-editor{box-sizing:border-box;width:min(980px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 16px);margin:auto;padding:0;border:0;background:transparent;color:#4a3526;font:14px/1.5 'Nunito Sans','Noto Sans Thai',Tahoma,sans-serif}
#face-editor[open]{display:block}
#face-editor::backdrop{background:radial-gradient(circle at 50% 40%,#1a1208a8,#05040ae0);backdrop-filter:blur(3px)}
#face-editor *,#face-editor *::before,#face-editor *::after{box-sizing:border-box}
#face-editor :where(button){font:inherit;color:inherit;cursor:pointer}
#face-editor button:disabled{cursor:default}
#face-editor :focus-visible{outline:3px solid #f0c75e;outline-offset:2px}
.face-frame{display:flex;flex-direction:column;max-height:calc(100dvh - 16px);border-radius:22px;background:radial-gradient(90% 60% at 50% 0,#fffaf0,transparent 70%),#f5e9d2;box-shadow:0 0 0 2px #b8955e,0 0 0 7px #2f5b3e,0 0 0 9px #c9a55a,0 28px 80px #000b;overflow:hidden}
.face-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px 10px;border-bottom:1px dashed #d8bf94}
.face-header small{font-size:11px;letter-spacing:.22em;color:#a2875f}
.face-header h2{margin:0;font-size:24px;font-weight:900;color:#2f5b3e;line-height:1.2}
.face-header p{margin:2px 0 0;color:#7b6450;font-size:13px}
#face-close{display:grid;place-items:center;width:42px;height:42px;padding:0;border:3px solid #e9dcc0;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fffdf6,#ece2cc);color:#3b3024;font-size:26px;line-height:1;box-shadow:0 3px 0 #1a3323}
.face-body{display:grid;grid-template-columns:minmax(260px,400px) minmax(0,1fr);gap:16px;min-height:0;overflow:auto;padding:14px 16px}
.face-stage{display:flex;flex-direction:column;align-items:center;gap:8px}
#face-preview{display:block;width:100%;max-width:400px;height:auto;aspect-ratio:420/560;border:2px solid #d4b47e;border-radius:18px;background:#f3e3c2}
.face-zoom{display:flex;gap:6px;padding:4px;border-radius:14px;background:#e8d7b6}
.face-zoom button{min-height:34px;padding:0 16px;border:0;border-radius:10px;background:transparent;color:#6b4f35;font-weight:800}
.face-zoom button[aria-pressed=true]{background:linear-gradient(#468257,#2c5a3b);color:#fff6df}
.face-options{display:flex;flex-direction:column;gap:10px;min-width:0}
.face-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.face-tab{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:58px;padding:6px 4px;border:1px solid #dcc3a2;border-radius:12px;background:#fffaf1;color:#6b4f35;font-weight:800;font-size:13px}
.face-tab[aria-selected=true]{border-color:#d3a970;background:linear-gradient(#fffaf0,#fcecc4);box-shadow:0 0 0 2px #f6d57c}
.face-tab-glyph{font-size:18px;line-height:1}
.face-panel{display:flex;flex-direction:column;gap:12px;min-height:180px}
.face-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}
.face-choice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 8px;border:2px solid #e0c9a3;border-radius:14px;background:linear-gradient(#fffdf7,#f8ecd5);box-shadow:0 3px 0 #dfc59c;font-weight:800;font-size:13px;transition:transform .12s,border-color .12s}
.face-choice:hover{transform:translateY(-2px);border-color:#d3a970}
.face-choice[aria-pressed=true]{border-color:#e2a93a;background:linear-gradient(#fffaf0,#fcecc4);box-shadow:0 0 0 3px #f6d57c,0 3px 0 #d6a64a}
.face-choice-art{display:grid;place-items:center;width:72px;height:72px;border-radius:12px;background:#f3d6c1}
.face-choice-art canvas{width:72px;height:72px}
.face-glyph{font-size:24px;color:#8b7358}
.face-swatch-row h4{margin:0 0 6px;font-size:14px;color:#6b4f35}
.face-swatches{display:flex;flex-wrap:wrap;gap:10px}
.face-swatch{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:64px;padding:6px;border:2px solid transparent;border-radius:12px;background:transparent;font-size:12px;font-weight:700}
.face-swatch::before{content:'';width:40px;height:40px;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 3px #fff8,0 0 0 1px #c9a86f}
.face-swatch[aria-pressed=true]{border-color:#e2a93a;background:#fcecc4}
.face-note{margin:auto 0 0;padding:8px 12px;border-radius:10px;background:#efe3cb;color:#6d5a47;font-size:12.5px}
.face-footer{display:flex;align-items:center;gap:10px;padding:10px 16px;border-top:1px dashed #d8bf94;background:#efe0c2}
.face-status{flex:1;min-width:0;margin:0;color:#5f4a37;font-size:13px;font-weight:700}
.face-status.bad{color:#a2402e}
.face-primary{min-height:46px;padding:6px 24px;border:2px solid #d8ae5f;border-radius:14px;background:linear-gradient(#468257,#2c5a3b 60%,#244c31);color:#fff6df;font-size:16px;font-weight:900;text-shadow:0 2px 0 #183221;box-shadow:inset 0 1px #7fb08a,0 4px 0 #183221}
.face-primary:disabled{border-color:#cbb99b;background:#ddd0bb;color:#8b7a6a;text-shadow:none;box-shadow:none}
.face-secondary{min-height:42px;padding:0 14px;border:1px solid #cfae79;border-radius:12px;background:#fff7e8;color:#6b4f35;font-weight:800}
.face-secondary:disabled{opacity:.55}
@media (max-width:760px){.face-body{grid-template-columns:minmax(0,1fr)}#face-preview{max-width:260px}.face-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.face-footer{flex-wrap:wrap}.face-status{flex-basis:100%}}
@media (max-height:520px) and (min-width:700px){.face-header{padding:6px 14px}.face-header h2{font-size:18px}.face-header p{display:none}.face-body{grid-template-columns:minmax(200px,260px) minmax(0,1fr);padding:8px 12px}#face-preview{max-height:calc(100dvh - 190px);width:auto}.face-tab{min-height:44px;font-size:12px}.face-choice-art,.face-choice-art canvas{width:52px;height:52px}.face-note{display:none}.face-footer{padding:6px 12px}.face-primary{min-height:38px;font-size:14px}.face-secondary{min-height:36px}}
