/* Plazr surfaces: compact navigation, an uninterrupted catalog, artwork first. */
:root{--bg:#111315;--panel:#171a1d;--panel2:#20252a;--line:#ffffff10;--text:#f3f4f5;--muted:#9098a2;--blue:#2985c4;--blue2:#2375b0}
html[data-theme="light"]{--bg:#f4f6f7;--panel:#fff;--panel2:#e9eef2;--line:#15253614;--text:#192831;--muted:#6c7983}
body:before{display:none}
.app .panel{box-shadow:none;border-radius:12px}
.platform-topbar,.mobile-header,.bottom-nav{background:var(--bg)!important;backdrop-filter:none!important;box-shadow:none!important;border-color:var(--line)!important}
.bottom-nav .bottom-btn{border-radius:0;background:transparent!important;color:var(--muted)}
.bottom-nav .bottom-btn.active{color:var(--blue)}
.community-members-panel{border-radius:12px!important;box-shadow:none!important}
.community-member{background:transparent!important;box-shadow:none!important;border-color:var(--line)!important}
.community-members{padding-inline:0}
.community-member-avatar{box-shadow:none!important}
.community-card{box-shadow:none!important;border-radius:12px;background:var(--panel)!important}
.pf-workspace,.pf-tools,.pf-person{box-shadow:none}
#page-store{max-width:1120px}
.store-page-head{position:relative;justify-content:space-between;min-height:54px;margin-bottom:8px;border-bottom:1px solid var(--line);padding:0 0 12px}
.store-page-head .eyebrow,.store-page-head p{display:none}
.store-page-head h2{font:650 21px/1.5 system-ui;margin:0}
.store-head-actions{display:flex;align-items:center;gap:6px}
.store-head-actions .ghost{background:transparent;border:0;min-height:40px;min-width:40px;padding:8px;color:var(--muted)}
.store-head-actions .store-wallet-icon{color:var(--text)}
.store-dashboard{display:block}
.store-catalog-panel.panel{padding:0;background:transparent;border:0;border-radius:0;min-height:0;box-shadow:none}
.store-sticky-head>.store-section-head{padding:0 2px;min-height:26px;margin-bottom:8px;justify-content:flex-end}
.store-sticky-head>.store-section-head>div{display:none}
.store-catalog-panel .count-pill{font:500 11px/1.5 system-ui;color:var(--muted);border:0;background:none;padding:0}
.store-category-bar{position:sticky;top:86px;z-index:5;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;padding:8px 0 12px;margin:0 0 6px;background:var(--bg);scroll-padding-inline:12px;overscroll-behavior-x:contain}
.store-category-btn{flex:none;min-height:40px;border:0;border-radius:10px;padding:10px 15px;background:var(--panel2);color:var(--muted);font:600 13px/1.5 system-ui;white-space:nowrap}
.store-category-btn.active{background:var(--blue);color:#fff;border:0}
.store-category-btn:hover{background:var(--panel2);color:var(--text)}
.store-category-btn.active:hover{background:var(--blue);color:#fff}
.store-catalog{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:stretch}
.store-catalog .store-item-card{display:flex;flex-direction:column;align-items:stretch;gap:0;min-width:0;margin:0;padding:12px 12px 10px;border:1px solid var(--line);border-radius:12px;background:var(--panel)!important;box-shadow:none;transform:none;text-align:center}
.store-catalog .store-item-card:hover{border-color:#8193a34d;transform:none}
.store-catalog .store-item-card.is-equipped{border-color:var(--blue);box-shadow:none}
.store-catalog .store-item-visual{display:block;width:100%;height:174px;max-width:100%;margin:0 auto;padding:14px;box-sizing:border-box;object-fit:contain;filter:none;background:none!important}
.store-catalog .store-item-copy{display:flex;flex-direction:column;flex:1;gap:6px;padding:8px 0 0;min-height:110px;text-align:center;width:100%}
.store-catalog .store-item-copy strong{font:600 15px/1.45 system-ui;min-height:22px;color:var(--text)}
.store-catalog .store-item-copy small{font:400 12px/1.6 system-ui;color:var(--muted);min-height:39px;-webkit-line-clamp:2}
.store-catalog .store-product-footer{display:flex;justify-content:center;gap:8px;min-height:28px;margin-top:auto;padding:5px 0 0;border:0}
.store-catalog .store-item-price{font:550 14px/1.5 system-ui;direction:ltr;gap:5px;color:var(--text)}
.store-catalog .store-item-badge{display:none}
.store-catalog .is-equipped .store-item-badge{display:inline;color:var(--blue);font:500 10px/1.5 system-ui}
.store-catalog .store-item-visual[src$="/red-pixel-v2.png"]{width:40px;height:174px;max-width:40px;object-fit:contain;padding:0}
.store-catalog .store-chat-sample{width:100%;padding:14px 0;height:174px;display:flex;flex-direction:column;justify-content:center}
.store-catalog .sd-product-stage{background:none!important;border:0;box-shadow:none}
.store-pagination{margin:18px auto}
.store-product-sheet{border-radius:16px;background:var(--panel);border-color:var(--line);box-shadow:0 12px 42px #0004}
@media (max-width:1000px){.store-catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:820px){
 #page-store{width:calc(100% + 16px);margin-inline:-8px}
 .store-page-head{min-height:48px;padding:0 6px 8px;margin-bottom:0}
 .store-page-head h2{font-size:19px}
 .store-category-bar{top:64px;padding-inline:6px;margin-inline:-6px}
 .store-catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .store-catalog .store-item-card{padding:8px 9px 10px;border-radius:11px}
 .store-catalog .store-item-visual,.store-catalog .store-chat-sample{height:clamp(132px,39vw,190px);padding:10px}
 .store-catalog .store-item-visual[src$="/red-pixel-v2.png"]{height:clamp(132px,39vw,190px);padding:0}
 .store-catalog .store-item-copy{min-height:116px;padding-top:6px}
 .store-catalog .store-item-copy strong{font-size:14px}
 .store-catalog .store-item-copy small{font-size:12px}
 .store-category-btn{padding:9px 13px;font-size:12px}
 .app .community-members-panel{border-radius:10px!important}
}
@media (prefers-reduced-motion:reduce){.store-category-btn,.store-item-card{transition:none}}

/* Every product reserves the same image stage, regardless of artwork size. */
.store-catalog .store-item-media{height:174px;width:100%;display:flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:0}
.store-catalog .store-item-media>.store-item-visual{height:100%;width:100%;margin:0}
.store-catalog .store-item-media>.store-item-visual[src$="/red-pixel-v2.png"]{width:40px;height:40px;max-width:40px;max-height:40px;padding:0;flex:none}
.store-catalog .store-item-media>.store-name-preview{font-size:14px;margin:0;max-width:100%}
@media (max-width:820px){.store-catalog .store-item-media{height:clamp(132px,39vw,190px)}}

/* Wide banners sit inside the same card stage, with their full composition visible. */
.store-catalog .store-item-media>.store-banner-art{display:block;width:calc(100% - 18px);height:auto;max-height:124px;max-width:320px;padding:0;margin:0;border-radius:7px;object-fit:contain;aspect-ratio:auto;flex:none;box-shadow:none}
.store-product-art>.store-banner-art{width:100%;height:auto;max-width:360px;max-height:160px;padding:0;border-radius:8px;object-fit:contain;aspect-ratio:auto}
@media (max-width:820px){
 .store-catalog .store-item-media>.store-banner-art{width:calc(100% - 14px);max-height:112px;border-radius:6px}
 .store-catalog .store-item-copy{gap:7px}
 .store-product-art:has(>.store-banner-art){height:clamp(120px,24dvh,190px);padding:10px 0}
}

/* The rename shortcut uses the catalog's own art, copy and live price. */
#settings-rename-dialog{max-height:calc(100dvh - 32px);overflow-y:auto}
.rename-purchase[hidden]{display:none}
.rename-purchase{margin-block:18px}
.rename-purchase-card{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;padding:14px;text-align:start}
.rename-purchase-card .store-item-media{height:88px;min-height:0;margin:0}
.rename-purchase-card .store-item-media>*{max-width:80px;max-height:80px;object-fit:contain}
.rename-purchase-card .store-item-copy{min-width:0;display:flex;flex-direction:column;gap:8px}
.rename-purchase-card .store-product-footer{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0;padding-top:10px}
.rename-purchase-card button{min-height:42px}
@media(max-width:420px){.rename-purchase-card{grid-template-columns:64px minmax(0,1fr);gap:10px;padding:12px}.rename-purchase-card .store-item-media{height:64px}.rename-purchase-card .store-item-media>*{max-width:60px;max-height:60px}}
/* Public card: identity, stats, full-profile link, supported actions. */
#community-profile-actions{display:flex;align-items:center;gap:8px;direction:ltr}
#community-profile-actions .friend{flex:1;min-width:0;order:2}
#community-profile-report{order:1;color:#ed4245;border:1px solid #ed424540;background:transparent;flex:0 0 44px;font-size:24px}
#community-profile-reputation-btn{order:3;background:#ce6509;color:white;flex:0 0 48px;min-width:48px}
#community-profile-reputation-btn>span:nth-child(2),#community-profile-reputation-left,#community-profile-collection{display:none!important}
#community-profile-modal .profile-stats{display:flex;direction:rtl;margin:24px 0;gap:0}
#community-profile-modal .profile-stat{flex:1;border-inline-end:1px solid var(--line,#333)}
#community-profile-modal .profile-stat:last-child{border:0}
#community-profile-modal .sd-open-full{width:100%;border-radius:24px;margin:12px 0}
#community-profile-modal.sd-profile-expanded .sd-open-full{display:none}
#community-profile-modal .community-public-profile-card{max-width:440px}
#community-profile-report-box #community-profile-block{display:block;margin:0 0 16px;width:100%}
.phone-profile-topbar,.phone-profile-pencil,.phone-profile-back{display:none}
body.sd-web-game .phone-profile-topbar,body.sd-game-opening .phone-profile-topbar,body.community-mode .phone-profile-topbar{display:none!important}
button#profile-identity-handle{font:inherit;color:inherit;border:0;background:transparent}
.phone-profile-dialog{width:min(360px,calc(100vw - 32px));padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);box-sizing:border-box}
.phone-profile-dialog::backdrop{background:#0009}
.phone-profile-dialog input,.phone-profile-dialog textarea{width:100%;box-sizing:border-box;background:var(--bg);color:inherit;border:1px solid var(--line);border-radius:12px;padding:12px;font:inherit;font-size:16px}
.phone-profile-dialog form>div{display:flex;gap:12px;justify-content:flex-end}
.phone-profile-dialog button{min-height:44px;padding:8px 18px;border-radius:10px;font:inherit}
.phone-profile-dialog [role=alert]{color:#ef6868}
@media(max-width:820px){
 html:not([data-sd-native]) .phone-profile-topbar{display:flex;position:fixed;inset:0 0 auto;z-index:45;height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0;box-sizing:border-box;background:var(--panel);align-items:center;justify-content:flex-end;direction:ltr;border-bottom:1px solid var(--line)}
 .phone-profile-topbar strong{position:absolute;left:50%;transform:translateX(-50%);font-size:23px}
 .phone-profile-topbar .avatar{width:38px;height:38px;border-radius:50%;padding:0;overflow:hidden;cursor:pointer}
 html:not([data-sd-native]) body:not(.community-mode):not(.phone-own-profile) .main{padding-top:calc(70px + env(safe-area-inset-top))}
 html:not([data-sd-native]) body.phone-own-profile .phone-profile-topbar{display:none}
 html:not([data-sd-native]) body.phone-own-profile .main{padding-top:env(safe-area-inset-top)}
 #own-profile-card .profile-card-bar{display:flex;direction:ltr;align-items:center;justify-content:space-between}
 #own-profile-card .profile-card-bar>strong{flex:1;text-align:center;order:2}
 #own-profile-card #profile-edit-toggle{display:none}
 #own-profile-card #profile-settings-btn{order:1}
 #own-profile-card .phone-profile-back{display:block;order:3;font-size:30px}
 #own-profile-card .phone-profile-pencil{display:inline-grid;place-items:center;flex:0 0 28px;width:28px;height:28px;min-width:28px;min-height:28px;padding:6px;border:0;border-radius:50%;background:#2385dc;color:#fff;cursor:pointer;order:3}
 #own-profile-card .phone-profile-pencil svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 #own-profile-card .profile-name-row h3{order:1}
 #own-profile-card .profile-name-row .profile-stars{order:2}
 #own-profile-card .profile-name-row .profile-sticker{order:0}
 #own-profile-card #profile-identity-handle{display:block;width:100%;min-height:48px;margin:14px 0;padding:12px 18px;border-radius:16px;background:var(--line);text-align:center;cursor:pointer;white-space:pre-wrap;overflow-wrap:anywhere}
 #own-profile-card #profile-avatar{cursor:pointer}
}
/* Public cards use one action row; legacy identity rules must not turn it into a grid. */
#community-profile-modal #community-profile-actions{display:flex!important;flex-direction:row;flex-wrap:nowrap;direction:ltr;gap:8px!important;width:100%;margin:16px 0 0!important}
#community-profile-modal #community-profile-actions>button{height:48px;min-height:48px;box-sizing:border-box;padding:8px!important;border-radius:11px!important;grid-area:auto;gap:7px!important}
#community-profile-modal #community-profile-friend{flex:1 1 0;order:2;background:#217bce!important;color:#fff!important;font-size:16px!important}
#community-profile-modal #community-profile-report{flex:0 0 44px;order:1;border:1px solid var(--identity-line)!important;background:transparent!important;color:#ed4245!important}
#community-profile-modal #community-profile-reputation-btn{flex:0 0 48px;order:3;background:#cf680c!important;color:#fff!important}
#community-profile-modal #community-profile-actions svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#community-profile-modal .profile-stat{border:0!important;min-width:0;flex:1}
#community-profile-modal .profile-stat+.profile-stat{border-right:1px solid var(--identity-line)!important}
#community-profile-modal .profile-stat::after,#own-profile-card .profile-stat::after{display:none}
#community-profile-modal .profile-stats{display:flex;flex-wrap:nowrap}
#community-profile-modal:not(.sd-profile-expanded) #community-profile-moderation{display:none}
#community-profile-modal .profile-showcase-body{padding:0 18px 20px}
#community-profile-modal .profile-name-row{margin-top:20px;margin-bottom:12px}
#community-profile-modal .sd-open-full{min-height:36px;margin:14px 0 0;color:#2385dc;border:1px solid var(--identity-line);background:transparent;font-size:12px}

/* Keep the title, wallet action, balance and categories together while browsing. */
.store-sticky-head{position:sticky;top:76px;z-index:10;background:var(--bg);isolation:isolate;padding-top:8px}
.store-sticky-head .store-category-bar{position:static;margin-bottom:0}
.store-sticky-head .store-page-head{background:var(--bg)}
@media(max-width:820px){.store-sticky-head{top:calc(56px + env(safe-area-inset-top,0px));padding-top:0}}
html[data-sd-native] .store-sticky-head{top:0}

/* A single quiet room header; the three content columns keep their layout. */
#community-room .community-room-head{display:flex;align-items:center;gap:12px;min-height:72px;padding:10px 16px;margin-bottom:12px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--panel);box-shadow:none!important}
#community-room #exit-community{position:static;inset:auto;order:0;flex:0 0 44px;width:44px;height:44px;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--text);display:grid;place-items:center}
#community-room #exit-community:hover{background:var(--panel2)}
#exit-community svg{display:block;width:24px;height:24px}
html[dir="rtl"] #exit-community svg{transform:scaleX(-1)}
#community-room .community-active-identity{order:1;display:flex;flex:1;align-items:center;min-width:0;gap:10px;cursor:pointer;border-radius:8px}
.community-active-identity:focus-visible{outline:2px solid var(--blue);outline-offset:4px}
#community-room .community-active-identity>div{min-width:0}
#community-room .community-active-identity small,#community-room .community-active-identity p{display:none}
#community-room .community-active-identity h2{font:650 18px/1.4 system-ui;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#community-room .community-active-identity .community-mark{width:40px;height:40px;min-width:40px;flex:0 0 40px;border-radius:50%}
#community-room .community-active-identity .community-mark img{width:100%;height:100%}
#active-community-presence{display:block;color:var(--muted);font:400 12px/1.5 system-ui;margin-top:2px}
#community-room .community-room-head-actions{order:2;display:flex;align-items:center;gap:8px;flex:none}
#community-room #open-create{width:40px;min-width:40px;height:40px;border-radius:10px;box-shadow:none}
.community-room-menu{position:relative}
.community-room-menu>summary{display:grid;place-items:center;list-style:none;width:44px;height:44px;border-radius:10px;cursor:pointer;color:var(--text);font:700 25px/1 system-ui}
.community-room-menu>summary::-webkit-details-marker{display:none}
.community-room-menu>summary:hover,.community-room-menu[open]>summary{background:var(--panel2)}
.community-room-menu>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.community-room-menu-list{position:absolute;inset-inline-end:0;top:calc(100% + 6px);z-index:80;min-width:210px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 10px 28px #0002}
.community-room-menu-list button{display:block;text-align:start;width:100%;padding:12px;border:0;border-radius:8px;background:transparent;color:var(--text);font:500 14px/1.5 system-ui}
.community-room-menu-list button:hover{background:var(--panel2)}
.community-room-menu-list button[hidden]{display:none}
.community-info-dialog{width:min(440px,calc(100% - 32px));max-height:80dvh;overflow:auto;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);font-family:system-ui}
.community-info-dialog::backdrop{background:#0007}
.community-info-dialog h2{margin:0 0 14px;font-size:20px}
.community-info-dialog p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.9;color:var(--muted)}
.community-info-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
#community-profile-modal.profile-loading .community-public-profile-card{visibility:hidden;pointer-events:none}
#community-profile-modal.profile-loading #community-profile-loading{z-index:30;pointer-events:none}
/* Keep each room list independently scrollable and expose its drag handle. */
.community-card[aria-busy="true"]{cursor:progress;outline:2px solid var(--blue,#168de2);outline-offset:2px}
.community-card[aria-busy="true"] .community-card-enter::after{content:"";display:inline-block;width:12px;height:12px;margin-inline-start:8px;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:room-entry-spin .8s linear infinite}
.community-card:active,.bottom-btn:active,.community-mobile-tabs button:active{filter:brightness(.9)}
@keyframes room-entry-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.community-card[aria-busy="true"] .community-card-enter::after{animation:none}}
#community-room .community-members,
#community-room .community-games-panel,
#community-room .community-chat-messages,
#community-room .community-members-panel{
 touch-action:auto;
 -webkit-overflow-scrolling:touch;
 scrollbar-width:thin!important;
 scrollbar-color:#7f999d transparent;
}
#community-room .community-members::-webkit-scrollbar,
#community-room .community-games-panel::-webkit-scrollbar,
#community-room .community-chat-messages::-webkit-scrollbar,
#community-room .community-members-panel::-webkit-scrollbar{
 display:block!important;width:8px!important;height:8px!important;
}
#community-room .community-members::-webkit-scrollbar-thumb,
#community-room .community-games-panel::-webkit-scrollbar-thumb,
#community-room .community-chat-messages::-webkit-scrollbar-thumb,
#community-room .community-members-panel::-webkit-scrollbar-thumb{background:#7f999d;border-radius:8px}
@media(min-width:821px){
 #community-room .community-members{overflow-y:auto;min-height:0;max-height:none;flex:1}
 #community-room .community-members-panel>.column-head{flex-shrink:0}
 #community-room .community-games-panel{display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior-y:contain}
 #community-room .community-games-panel>.column-head,#community-room .community-games-panel>.community-create-table{flex-shrink:0}
}
@media(max-width:820px){
 #community-room .community-layout{position:relative;flex:1 1 0%;min-height:0}
 #community-room .community-members-panel,
 #community-room .community-games-panel{position:absolute;inset:0;width:100%;height:100%;max-height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:calc(36px + env(safe-area-inset-bottom,0px))}
 #community-room .community-members{overflow:visible;max-height:none}

}
#community-chat-messages .community-chat-bubble p{font-size:15px;line-height:1.75}
#community-chat-messages .community-chat-meta strong{font-size:12px}
#community-chat-messages .community-chat-meta time{font-size:10px}
@media(max-width:820px){
 #community-room .community-room-head{flex:0 0 64px;height:64px;min-height:64px;padding:8px 10px;gap:6px;margin:0;overflow:visible}
 #community-room .community-active-identity h2{font-size:17px}
 #community-room .community-active-identity{gap:8px}
 #active-community-presence{font-size:11px}
 #community-room .community-room-head-actions{gap:0}
 #community-room #open-create{flex-basis:36px;width:36px;min-width:36px;height:40px}
 .community-room-menu>summary{width:36px}
}

/* Compact match type control for supported player counts. */
.create-match-type-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.create-match-type-bar button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:8px 12px;border:1px solid var(--line,#ccdadd);border-radius:10px;background:var(--panel2,#edf3f4);color:var(--text,#24363d);font:600 14px system-ui;cursor:pointer}
.create-match-type-bar button.selected{border-color:#2587d7;background:#2587d71c;color:#1883d5;box-shadow:inset 0 0 0 1px #2587d7}
.create-match-type-bar svg{width:21px;height:21px;flex:none}
.create-match-type-bar button:focus-visible{outline:2px solid #2587d7;outline-offset:2px}

/* Phone creation: one decision at a time; desktop keeps the full form. */
#create-options-step[hidden],.create-game-picker[hidden],#create-game-back[hidden],#create-game-selected[hidden]{display:none!important}
.create-game-back,.create-game-selected{display:none}
@media(max-width:820px){
 #create-modal .modal-card{max-height:calc(100dvh - 24px);padding:18px 18px 20px}
 #create-modal .create-game-picker{margin-top:14px}
 #create-modal .create-game-options{gap:8px}
 #create-modal .create-game-options button{min-height:70px;padding:8px!important}
 #create-modal .create-game-art{width:54px;height:54px}
 #create-modal #create-options-step .setting{margin:12px 0}
 #create-modal .create-game-back{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:var(--blue,#2188de);padding:5px 0;font:600 14px system-ui;cursor:pointer}
 #create-modal .create-game-selected{display:block;margin:8px 0 0;font:700 16px system-ui;color:var(--text)}
}

/* Keep the room visible when choosing a new match on any screen. */
#create-modal{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
