*{box-sizing:border-box}html,body,canvas{width:100%;height:100%;margin:0;overflow:hidden}body{color:#2a241d;-webkit-tap-highlight-color:transparent;background:#2b2926;font-family:Inter,ui-sans-serif,system-ui,Segoe UI,sans-serif}canvas{touch-action:none;-webkit-user-select:none;user-select:none;display:block}.hud-top,.hud-bottom{z-index:10;padding:8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));background:#f6f0e6ee;gap:8px;display:flex;position:fixed;left:0;right:0;box-shadow:0 1px 10px #0003}.hud-top{padding-top:max(8px, env(safe-area-inset-top));justify-content:space-between;align-items:center;top:0}.hud-title{flex-direction:column;min-width:0;font-size:15px;line-height:1.2;display:flex}.hud-badge{color:#8a5a3c;white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.hud-bottom{min-height:170px;padding-bottom:max(8px, env(safe-area-inset-bottom));flex-direction:column;bottom:0}body:not(.is-edit) .hud-bottom{min-height:0}body:not(.is-edit) .hud-detail,body:not(.is-edit) .hud-swatches,body:not(.is-edit) .hud-actions{display:none}body:not(.is-edit) .hud-status{color:#5d5247;font-size:13px;font-weight:500}.hud-status{font-size:14px;font-weight:600;line-height:1.3}.hud-status[data-state=valid]{color:#1f7a3e}.hud-status[data-state=invalid]{color:#b3261e}.hud-detail{color:#5d5247;min-height:16px;font-size:12px;line-height:1.3}.hud-swatches{gap:8px;min-height:44px;display:flex;overflow-x:auto}.hud-swatches.is-hidden{visibility:hidden}.swatch{background:var(--color);cursor:pointer;border:2px solid #fffaf2;border-radius:10px;flex:none;width:44px;height:44px;padding:0;box-shadow:0 0 0 1px #c9b8a2}.swatch[aria-checked=true]{box-shadow:0 0 0 3px #2f8a50}.hud-actions{grid-template-columns:1fr 1fr 1.4fr;gap:8px;margin-top:auto;display:grid}.hud-actions.is-hidden{visibility:hidden}.btn{min-height:44px;color:inherit;font:inherit;cursor:pointer;background:#fffaf2;border:1px solid #c9b8a2;border-radius:10px;padding:8px 12px;font-size:15px}.btn:hover:not(:disabled){border-color:#8a5a3c}.btn:disabled{cursor:not-allowed;opacity:.45}.btn-primary{color:#fff;background:#2f8a50;border-color:#2f7d4a;font-weight:600}.btn-mode{flex:none}.camera-controls{touch-action:manipulation;gap:8px;display:flex}.camera-controls .btn{flex:1;min-width:44px;font-size:14px}.camera-controls .btn[aria-pressed=true]{background:#e8ddcc;border-color:#8a5a3c}.btn-mode[aria-pressed=true]{background:#e3f1e6;border-color:#2f7d4a}@media (width>=900px){.hud-bottom{border-radius:14px;width:420px;bottom:16px;left:16px;right:auto}.hud-top{border-radius:14px;width:420px;top:16px;left:16px;right:auto}}.perf-overlay{top:calc(max(8px, env(safe-area-inset-top)) + 58px);z-index:20;color:#e8eef6;background:#0b1019e0;border-radius:8px;max-width:min(360px,100vw - 16px);padding:6px 8px;font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;position:fixed;right:8px}.perf-btn{color:#fff;font:inherit;background:#263247;border:1px solid #ffffff40;border-radius:6px;margin-top:4px;padding:4px 8px}.perf-result{color:#9fe3b4;margin-top:4px}.hud-top-right{flex:none;align-items:center;gap:6px;display:flex}.hud-history{gap:6px;display:flex}body:not(.is-edit) .hud-history,body:not(.is-edit) .hud-slot{display:none}.btn-icon{width:44px;padding:0;font-size:20px;line-height:1}.hud-slot{min-height:44px}.hud-swatches[hidden],.hud-shelf[hidden],.hud-inventory[hidden]{display:none}.hud-shelf{align-items:center;gap:8px;min-width:0;display:flex}.hud-tabs{background:#efe5d8;border-radius:22px;flex:none;padding:2px;display:flex}.tab{color:#6b5d50;min-height:40px;font:inherit;cursor:pointer;background:0 0;border:0;border-radius:20px;padding:0 12px;font-size:13px}.tab[aria-selected=true]{color:#2f2620;background:#fffaf2;font-weight:600;box-shadow:0 1px 2px #3c28142e}.hud-shelf .hud-inventory{scrollbar-width:none;flex:1;min-width:0;padding:0 10px;-webkit-mask-image:linear-gradient(90deg,#0000,#000 10px calc(100% - 14px),#0000);mask-image:linear-gradient(90deg,#0000,#000 10px calc(100% - 14px),#0000)}.hud-inventory{align-items:center;gap:8px;min-height:44px;display:flex;overflow-x:auto}.chip{min-height:44px;color:inherit;font:inherit;white-space:nowrap;cursor:pointer;background:#fffaf2;border:1px solid #c9b8a2;border-radius:22px;flex:none;padding:6px 12px;font-size:14px}.chip:hover{border-color:#8a5a3c}.hud-empty{color:#8a7b6c;font-size:13px}.hud-actions{grid-template-columns:.9fr 1fr 1fr 1.3fr}.loading-veil{z-index:50;color:#cdbfae;letter-spacing:.02em;background:#2b2926;place-items:center;font:500 15px/1.4 Inter,ui-sans-serif,system-ui,sans-serif;transition:opacity .25s;display:grid;position:fixed;inset:0}.loading-veil.is-done{opacity:0;pointer-events:none}.hud{display:contents}.hud-top{padding-top:max(8px, env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)))}.hud-bottom{padding-bottom:max(8px, env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom,0px))}.rotate-hint{display:none}@media (orientation:portrait) and (pointer:coarse) and (width<=600px){.hud-top{flex-wrap:wrap}.rotate-hint{color:#5d5247;background:#efe5d8;border-radius:10px;flex-basis:100%;justify-content:space-between;align-items:center;gap:8px;padding:2px 4px 0 10px;font-size:13px;display:flex}.rotate-hint-close{width:44px;height:36px;color:inherit;cursor:pointer;background:0 0;border:0;flex:none;font-size:20px}}@media (orientation:landscape) and (height<=540px){.hud{z-index:10;width:calc(clamp(260px, 36vw, 340px) + env(safe-area-inset-left));padding-left:max(env(safe-area-inset-left), var(--tg-safe-area-inset-left,0px));overscroll-behavior:contain;background:#f6f0e6f2;flex-direction:column;display:flex;position:fixed;top:0;bottom:0;left:0;overflow-y:auto;box-shadow:1px 0 10px #0003}.hud-top,.hud-bottom{width:auto;min-height:0;box-shadow:none;background:0 0;border-radius:0;padding-left:10px;padding-right:10px;position:static}.hud-top{flex-wrap:wrap;row-gap:6px}.hud-title{flex-basis:100%}.hud-top-right{flex:1;justify-content:space-between}.hud-bottom{flex:1;padding-top:0}.hud-actions{grid-template-columns:1fr 1fr}.perf-overlay{top:max(8px, env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)));right:max(8px, env(safe-area-inset-right))}}
