:root{
  font-family:"Trebuchet MS","Segoe UI",sans-serif;color:#eef3f6;font-synthesis:none;
  --glass:#141c22a8;--glass-solid:#161e24f2;--edge:#ffffff26;--muted:#aab6bf;--accent:#7fc35a;--ink:#0d1418
}
*{box-sizing:border-box}
body{margin:0;overflow:hidden;background:#2e86c8}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:focus-visible,canvas:focus-visible,input:focus-visible{outline:2px solid #ffd479;outline-offset:3px}
[hidden]{display:none!important}
#game,#world{position:fixed;inset:0;width:100%;height:100%}
#world{display:block;touch-action:none;outline:none}
.vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(120% 90% at 50% 45%,transparent 55%,#0a1c2a38)}

/* Dark glass panel shared by every piece of chrome. */
.chip{background:var(--glass);border:1px solid var(--edge);border-radius:12px;color:#fff;backdrop-filter:blur(7px);box-shadow:0 6px 20px #06121b38}
.chip svg{width:21px;height:21px;display:block}

.top-left{position:absolute;top:max(14px,env(safe-area-inset-top));left:14px;display:flex;gap:8px;z-index:7}
.top-left .chip{width:42px;height:42px;display:grid;place-items:center;padding:0}
.top-left .chip:hover{background:var(--glass-solid)}
.top-left .chip[aria-expanded=false]{color:#b9c4cc}
#sound.muted{color:#ff9d8a}
.top-left .x-link{text-decoration:none}
.top-left .x-link svg{width:17px;height:17px}

/* Photo: a white flash, then the framed picture in a popup. */
.photo-flash{position:fixed;inset:0;z-index:20;background:#fff;opacity:0;pointer-events:none}
.photo-flash.go{animation:flash .45s ease-out}
@keyframes flash{0%{opacity:.9}100%{opacity:0}}
.photo-dialog{width:auto;max-width:min(92vw,760px);max-height:94vh;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;overflow:visible}
.photo-dialog::backdrop{background:#0a1218c7;backdrop-filter:blur(4px)}
.photo-dialog[open]{display:flex;flex-direction:column;align-items:center;gap:16px;animation:photo-in .5s cubic-bezier(.2,.9,.3,1.2)}
@keyframes photo-in{0%{transform:translateY(30px) rotate(-6deg) scale(.85);opacity:0}100%{transform:rotate(-1.5deg);opacity:1}}
.photo-dialog img{display:block;max-width:100%;max-height:calc(94vh - 90px);height:auto;transform:rotate(-1.5deg)}
.photo-actions{display:flex;gap:10px;transform:rotate(1.5deg)}
.photo-actions .primary{width:auto;margin:0;padding:12px 22px;text-align:center;text-decoration:none;font-size:13px}
.photo-actions button{padding:12px 20px;border:1px solid var(--edge);border-radius:10px;background:var(--glass-solid);color:#fff;font-size:13px;font-weight:700}
.photo-actions button:hover{background:#26313a}

.chat{position:absolute;top:calc(max(14px,env(safe-area-inset-top)) + 52px);left:14px;width:min(368px,calc(100vw - 28px));display:flex;flex-direction:column;background:#0e161cb0;border:1px solid #ffffff1c;border-radius:10px;backdrop-filter:blur(7px);overflow:hidden;z-index:6}
.chat.collapsed{display:none}
/* Fixed height: new messages scroll inside it rather than growing the box over other buttons. */
.chat-log{flex:none;height:180px;overflow-y:auto;margin:0;padding:11px 12px;list-style:none;display:flex;flex-direction:column;gap:5px;font-size:12px;line-height:1.55;color:#e8eef3;text-shadow:0 1px 2px #00000060;scrollbar-width:thin;scrollbar-color:#ffffff33 transparent}
.chat-log b{color:#8fd0f5;font-weight:700;margin-right:5px}
.chat-log .system{color:#9fb0bc}
.chat-form{display:flex;align-items:center;gap:6px;padding:7px;background:#0a1116b3;border-top:1px solid #ffffff14}
.chat-form input{flex:1;min-width:0;font:inherit;font-size:12px;color:#fff;background:transparent;border:0;padding:8px 9px}
.chat-form input::placeholder{color:#93a2ad}
.chat-form input:focus{outline:none}
.chat-form button{display:grid;place-items:center;width:34px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#9fb6c4}
.chat-form button:hover{color:#fff;background:#ffffff14}
.chat-form svg{width:16px;height:16px}

/* Online: player count chip, server line in the menu, and the server list. */
.online-chip{display:flex;align-items:center;gap:7px;height:42px;padding:0 12px;font-size:12.5px;font-weight:700}
.online-chip i,.menu-server i{width:8px;height:8px;border-radius:50%;background:#8a96a0;flex-shrink:0}
[data-state=online] i,.menu-server i[data-state=online]{background:var(--accent);box-shadow:0 0 0 3px #7fc35a33}
[data-state=connecting] i,.menu-server i[data-state=connecting]{background:#ffc94d}
.menu-server{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;background:#ffffff0f}
.menu-server strong{display:block;font-size:12.5px}
.menu-server span{font-size:11px;color:var(--muted)}
.servers-list{list-style:none;margin:18px 0 12px;padding:0;display:flex;flex-direction:column;gap:8px}
.servers-list li{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:6px 12px;align-items:center;padding:12px;border-radius:11px;background:#ffffff0c;border:1px solid #ffffff14}
.servers-list strong{display:block;font-size:13px}
.servers-list span{font-size:11px;color:var(--muted)}
.servers-list i{grid-column:1;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--accent) var(--fill),#ffffff1c var(--fill))}
.servers-list button{grid-row:1/3;grid-column:2;border:0;border-radius:9px;background:var(--accent);color:#10210a;font-weight:700;font-size:12px;padding:10px 16px}
.servers-list button:disabled{background:#ffffff1a;color:var(--muted);cursor:default}
.servers-empty{justify-content:center;color:var(--muted);font-size:12px}

/* Signed-in avatar: the default egg picture in a circle, a blue ring that fills with EXP,
   and the level underneath. Replaces the Connect wallet button once you have a username. */
.avatar-button{position:relative;width:52px;height:52px;padding:0;margin:-5px 0 6px;border:0;border-radius:50%;background:none;display:grid;place-items:center}
.exp-ring{position:absolute;inset:0;width:52px;height:52px;transform:rotate(-90deg);filter:drop-shadow(0 3px 8px #04101950)}
.exp-ring .track{fill:#0e161ccc;stroke:#ffffff26;stroke-width:3.5}
.exp-ring .arc{fill:none;stroke:#3fa2ff;stroke-width:3.5;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset .8s ease}
.avatar-egg{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;width:27px;height:34px;margin-top:-2px;border-radius:52% 52% 47% 47% / 65% 65% 38% 38%;background:linear-gradient(110deg,#fffef9,#e9e4d1);box-shadow:inset -2px -3px 5px #0000001c}
.avatar-egg i{display:block;width:3px;height:5px;border-radius:50%;background:#28302b;margin-top:2px}
.avatar-egg b{position:absolute;bottom:9px;left:50%;width:6px;height:3px;margin-left:-3px;border:1.5px solid #74594b;border-top:0;border-radius:0 0 6px 6px}
.avatar-level{position:absolute;bottom:-9px;left:50%;transform:translateX(-50%);padding:2px 7px;border-radius:999px;background:#3fa2ff;color:#fff;font-size:10px;font-weight:800;white-space:nowrap;box-shadow:0 2px 6px #0006;border:1.5px solid #0e161c}
.avatar-button:hover .avatar-egg{transform:scale(1.05)}
.bar{display:block;height:6px;border-radius:3px;background:#ffffff1a;overflow:hidden}
.bar>i{display:block;height:100%;width:0;border-radius:3px;background:var(--accent);transition:width .6s ease}
.bar.exp>i{background:#3fa2ff}
.account-level{display:flex;flex-direction:column;gap:6px;padding:10px 11px;border-radius:9px;background:#ffffff0f}
.account-level>div{display:flex;justify-content:space-between;align-items:baseline}
.account-level strong{font-size:13px;color:#8fc9ff}
.account-level span{font-size:11px;color:var(--muted)}

/* Tip: a button on the right (opposite Shop) and a panel that slides in from the right. */
.tip-rail{position:absolute;right:14px;top:calc(max(14px,env(safe-area-inset-top)) + 296px);display:flex;flex-direction:column;gap:8px;z-index:6}
.tipping .tip-rail,.in-menu .tip-rail,.in-menu .tip-panel,.shopping .tip-rail{display:none!important}
.tip-panel{position:absolute;top:calc(max(14px,env(safe-area-inset-top)) + 64px);bottom:20px;right:14px;width:min(340px,calc(100vw - 28px));z-index:8;display:flex;flex-direction:column;gap:12px;padding:14px;overflow-y:auto;background:var(--glass-solid);border:1px solid var(--edge);border-radius:14px;backdrop-filter:blur(10px);box-shadow:0 18px 50px #04101950}
.tip-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.tip-head strong{display:block;font-size:16px}
.tip-head span{display:block;margin-top:3px;font-size:11px;color:var(--muted)}
.tip-head kbd{font:inherit;font-weight:700;color:#e4d4ff;background:#8b5cf62e;border:1px solid #b18cff40;border-radius:5px;padding:1px 5px}
.tip-signed-out p{font-size:12.5px;line-height:1.6;color:#cfdae1}
.tip-signed-out .primary{margin:0;text-align:center}
.tip-body{display:flex;flex-direction:column;gap:10px}
/* The rail button: a tiny purple egg over your allocation. */
.tip-button .mini-egg{width:17px;height:22px;border-radius:52% 52% 47% 47% / 65% 65% 38% 38%;background:radial-gradient(circle at 35% 28%,#f1e6ff,#a57cf5 55%,#6b3fd0);box-shadow:inset -2px -3px 4px #0000002e,0 0 10px #a57cf566}
.tip-button #tip-rail-label{max-width:56px;overflow:hidden;text-overflow:ellipsis;color:#e4d4ff}
/* Two meters: a ring round an egg, the amount beside it. Purple = allocation, gold = withdrawable. */
.meter{--c:#a57cf5;--c2:#6b3fd0;display:flex;align-items:center;gap:13px;padding:13px;border-radius:13px;background:linear-gradient(135deg,color-mix(in srgb,var(--c) 16%,transparent),#ffffff06);border:1px solid color-mix(in srgb,var(--c) 30%,transparent)}
.meter.gold{--c:#f5c542;--c2:#c9971f;flex-wrap:wrap}
/* Withdraw: gold when there is enough, asks once more before sending. */
.withdraw-button{flex:1 0 100%;padding:11px 14px;border:0;border-radius:10px;background:linear-gradient(180deg,#ffd76a,#e0a92a);color:#3a2800;font-size:13px;font-weight:800;box-shadow:0 3px 10px #e0a92a40,inset 0 1px 0 #fff6}
.withdraw-button:hover:not(:disabled){filter:brightness(1.07)}
.withdraw-button.confirm{background:linear-gradient(180deg,#ffe9a8,#f5c542);outline:2px solid #fff3c4;outline-offset:1px}
.withdraw-button:disabled{background:#ffffff14;color:var(--muted);box-shadow:none;cursor:default}
.meter-ring{position:relative;width:64px;height:64px;flex-shrink:0;display:grid;place-items:center}
.meter-ring svg{position:absolute;inset:0;width:64px;height:64px;transform:rotate(-90deg)}
.meter-ring .track{fill:none;stroke:#ffffff1a;stroke-width:5}
.meter-ring .arc{fill:none;stroke:var(--c);stroke-width:5;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset .8s ease;filter:drop-shadow(0 0 4px color-mix(in srgb,var(--c) 60%,transparent))}
.egg-icon{position:relative;width:26px;height:33px;border-radius:52% 52% 47% 47% / 65% 65% 38% 38%;box-shadow:inset -3px -4px 6px #0000002e,0 3px 8px #0005}
.egg-icon.purple{background:radial-gradient(circle at 35% 28%,#f1e6ff,#a57cf5 55%,#6b3fd0)}
.egg-icon.gold{background:radial-gradient(circle at 35% 28%,#fffbe6,#f5d06a 55%,#c9971f)}
.meter-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.meter-label{font-size:10px;font-weight:700;letter-spacing:1.3px;text-transform:uppercase;color:var(--c)}
.meter-label em{font-style:normal;font-weight:600;letter-spacing:0;text-transform:none;color:var(--muted)}
.meter-value{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px}
.meter-value strong{font-size:27px;line-height:1.05;letter-spacing:-.5px}
.meter-value>span{font-size:11px;font-weight:700;color:var(--muted)}
.trend{align-self:center;padding:2px 7px;border-radius:999px;font-size:10.5px;font-weight:800}
.trend.up{background:#7fc35a2e;color:#a6e27f}
.trend.down{background:#ff8a7a2b;color:#ffb3a8}
.trend.flat{background:#ffffff14;color:var(--muted)}
.meter-note{font-size:11px;line-height:1.45;color:#cfdae1}
.meter-note b{font-variant-numeric:tabular-nums;color:#fff}
.alloc-split{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.alloc-split>div{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border-radius:10px;background:#ffffff0a}
.alloc-split span{font-size:9.5px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--muted)}
.alloc-split b{font-size:14px}
.alloc-split .next{background:#a57cf51f;box-shadow:inset 0 0 0 1px #a57cf540}
.alloc-split .next b{color:#e4d4ff}
.activity{display:flex;flex-direction:column;gap:6px;padding:11px 12px;border-radius:11px;background:#ffffff0a}
.activity>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:11.5px}
.activity>div span{color:var(--muted)}
.activity .field-hint{margin:0}
.bar.purple>i{background:linear-gradient(90deg,#6b3fd0,#b18cff)}
.chain-note{margin:0}
.chain-note:empty{display:none}
.tip-history-label{font-size:10px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted)}
.tip-history{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.tip-history li{display:flex;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:8px;background:#ffffff0a;font-size:11.5px}
.tip-history li span{color:#cfdae1}
.tip-history li.in b{color:#ffd46b}
.tip-history li.out b{color:#c9a8ff}
.tip-history li.pending b{color:#ffd46b}
/* Unread chat messages while the chat is closed. */
#chat-toggle{position:relative}
.chat-badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ff5a4f;color:#fff;font-size:10px;font-weight:800;line-height:18px;text-align:center;box-shadow:0 2px 6px #0007;border:1.5px solid #0e161c}
.menu-panel{position:absolute;top:calc(max(14px,env(safe-area-inset-top)) + 52px);left:14px;width:min(280px,calc(100vw - 28px));padding:14px;display:flex;flex-direction:column;gap:7px;background:var(--glass-solid);border:1px solid var(--edge);border-radius:12px;backdrop-filter:blur(9px);box-shadow:0 14px 40px #04101940;z-index:8}
.menu-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.menu-head strong{font-size:15px;letter-spacing:-.4px}
.menu-close{background:none;border:0;font-size:22px;line-height:1;color:var(--muted);padding:0 2px}
.menu-panel>button:not(.menu-close){display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border:1px solid #ffffff12;border-radius:9px;background:#ffffff0f;font-size:12px;text-align:left}
.menu-panel>button:not(.menu-close):hover{background:#ffffff1f}
.menu-panel>button span{font-size:10px;font-weight:700;letter-spacing:1px;color:var(--muted)}

.hud-right{position:absolute;top:max(14px,env(safe-area-inset-top));right:14px;display:flex;align-items:center;gap:8px;z-index:7}
/* Optional wallet sign-in. Green call to action as a guest; a quiet chip with @username once signed in. */
.wallet-button{display:flex;align-items:center;gap:8px;height:42px;padding:0 14px 0 11px;font-size:12.5px;font-weight:700;white-space:nowrap;background:var(--accent);color:#10210a;border-color:#ffffff40}
.wallet-button svg{width:19px;height:19px}
.wallet-button:hover{filter:brightness(1.06)}
.wallet-button.pending{background:var(--glass);color:#dbe6ec}
.wallet-button.connected{background:var(--glass);color:#fff}
.wallet-button.connected svg{color:var(--accent)}
.account-panel{position:absolute;top:calc(max(14px,env(safe-area-inset-top)) + 52px);right:14px;width:min(300px,calc(100vw - 28px));padding:14px;display:flex;flex-direction:column;gap:12px;background:var(--glass-solid);border:1px solid var(--edge);border-radius:12px;backdrop-filter:blur(9px);box-shadow:0 14px 40px #04101940;z-index:8}
.account-head{display:flex;justify-content:space-between;align-items:flex-start}
.account-head strong{display:block;font-size:16px}
.account-head span{font-size:12px;color:#9fd0ee}
.account-wallet{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;border-radius:9px;background:#ffffff0f;font-size:11px;color:var(--muted)}
.account-wallet code{font-size:12px;color:#fff}
.account-form label,#username-form label{display:block;font-size:10px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.account-row{display:flex;gap:6px}
.account-row input,#username-form input{flex:1;min-width:0;width:100%;font:inherit;font-size:13px;color:#fff;background:#0a1116;border:1px solid var(--edge);border-radius:9px;padding:10px 11px}
.account-row .primary{width:auto;margin:0;padding:0 14px}
.account-disconnect{background:none;border:1px solid #ff8a7a55;border-radius:9px;color:#ffb3a8;padding:10px;font-size:12px}
.account-disconnect:hover{background:#ff8a7a14}
.field-hint{margin:6px 0 0;font-size:11px;line-height:1.5;color:var(--muted)}
.field-hint.good{color:var(--accent)}
.field-hint.bad,.field-error{color:#ff9d8a}
.field-error{font-size:12px;margin:12px 0 0}
#username-form>label{margin-top:16px}
.handle-field{display:flex;align-items:center;background:#0a1116;border:1px solid var(--edge);border-radius:9px;padding-left:11px}
.handle-field span{color:#9fd0ee;font-weight:700}
.handle-field input{border:0!important;background:transparent!important;padding-left:4px!important}
.handle-field:focus-within{outline:2px solid var(--accent)}
.handle-field input:focus-visible{outline:none}

.coins{display:flex;align-items:center;gap:8px;padding:9px 12px}
.coins strong{font-size:17px;font-weight:700;line-height:1}
.coin{display:inline-block;width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3b0,#f5c043 45%,#c98a18);box-shadow:inset 0 0 0 2px #e0a42a,0 1px 3px #0005;flex-shrink:0}

/* Title screen over the live park. While it is up, the game HUD stays hidden. */
.in-menu .top-left,.in-menu .chat,.in-menu .menu-panel,.in-menu .account-panel,.in-menu .hud-right,.in-menu .bottom-hud,.in-menu .mobile-controls,.in-menu .side-rail,.in-menu .interact,.in-menu .shop{display:none!important}
.start-menu{position:absolute;inset:0;z-index:9;display:flex;align-items:center;padding:24px max(24px,7vw);background:linear-gradient(90deg,#08202ecc,#08202e66 45%,transparent 75%)}
.start-card{width:min(380px,100%);display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.start-card .egg-logo{width:46px;height:58px;margin-bottom:6px}
.start-card h1{margin:0;font-size:clamp(40px,6vw,64px);font-weight:800;letter-spacing:-2.4px;line-height:1;color:#fff;text-shadow:0 4px 24px #0006}
.start-card h1 span{color:var(--accent)}
.start-tagline{margin:0 0 18px;font-size:14px;color:#dbe8ef}
.start-card label{font-size:10px;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;color:#b9c9d3}
.start-card input{width:100%;font:inherit;font-size:15px;color:#fff;background:#0e161cb8;border:1px solid var(--edge);border-radius:10px;padding:12px 14px}
.start-card input:focus{outline:2px solid var(--accent);outline-offset:1px}
.play{font-size:17px;padding:16px 20px;margin-top:8px;text-align:left;box-shadow:0 10px 30px #1a3a1266}
.play:hover{filter:brightness(1.06)}
.start-link{background:none;border:0;color:#cfdce4;font-size:12px;text-decoration:underline;padding:4px 0}

/* Shop and Clothing: a rail on the left, and one panel with two tabs. */
/* Sits just under the chat box. */
.side-rail{position:absolute;left:14px;top:calc(max(14px,env(safe-area-inset-top)) + 296px);display:flex;flex-direction:column;gap:8px;z-index:6}
.rail-button{width:62px;padding:9px 0 7px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px;font-weight:700}
.rail-button svg{width:22px;height:22px}
.rail-button:hover{background:var(--glass-solid)}
.shopping .side-rail,.shopping .chat,.shopping .menu-panel,.shopping .bottom-hud,.shopping .mobile-controls,.shopping .interact{display:none!important}
.shop{position:absolute;top:calc(max(14px,env(safe-area-inset-top)) + 52px);bottom:20px;left:14px;width:min(400px,calc(100vw - 28px));z-index:8;display:flex;flex-direction:column;background:var(--glass-solid);border:1px solid var(--edge);border-radius:14px;backdrop-filter:blur(10px);box-shadow:0 18px 50px #04101950;overflow:hidden}
.shop-head{display:flex;align-items:center;gap:10px;padding:12px 12px 8px}
.shop-tabs{display:flex;gap:4px;background:#ffffff10;border-radius:10px;padding:3px;flex:1}
.shop-tabs button{flex:1;border:0;border-radius:8px;background:none;padding:8px 0;font-size:12.5px;font-weight:700;color:var(--muted)}
.shop-tabs button[aria-selected=true]{background:#ffffff1f;color:#fff}
.shop-coins{display:flex;align-items:center;gap:6px;font-size:14px}
.shop-filters{display:flex;gap:6px;padding:4px 12px 10px;overflow-x:auto;scrollbar-width:none}
.shop-filters button{border:1px solid #ffffff1c;border-radius:999px;background:none;padding:6px 12px;font-size:11px;white-space:nowrap;color:#cdd8df}
.shop-filters button[aria-pressed=true]{background:#fff;color:var(--ink);border-color:#fff}
.shop-grid{flex:1;overflow-y:auto;padding:4px 12px 12px;display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:9px;align-content:start;scrollbar-width:thin;scrollbar-color:#ffffff33 transparent}
.item-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 6px 9px;border:1px solid #ffffff14;border-radius:11px;background:#ffffff0c;text-align:center}
.item-card:hover{background:#ffffff18}
.item-card[aria-pressed=true]{border-color:var(--accent);background:#7fc35a1f;box-shadow:inset 0 0 0 1px var(--accent)}
.item-card img{width:76px;height:76px;object-fit:contain;border-radius:50%;background:radial-gradient(circle,#ffffff38,#ffffff0a 62%,transparent 72%);filter:drop-shadow(0 4px 6px #0006)}
.item-name{font-size:11px;font-weight:600;line-height:1.25}
.item-tag{font-size:10px;font-weight:700;color:var(--muted)}
.item-tag.price{color:#ffd46b}
.item-card.wearing .item-tag{color:var(--accent)}
.item-card.wearing::after{content:'✓';position:absolute;top:6px;right:8px;font-size:12px;font-weight:700;color:var(--accent)}
.shop-empty{grid-column:1/-1;font-size:12px;color:var(--muted);text-align:center;padding:30px 10px}
.shop-foot{display:flex;align-items:center;gap:12px;padding:12px;border-top:1px solid #ffffff14;background:#0000001f}
.shop-foot>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.shop-foot strong{font-size:13px}
.shop-foot span{font-size:10.5px;color:var(--muted)}
.shop-foot .primary{width:auto;margin:0;white-space:nowrap;padding:12px 16px}
.shop-foot .primary:disabled{background:#ffffff1f;color:var(--muted);cursor:default}
.shop-foot .primary.short{background:#ffffff26;color:#ffd46b}

.toast{position:absolute;top:22px;left:50%;transform:translate(-50%,-12px);opacity:0;pointer-events:none;background:var(--glass-solid);border:1px solid var(--edge);border-radius:11px;padding:12px 20px;font-size:12.5px;backdrop-filter:blur(7px);box-shadow:0 10px 30px #04101940;transition:.3s;max-width:min(520px,86vw);text-align:center;z-index:9}
.toast.visible{opacity:1;transform:translate(-50%,0)}

.interact{position:absolute;bottom:118px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:11px;padding:10px 16px 10px 10px;font-size:12.5px;white-space:nowrap;background:var(--glass-solid);border:1px solid var(--edge);border-radius:11px;backdrop-filter:blur(7px);z-index:5}
.interact kbd{background:var(--accent);color:#10210a;border:0;font-weight:700;padding:6px 10px}
kbd{font:inherit;font-size:10px;display:inline-block;min-width:20px;border:1px solid #ffffff2e;border-bottom-width:2px;border-radius:5px;background:#ffffff1a;padding:4px 6px;text-align:center;color:#fff}

.bottom-hud{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:14px;right:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;pointer-events:none;z-index:5}
.location{display:flex;align-items:center;gap:9px;padding:8px 13px 8px 10px}
.location-mark{font-size:17px;color:var(--accent)}
.location strong{font-size:12px;font-weight:600}
.controls-bar{display:flex;align-items:center;gap:12px;padding:10px 15px;font-size:10px;white-space:nowrap;color:#dbe6ec}
.controls-bar>span{display:flex;align-items:center;gap:4px}
.controls-bar b{width:1px;height:13px;background:#ffffff26}
.controls-bar kbd:last-of-type{margin-right:4px}

dialog{border:1px solid var(--edge);background:var(--glass-solid);color:#eef3f6;border-radius:18px;padding:32px;width:min(470px,calc(100% - 28px));backdrop-filter:blur(10px);box-shadow:0 30px 120px #02090ea6;max-height:88dvh;overflow-y:auto}
dialog::backdrop{background:#04121c7a;backdrop-filter:blur(4px)}
dialog h2{font:30px Georgia,serif;letter-spacing:-.8px;margin:6px 0 12px}
dialog p{font-size:12px;line-height:1.75;color:#b8c5ce}
dialog dl{margin:22px 0}
dialog dl>div{display:flex;justify-content:space-between;gap:14px;align-items:center;border-bottom:1px solid #ffffff14;padding:9px 0;font-size:11.5px}
dialog dd{margin:0;color:#b8c5ce;text-align:right}
.dialog-close{position:absolute;right:16px;top:12px;font-size:25px;background:none;border:0;color:var(--muted)}
.help-note{padding:14px;border-radius:10px;background:#ffffff12;font-size:11.5px;line-height:1.7;color:#dbe6ec}
.primary{background:var(--accent);color:#10210a;border:0;border-radius:10px;padding:14px 18px;width:100%;margin-top:20px;text-align:left;font-size:12.5px;font-weight:700}
.primary span{float:right}

.egg-logo{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:36px;height:45px;border-radius:52% 52% 47% 47% / 65% 65% 38% 38%;background:linear-gradient(110deg,#fffef9,#efebda);box-shadow:0 3px 9px #04101925;transform:rotate(-9deg)}
.egg-logo i{display:block;width:3px;height:5px;border-radius:50%;background:#354334;margin-top:10px}
.loading,.fatal{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;flex-direction:column;background:linear-gradient(#2e86c8,#79c1e6 55%,#c8e8f2);color:#0f2a3a}
.loading .egg-logo{animation:bob 1s ease-in-out infinite alternate}
.loading p{font-size:13px;margin-top:20px}
.fatal{padding:30px;text-align:center}
.fatal p{max-width:500px;line-height:1.7;color:#123246}
.fatal button{padding:12px 20px;border:0;border-radius:9px;background:#14303f;color:#fff}
@keyframes bob{to{transform:translateY(-10px) rotate(9deg)}}

.mobile-controls,.mobile-help{display:none}

@media(max-width:1050px){.controls-bar{gap:8px;padding:9px 11px}}
@media(pointer:coarse),(max-width:760px){
  .mobile-controls{display:block;position:absolute;inset:0;pointer-events:none;z-index:4}
  .mobile-help{display:block}
  .chat{width:min(300px,calc(100vw - 28px))}
  .chat-log{height:120px;font-size:11.5px}
  .controls-bar{display:none}
  .coins{padding:7px 10px;gap:6px}
  .tip-rail{top:calc(50% - 64px)}
  .tip-panel{top:auto;left:0;right:0;bottom:0;width:auto;max-height:78%;border-radius:16px 16px 0 0;border-bottom:0}
  .coins strong{font-size:15px}
  .hud-right{gap:6px}
  .rail-button{width:54px;font-size:9px}
  .side-rail{top:calc(50% - 64px)}
  .start-menu{align-items:flex-end;padding:24px 20px max(28px,env(safe-area-inset-bottom));background:linear-gradient(0deg,#08202ee6,#08202e80 55%,transparent)}
  /* On phones the shop is a bottom sheet, so the egg stays visible above it. */
  .shop{top:auto;left:0;right:0;bottom:0;width:auto;height:56%;border-radius:16px 16px 0 0;border-bottom:0}
  .shop-grid{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))}
  .item-card img{width:62px;height:62px}
  .top-left .chip{width:38px;height:38px}
  .wallet-button{height:38px;padding:0 10px}
  .wallet-button:not(.connected) span{display:none}
  .touch-actions{position:absolute;right:18px;bottom:82px;display:flex;gap:12px;align-items:center}
  .touch-actions button{pointer-events:auto;touch-action:none;user-select:none;height:52px;width:52px;font-size:11px;border-radius:50%;border:1px solid var(--edge);background:var(--glass);color:#fff;backdrop-filter:blur(7px)}
  .touch-actions #jump{width:68px;height:68px;font-size:22px}
  .touch-actions small{display:block;font-size:9px}
  #joystick{position:absolute;left:24px;bottom:80px;width:100px;height:100px;border-radius:50%;border:1px solid var(--edge);background:#0e161c66;pointer-events:auto;touch-action:none;backdrop-filter:blur(4px)}
  #stick{width:42px;height:42px;position:absolute;left:29px;top:29px;border-radius:50%;background:#e9f1f6d9;box-shadow:0 3px 12px #04101940;pointer-events:none}
  .interact{bottom:190px;max-width:92%;font-size:11.5px}
  .toast{font-size:11.5px;padding:11px 16px}
  dialog{padding:24px}
}
@media(max-height:520px){
  .chat-log{height:92px}
  .side-rail{top:auto;bottom:18px;left:auto;right:auto;flex-direction:row;left:50%;transform:translateX(-50%)}
  .start-card h1{font-size:38px}.start-tagline{margin-bottom:6px}
  .touch-actions{bottom:50px}#joystick{bottom:52px}.interact{bottom:76px}
}
