:root{color-scheme:dark;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;--bg:#090b0d;--panel:#101316;--panel2:#15191d;--line:#2b2f33;--text:#f1eee8;--muted:#9a9fa5;--gold:#d8a23d;--gold2:#f0bd59;--green:#62c887;--red:#e96c67}*{box-sizing:border-box}body{margin:0;background:#07090b;color:var(--text);min-width:1180px}button,a{font:inherit}.page-bg{position:fixed;inset:0;z-index:-2;background:radial-gradient(circle at 30% 10%,#1a2026 0,transparent 30%),linear-gradient(#080a0cdd,#080a0cf4),url('/assets/bg-login.svg') center/cover no-repeat}.shell{width:min(1440px,calc(100% - 44px));margin:auto}.topbar{height:96px;background:#090b0df4;border-bottom:1px solid #24272a;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.topbar-inner{height:100%;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;gap:13px;color:inherit;text-decoration:none}.brand img{width:58px;height:58px;object-fit:contain}.brand span{display:grid}.brand b{font-family:Impact,"Arial Narrow",sans-serif;font-size:27px;letter-spacing:.02em}.brand small{color:var(--gold);font-size:10px;font-weight:800}.nav{display:flex;align-items:center;gap:8px;margin-left:25px}.nav button,.nav a{border:0;background:none;color:#d6d6d6;padding:18px 16px;text-decoration:none;cursor:pointer;position:relative}.nav .active,.nav button:hover,.nav a:hover{color:var(--gold2)}.nav .active:after{content:"";position:absolute;height:2px;left:12px;right:12px;bottom:2px;background:var(--gold)}.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.currency-button,.profile-button,.balance-box{border:1px solid #2c3034;background:#111417;border-radius:8px;color:#eee;min-height:54px}.currency-button{padding:0 14px;cursor:pointer}.profile-button{padding:9px 16px;display:grid;text-align:left;text-decoration:none;cursor:pointer}.profile-button small{color:var(--muted)}.balance-box{padding:8px 16px;display:grid;min-width:120px}.balance-box span{font-size:11px;color:var(--muted)}.balance-box b{font-size:22px;color:var(--gold2)}.main{padding:28px 0 55px}.notice{padding:12px 16px;margin-bottom:16px;border-radius:8px;background:#1f3926;border:1px solid #4b7755}.notice.is-error{background:#3b2323;border-color:#8a4c4c}.login-card{width:760px;margin:80px auto;padding:58px;text-align:center;background:#0d1013ed;border:1px solid #7b5b28;border-radius:18px;box-shadow:0 30px 100px #0008}.login-card h1{font:52px/1.05 Impact,"Arial Narrow",sans-serif;margin:20px 0}.login-card p{color:#afb3b7;font-size:18px}.login-card small{display:block;margin-top:24px;color:#858b91}.eyebrow{color:var(--gold);font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.gold-button,.ghost-button{border-radius:7px;min-height:44px;padding:0 18px;font-weight:800;cursor:pointer}.gold-button{border:1px solid #f2c66a;background:linear-gradient(135deg,#e1ad48,#b67820);color:#131313}.ghost-button{border:1px solid #343a3f;background:#12161a;color:#dedede}.steam-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;width:520px;margin-top:20px;height:64px}.hero{height:355px;border:1px solid #292d31;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:space-between;padding:48px 70px;background:linear-gradient(90deg,#080a0ce8 0%,#0b0d0f85 55%,#080a0ccd),url('/assets/bg-login.svg') center/cover no-repeat;box-shadow:0 20px 60px #0006}.hero-copy h1{font:76px/.95 Impact,"Arial Narrow",sans-serif;margin:18px 0 10px;letter-spacing:.02em}.hero-copy>p{font-size:20px;margin:0;color:#e5e5e5}.hero-logo{width:290px;height:290px;object-fit:contain;opacity:.9;filter:grayscale(1) brightness(1.5)}.hero-features{display:flex;gap:30px;margin-top:38px;color:#d6d6d6;font-size:13px}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:14px;margin-top:14px}.panel{background:#0f1215ed;border:1px solid #2a2e32;border-radius:9px;box-shadow:0 12px 30px #0004}.catalog-panel{padding:18px}.panel-title{display:flex;justify-content:space-between;align-items:center}.panel-title h2,.side-card h3,.page-panel h2{font-family:Impact,"Arial Narrow",sans-serif;letter-spacing:.03em}.rate-state{font-size:11px;color:#787f85}.category-tabs{display:flex;gap:9px;margin:17px 0}.category-tabs button{padding:10px 18px;border-radius:6px;border:1px solid #24292d;background:#171a1e;color:#dedede;cursor:pointer}.category-tabs button.active{background:linear-gradient(#d4a14a,#a96e20);border-color:#e0b25d;color:#161616;font-weight:800}.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.product-card{background:#111417;border:1px solid #2a2e31;border-radius:8px;overflow:hidden;cursor:pointer;transition:.15s}.product-card:hover{transform:translateY(-2px);border-color:#6d542b}.product-image{height:185px;position:relative;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 42%,#31383e 0,#15191d 45%,#0e1114 75%);overflow:hidden}.product-image:before{content:"";width:110px;height:110px;border:1px solid #4f555a;border-radius:50%;box-shadow:0 0 0 20px #ffffff05}.product-icon{position:absolute;font-size:64px;filter:grayscale(.15);text-shadow:0 8px 20px #000}.product-body{padding:13px}.product-body h3{font-size:16px;margin:0 0 7px}.product-body p{height:40px;margin:0;color:#9ca2a7;font-size:12px;line-height:1.45;overflow:hidden}.product-foot{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.product-price{font-size:22px;color:var(--gold2);font-weight:900}.product-buy{min-height:36px;padding:0 14px}.sidebar{display:grid;gap:14px;align-content:start}.side-card{padding:18px}.side-card h3{margin:0 0 16px;border-bottom:1px solid #292d31;padding-bottom:12px}.side-card>span{color:var(--muted);font-size:12px}.side-card>strong{display:block;color:var(--gold2);font-size:29px;margin:6px 0 16px}.side-card button{width:100%;margin-top:8px}.order-mini{display:grid;grid-template-columns:1fr auto;gap:4px;padding:10px 0;border-bottom:1px solid #24282c}.order-mini b{font-size:12px}.order-mini small{color:#838a90}.order-mini em{font-style:normal;color:var(--green);font-size:11px}.page-panel{padding:28px}.page-head{display:flex;align-items:end;justify-content:space-between}.page-head h2{font-size:38px;margin:7px 0}.page-head>strong{font-size:30px;color:var(--gold2)}.account-grid,.history-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.account-box{background:#15191d;border:1px solid #2b3034;padding:20px;border-radius:8px;display:grid;gap:8px}.account-box span{color:var(--muted)}.history-grid>div{background:#15191d;border:1px solid #2b3034;padding:18px;border-radius:8px}.list-item{padding:12px 0;border-bottom:1px solid #292e32;display:flex;justify-content:space-between;gap:14px}.list-item small{color:var(--muted)}.positive{color:var(--green)}.negative{color:var(--red)}.modal[hidden],.currency-popover[hidden]{display:none}.modal{position:fixed;inset:0;z-index:50}.modal-backdrop{position:absolute;inset:0;background:#000b;backdrop-filter:blur(6px)}.modal-card{position:relative;width:880px;margin:8vh auto;background:#111417;border:1px solid #5d4827;border-radius:12px;overflow:hidden;display:grid;grid-template-columns:1fr 1fr;box-shadow:0 35px 100px #000b}.modal-close{position:absolute;right:14px;top:10px;z-index:2;border:0;background:#161a1f;color:#fff;width:36px;height:36px;border-radius:50%;font-size:25px;cursor:pointer}.modal-visual{min-height:480px;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,#30383e 0,#13171a 52%,#0c0f11);font-size:120px}.modal-copy{padding:48px 38px}.modal-copy h2{font:38px Impact,"Arial Narrow",sans-serif;margin:10px 0 16px}.modal-copy p{color:#a7adb2;line-height:1.6}.modal-meta{margin-top:36px;padding-top:18px;border-top:1px solid #2c3034}.modal-meta span{color:var(--muted);display:block}.modal-meta strong{font-size:31px;color:var(--gold2)}.modal-actions{display:flex;gap:10px;margin-top:22px}.modal-actions button{flex:1}.currency-popover{position:fixed;right:36px;top:86px;z-index:60;background:#12161a;border:1px solid #33383d;border-radius:9px;padding:7px;box-shadow:0 20px 55px #000a;min-width:190px}.currency-popover button{width:100%;display:flex;justify-content:space-between;padding:11px 12px;background:none;border:0;color:#ddd;border-radius:6px;cursor:pointer}.currency-popover button:hover{background:#20252a}.empty{color:#8b9298;font-size:13px;padding:15px 0}@media(max-width:1250px){.product-grid{grid-template-columns:repeat(3,1fr)}.hero{padding:40px}.hero-logo{width:230px;height:230px}}

.creator-box{grid-column:1/-1;border-color:#66502b;background:linear-gradient(135deg,#17191a,#101315)}
.creator-box strong{font-size:22px;color:var(--gold2)}
.creator-box p{margin:0;color:var(--muted);font-size:13px}
.creator-box .gold-button{justify-self:start;margin-top:5px}
.owner-badge{display:inline-flex;align-items:center;min-height:36px;padding:0 13px;border:1px solid #8a672c;border-radius:999px;background:#2a2113;color:var(--gold2);font-size:11px;font-weight:900;letter-spacing:.12em}
.admin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px}
.admin-card{background:#15191d;border:1px solid #2b3034;padding:22px;border-radius:8px;display:grid;gap:9px}
.admin-card>span{color:var(--gold);font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.1em}
.admin-card>strong{font-size:22px}
.admin-card p{min-height:54px;margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.admin-card button:disabled{opacity:.55;cursor:not-allowed}

[hidden]{display:none!important}
.admin-tool-panel{margin-top:18px;padding:22px;background:#0c0f12;border:1px solid #3a2d18;border-radius:9px}.admin-tool-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.admin-tool-head h3{font:32px Impact,"Arial Narrow",sans-serif;margin:5px 0 6px}.admin-tool-head p{margin:0;color:var(--muted)}.admin-search-row{display:grid;grid-template-columns:1fr 150px;gap:10px;margin-top:20px}.admin-input{width:100%;min-height:46px;border:1px solid #343a3f;background:#111519;color:#f2eee7;border-radius:7px;padding:0 13px;outline:none}.admin-input:focus{border-color:#9a6c26;box-shadow:0 0 0 2px #d8a23d18}.admin-player-results{display:grid;gap:8px;margin-top:12px}.admin-player-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:12px 14px;background:#14181c;border:1px solid #2b3034;border-radius:7px;cursor:pointer}.admin-player-row:hover{border-color:#70552a}.admin-player-row b,.admin-player-row small,.admin-player-row code{display:block}.admin-player-row small{color:var(--muted);margin-top:3px}.admin-player-row strong{color:var(--gold2)}.admin-balance-editor{margin-top:18px;padding-top:18px;border-top:1px solid #2a2f33}.selected-player{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;padding:16px;background:#15191d;border:1px solid #2d3236;border-radius:8px}.selected-player span,.selected-balance small{display:block;color:var(--muted);font-size:12px}.selected-player strong{display:block;font-size:19px;margin:4px 0}.selected-balance{text-align:right}.selected-balance strong{font-size:26px;color:var(--gold2)}.balance-mode{display:flex;gap:8px;margin:18px 0}.balance-mode button,.quick-amounts button{border:1px solid #343a3f;background:#15191d;color:#ddd;border-radius:7px;min-height:40px;padding:0 16px;cursor:pointer}.balance-mode button.active{background:#5b431d;border-color:#a6782f;color:#ffd786}.admin-field{display:grid;gap:7px;margin-top:12px}.admin-field>span{color:#b8bdc1;font-size:13px}.quick-amounts{display:flex;gap:8px;margin-top:9px}.quick-amounts button:hover{border-color:#8d672b;color:var(--gold2)}.admin-save-button{margin-top:16px;min-width:230px}.admin-card .gold-button{margin-top:auto}

/* v0.4: navigation home + clear logout */
.brand{transition:opacity .15s ease,transform .15s ease}
.brand:hover{opacity:.92;transform:translateY(-1px)}
.header-logout-button{border:1px solid #423a2b;background:#17140f;color:#e9c576;border-radius:8px;min-height:54px;padding:0 16px;font-weight:800;cursor:pointer}
.header-logout-button:hover{border-color:#8a692f;background:#211a10;color:#ffd98a}

/* v0.6: D1 catalog management */
.product-photo,.modal-product-photo{width:100%;height:100%;object-fit:cover;display:block}
.modal-product-photo{min-height:480px}
.admin-catalog-toolbar{display:grid;grid-template-columns:1fr 180px;gap:10px;margin-top:20px}
.admin-catalog-layout{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(520px,1.15fr);gap:16px;margin-top:14px;align-items:start}
.admin-product-results{display:grid;gap:8px;max-height:760px;overflow:auto;padding-right:4px}
.admin-product-row{display:grid;grid-template-columns:58px 1fr auto;gap:12px;align-items:center;width:100%;padding:10px 12px;text-align:left;background:#14181c;border:1px solid #2b3034;border-radius:8px;color:#eee;cursor:pointer}
.admin-product-row:hover{border-color:#795b2d;background:#181c20}
.admin-product-row-visual{width:58px;height:58px;border-radius:7px;background:#0d1013;border:1px solid #2e3438;display:flex;align-items:center;justify-content:center;font-size:28px;overflow:hidden}
.admin-product-row-visual img{width:100%;height:100%;object-fit:cover}
.admin-product-row-copy{min-width:0}.admin-product-row-copy b,.admin-product-row-copy small,.admin-product-row-copy code{display:block}.admin-product-row-copy b{font-size:14px}.admin-product-row-copy small{color:var(--muted);font-size:11px;margin:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-product-row-copy code{font-size:10px;color:#a98a52}
.admin-product-row-price{text-align:right}.admin-product-row-price b,.admin-product-row-price small{display:block}.admin-product-row-price b{color:var(--gold2);font-size:15px}.admin-product-row-price small{font-size:10px;margin-top:5px}
.admin-product-editor{padding:18px;background:#15191d;border:1px solid #31363a;border-radius:9px}
.admin-editor-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.admin-editor-title span{display:block;color:var(--muted);font-size:11px}.admin-editor-title strong{display:block;margin-top:4px;font-size:21px}
.product-state-badge{padding:7px 10px;border-radius:999px;border:1px solid #47714e;color:#94d39f;background:#142018;font-size:10px!important;font-weight:900}.product-state-badge.is-off{border-color:#724848;color:#e28f8f;background:#211515}
.admin-product-preview{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center;margin-bottom:16px;padding:12px;background:#0f1215;border:1px solid #292e32;border-radius:8px}.admin-product-preview small{color:var(--muted);line-height:1.5}.admin-product-image-preview{height:105px;border:1px solid #32383d;border-radius:7px;background:radial-gradient(circle,#333a40,#111519 70%);display:flex;align-items:center;justify-content:center;font-size:46px;overflow:hidden}.admin-product-image-preview img{width:100%;height:100%;object-fit:cover}
.admin-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.admin-field-wide{grid-column:1/-1}.admin-textarea{min-height:100px;padding:12px 13px;resize:vertical;font-family:inherit}
.admin-switch{display:flex;align-items:center;gap:9px;margin-top:14px;color:#d8d8d8;font-size:13px}.admin-switch input{accent-color:#c38d33;width:17px;height:17px}
.admin-editor-actions{display:flex;gap:9px;margin-top:16px}.admin-editor-actions .gold-button{min-width:190px}
@media(max-width:1180px){.admin-catalog-layout{grid-template-columns:1fr}.admin-product-results{max-height:440px}}


/* v0.7: administrator management */
.admin-add-form{display:grid;grid-template-columns:1.15fr 1fr 1fr auto;gap:10px;align-items:end;margin-top:20px;padding:16px;background:#14181c;border:1px solid #2b3034;border-radius:8px}
.admin-add-form .admin-field{margin-top:0}
.admin-add-form .gold-button{min-height:46px;white-space:nowrap}
.admin-permission-note{margin-top:12px;padding:12px 14px;border:1px solid #3c3427;background:#17140f;border-radius:8px;color:#bdb6aa;font-size:12px;line-height:1.55}
.admin-permission-note b{color:#e8c878}
.admin-list{display:grid;gap:9px;margin-top:14px}
.admin-user-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px 15px;background:#14181c;border:1px solid #2b3034;border-radius:8px}
.admin-user-row.role-owner{border-color:#735829;background:linear-gradient(90deg,#1d170d,#14181c 48%)}
.admin-user-row.role-senior_admin{border-color:#633b36}
.admin-user-main{display:flex;gap:12px;align-items:center;min-width:0}
.admin-role-dot{width:11px;height:11px;border-radius:50%;background:#8b9399;box-shadow:0 0 12px #8b939955;flex:0 0 auto}
.role-owner .admin-role-dot{background:#d8a23d;box-shadow:0 0 12px #d8a23d66}
.role-senior_admin .admin-role-dot{background:#db645d;box-shadow:0 0 12px #db645d66}
.role-admin .admin-role-dot{background:#d6ad42;box-shadow:0 0 12px #d6ad4266}
.role-moderator .admin-role-dot{background:#6fc58a;box-shadow:0 0 12px #6fc58a66}
.admin-user-main b,.admin-user-main code,.admin-user-main small{display:block}
.admin-user-main b{font-size:15px}
.admin-user-main code{margin-top:4px;color:#c8a55f;font-size:11px}
.admin-user-main small{margin-top:4px;color:var(--muted);font-size:10px}
.admin-user-actions{display:grid;grid-template-columns:210px auto auto;gap:8px;align-items:center}
.admin-role-select{min-height:40px}
.admin-role-save,.danger-button{min-height:40px;padding:0 13px}
.danger-button{border:1px solid #70403e;background:#241515;color:#ef9a95;border-radius:7px;font-weight:800;cursor:pointer}
.danger-button:hover{border-color:#a95753;background:#321818}
.admin-owner-lock{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border:1px solid #755927;border-radius:999px;background:#241c0f;color:#e8c777;font-size:10px;font-weight:900;letter-spacing:.08em}
@media(max-width:1320px){.admin-add-form{grid-template-columns:1fr 1fr}.admin-add-form .gold-button{grid-column:1/-1}.admin-user-actions{grid-template-columns:1fr 1fr}.admin-role-select{grid-column:1/-1}}

/* v0.8: currency memory, top-up currency and button feedback */
.currency-popover{right:auto;top:auto;min-width:190px;transform-origin:top right}
.currency-popover:not([hidden]){animation:obs-popover-in .12s ease-out}
@keyframes obs-popover-in{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.currency-popover button{transition:background .1s ease,transform .07s ease,color .1s ease}

.admin-money-row{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:10px}
.admin-currency-select{cursor:pointer;font-weight:800;color:var(--gold2)}
.admin-conversion-hint{display:block;margin-top:7px;color:#8f969c;font-size:11px;line-height:1.4}

button,.gold-button,.ghost-button,.danger-button,.profile-button,.header-logout-button,.brand{transition:transform .07s ease,filter .07s ease,box-shadow .1s ease,border-color .1s ease,background-color .1s ease}
button:not(:disabled):active,.gold-button:not(:disabled):active,.ghost-button:not(:disabled):active,.danger-button:not(:disabled):active,.profile-button:active,.header-logout-button:not(:disabled):active{transform:translateY(1px) scale(.975);filter:brightness(.9)}
.brand:active{transform:translateY(1px) scale(.985)}
button:focus-visible,.gold-button:focus-visible,.ghost-button:focus-visible,.danger-button:focus-visible,.profile-button:focus-visible,.header-logout-button:focus-visible{outline:2px solid #d8a23d99;outline-offset:2px}
.gold-button:not(:disabled):active{box-shadow:inset 0 2px 7px #0006}
.ghost-button:not(:disabled):active,.currency-button:not(:disabled):active{box-shadow:inset 0 2px 6px #0008}

@media(max-width:1180px){.admin-money-row{grid-template-columns:1fr 140px}}

/* v0.9: player deletion and system log management */
.admin-system-panel{border-color:#4f2928}
.system-danger-box,.system-log-box{margin-top:18px;padding:18px;background:#121518;border:1px solid #2f3438;border-radius:9px}
.system-danger-box{border-color:#5d3432;background:linear-gradient(135deg,#181313,#111518 58%)}
.system-section-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.system-section-head h4{margin:5px 0 7px;font-size:21px}
.system-section-head p{margin:0;color:var(--muted);font-size:12px;line-height:1.55;max-width:850px}
.system-player-results{display:grid;gap:8px;margin-top:12px}
.system-player-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:13px 14px;background:#14181c;border:1px solid #31363a;border-radius:8px}
.system-player-main b,.system-player-main code,.system-player-main small{display:block}
.system-player-main b{font-size:15px}
.system-player-main code{margin-top:4px;color:#c8a55f;font-size:11px}
.system-player-main small{margin-top:5px;color:var(--muted);font-size:11px}
.system-log-head{align-items:center}
.system-log-actions{display:flex;gap:8px;flex:0 0 auto}
.system-log-summary{margin-top:14px;padding:10px 12px;border:1px solid #30363a;border-radius:7px;background:#0e1114;color:#b7bdc2;font-size:12px}
.system-log-list{display:grid;gap:7px;margin-top:10px;max-height:520px;overflow:auto;padding-right:3px}
.system-log-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:12px 13px;background:#14181c;border:1px solid #2b3034;border-radius:7px}
.system-log-row b,.system-log-row small{display:block}
.system-log-row b{font-size:13px;color:#e9e4db}
.system-log-row small{margin-top:4px;color:#b58f4f;font-size:10px}
.system-log-row p{margin:6px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.system-log-row time{color:#7f878d;font-size:10px;white-space:nowrap}
.danger-button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:1260px){.system-log-head{align-items:flex-start;flex-direction:column}.system-log-row{grid-template-columns:1fr}.system-log-row time{white-space:normal}}

/* v0.10: product image upload and crop editor */
.admin-product-image-tools{display:grid;gap:10px;align-content:center}.admin-product-image-tools small{color:var(--muted);line-height:1.5}.admin-product-image-actions{display:flex;gap:8px;flex-wrap:wrap}.admin-product-image-actions button{min-height:38px}.field-note{color:#737b82;font-weight:400}.crop-modal{z-index:80}.crop-card{position:relative;width:760px;margin:4vh auto;padding:26px;background:#111417;border:1px solid #6d5227;border-radius:12px;box-shadow:0 35px 100px #000c}.crop-head{padding-right:44px}.crop-head h2{font:38px Impact,"Arial Narrow",sans-serif;margin:7px 0 8px}.crop-head p{margin:0 0 18px;color:var(--muted);font-size:13px;line-height:1.5}.crop-stage{width:480px;height:480px;margin:0 auto;position:relative;overflow:hidden;background:#080a0c;border:1px solid #363c41;border-radius:9px;cursor:grab;touch-action:none;user-select:none;box-shadow:inset 0 0 0 1px #ffffff08}.crop-stage:active{cursor:grabbing}.crop-stage:after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 2px #d8a23d99}.crop-stage img{position:absolute;max-width:none;max-height:none;pointer-events:none;user-select:none}.crop-controls{display:grid;grid-template-columns:46px 1fr 46px auto;gap:10px;align-items:center;width:620px;margin:18px auto 0}.crop-controls input[type=range]{width:100%;accent-color:#d8a23d}.crop-zoom-button{padding:0;font-size:24px}.crop-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.crop-actions button{min-width:170px}.admin-product-image-preview img{width:100%;height:100%;object-fit:cover}@media(max-width:900px){.crop-card{width:calc(100% - 30px)}.crop-stage{width:min(480px,calc(100vw - 90px));height:min(480px,calc(100vw - 90px))}.crop-controls{width:100%;grid-template-columns:42px 1fr 42px}.crop-controls #crop-reset{grid-column:1/-1}}

/* v0.10.1: clearly visible press feedback for every interactive button */
button:not(:disabled),.gold-button:not(:disabled),.ghost-button:not(:disabled),.danger-button:not(:disabled),.currency-button:not(:disabled),.profile-button:not(:disabled),.header-logout-button:not(:disabled){
  will-change:transform,box-shadow,filter;
  transition:transform .08s ease,box-shadow .08s ease,filter .08s ease,border-color .08s ease,background .08s ease;
}
.gold-button:not(:disabled){box-shadow:0 4px 0 #785016,0 7px 16px #0004}
.ghost-button:not(:disabled),.currency-button:not(:disabled),.profile-button:not(:disabled),.header-logout-button:not(:disabled){box-shadow:0 3px 0 #090b0d,0 6px 12px #0003}
.danger-button:not(:disabled){box-shadow:0 4px 0 #5a2422,0 7px 16px #0004}
button:not(:disabled):active,.gold-button:not(:disabled):active,.ghost-button:not(:disabled):active,.danger-button:not(:disabled):active,.currency-button:not(:disabled):active,.profile-button:not(:disabled):active,.header-logout-button:not(:disabled):active,
button.obs-pressed:not(:disabled),.gold-button.obs-pressed:not(:disabled),.ghost-button.obs-pressed:not(:disabled),.danger-button.obs-pressed:not(:disabled),.currency-button.obs-pressed:not(:disabled),.profile-button.obs-pressed:not(:disabled),.header-logout-button.obs-pressed:not(:disabled){
  transform:translateY(4px) scale(.988)!important;
  filter:brightness(.84);
  box-shadow:inset 0 4px 9px #0009,0 0 0 transparent!important;
}
.admin-card .gold-button:not(:disabled):active,.admin-card .gold-button.obs-pressed:not(:disabled){transform:translateY(4px) scale(.992)!important}

/* =========================================================
   OpenByShop v11
   ========================================================= */
body{background:#07090b;min-width:1180px}
.page-bg{
  background:
    linear-gradient(180deg,rgba(5,7,9,.70),rgba(5,7,9,.90)),
    url('/assets/openbyshop-v11-bg.png') center top/cover no-repeat fixed;
}
.hero{
  background:
    linear-gradient(90deg,rgba(6,8,10,.93) 0%,rgba(6,8,10,.60) 52%,rgba(6,8,10,.78) 100%),
    url('/assets/openbyshop-v11-bg.png') center 54%/cover no-repeat;
}

/* Buttons: subtle lift on hover, only 1 px press. */
button:not(:disabled),.gold-button:not(:disabled),.ghost-button:not(:disabled),.danger-button:not(:disabled),.currency-button:not(:disabled),.profile-button:not(:disabled),.header-logout-button:not(:disabled){
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease,border-color .16s ease,background .16s ease;
}
.gold-button:not(:disabled){box-shadow:0 2px 0 #785016,0 7px 16px #0003}
.ghost-button:not(:disabled),.currency-button:not(:disabled),.profile-button:not(:disabled),.header-logout-button:not(:disabled){box-shadow:0 2px 0 #090b0d,0 5px 12px #0002}
.danger-button:not(:disabled){box-shadow:0 2px 0 #5a2422,0 7px 16px #0003}
@media (hover:hover){
  .gold-button:not(:disabled):hover,.ghost-button:not(:disabled):hover,.danger-button:not(:disabled):hover,.currency-button:not(:disabled):hover,.profile-button:not(:disabled):hover,.header-logout-button:not(:disabled):hover{
    transform:translateY(-2px);
    filter:brightness(1.08);
  }
  .gold-button:not(:disabled):hover{box-shadow:0 4px 0 #785016,0 10px 22px #d8a23d20}
  .ghost-button:not(:disabled):hover,.currency-button:not(:disabled):hover,.profile-button:not(:disabled):hover,.header-logout-button:not(:disabled):hover{box-shadow:0 4px 0 #090b0d,0 9px 18px #0004}
}
button:not(:disabled):active,.gold-button:not(:disabled):active,.ghost-button:not(:disabled):active,.danger-button:not(:disabled):active,.currency-button:not(:disabled):active,.profile-button:not(:disabled):active,.header-logout-button:not(:disabled):active,
button.obs-pressed:not(:disabled),.gold-button.obs-pressed:not(:disabled),.ghost-button.obs-pressed:not(:disabled),.danger-button.obs-pressed:not(:disabled),.currency-button.obs-pressed:not(:disabled),.profile-button.obs-pressed:not(:disabled),.header-logout-button.obs-pressed:not(:disabled),
.admin-card .gold-button:not(:disabled):active,.admin-card .gold-button.obs-pressed:not(:disabled){
  transform:translateY(1px)!important;
  filter:brightness(.96);
  box-shadow:0 1px 0 #090b0d,0 3px 8px #0003!important;
}

/* Admin v11: one module per screen. */
.admin-page{min-height:650px}
#admin-home-grid[hidden],#admin-main-header[hidden]{display:none!important}
.admin-screen{margin-top:0;border-color:#3a2d18}
.admin-back-button{white-space:nowrap}
.admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.admin-orders-toolbar{display:flex;justify-content:flex-end;margin:16px 0 10px}
.admin-orders-list{display:grid;gap:8px}
.admin-order-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:14px 16px;border:1px solid #2f3438;border-radius:8px;background:#14181c}
.admin-order-row b,.admin-order-row code,.admin-order-row small{display:block}
.admin-order-row code{margin-top:4px;color:#b48d4d;font-size:10px}
.admin-order-row small{margin-top:5px;color:var(--muted);font-size:11px}
.admin-order-meta{text-align:right;display:grid;gap:6px;justify-items:end}
.admin-order-meta strong{color:var(--gold2);font-size:18px}
.order-status{font-size:10px;color:#9dd6aa;border:1px solid #396047;border-radius:999px;padding:5px 8px;background:#122019}

/* Product image drag & drop. */
.admin-product-dropzone{position:relative;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.admin-product-dropzone:after{content:'Перетащите изображение сюда';position:absolute;inset:8px;border:1px dashed transparent;border-radius:7px;display:flex;align-items:flex-end;justify-content:center;padding:10px;color:transparent;font-size:11px;pointer-events:none;transition:.16s ease}
.admin-product-dropzone.is-dragover{border-color:#d8a23d;background:#17150f;box-shadow:0 0 0 3px #d8a23d15}
.admin-product-dropzone.is-dragover:after{border-color:#d8a23d88;color:#f1c76e;background:#090b0dcc}
.admin-editor-actions{flex-wrap:wrap}
.admin-editor-actions .danger-button{margin-left:auto}

/* Crop editor v11. */
.crop-card{width:820px;max-height:94vh;overflow:auto}
.crop-stage{width:520px;height:520px}
.crop-image-wrap{position:absolute;overflow:visible;pointer-events:none}
.crop-image-wrap img{position:absolute;left:50%;top:50%;max-width:none;max-height:none;transform-origin:center center}
.crop-scale-readout{width:660px;margin:16px auto 0;display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:12px}
.crop-scale-readout strong{color:var(--gold2);font-size:16px}
.crop-controls{grid-template-columns:46px 1fr 46px;width:660px;margin:8px auto 0}
.crop-controls input[type=range]{width:100%;accent-color:#d8a23d}
.crop-transform-controls{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:12px auto 0;width:660px}
.crop-transform-controls button{min-height:40px}

/* R2 maintenance. */
.system-r2-box{margin-top:18px;padding:18px;background:linear-gradient(135deg,#12181a,#101315);border:1px solid #35515a;border-radius:9px}

/* Mobile navigation exists only below desktop breakpoints. */
.mobile-menu-button{display:none;border:1px solid #343a3f;background:#12161a;color:#f0bd59;border-radius:8px;width:48px;height:48px;font-size:23px;cursor:pointer}

@media(max-width:900px){
  body{min-width:0}
  .shell{width:min(100% - 24px,760px)}
  .topbar{height:auto;min-height:72px}
  .topbar-inner{min-height:72px;gap:10px;flex-wrap:wrap;padding:8px 0}
  .brand{margin-right:auto}.brand img{width:44px;height:44px}.brand b{font-size:21px}.brand small{font-size:8px}
  .mobile-menu-button{display:block;order:2}
  .top-actions{order:3;margin-left:0;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .top-actions>*{min-width:0;width:100%}
  .nav{order:4;margin:0;width:100%;display:none;grid-template-columns:1fr;gap:4px;padding:8px 0 4px;border-top:1px solid #292d31}
  body.mobile-menu-open .nav{display:grid}
  .nav button,.nav a{text-align:left;padding:13px 12px;border:1px solid #24292d;border-radius:7px;background:#111417}
  .nav .active:after{display:none}
  .page-bg{background-position:58% top;background-attachment:scroll}
  .main{padding:16px 0 38px}
  .hero{height:auto;min-height:300px;padding:30px 24px;background-position:58% center}
  .hero-copy h1{font-size:48px}.hero-copy>p{font-size:16px}.hero-features{display:grid;gap:8px;margin-top:22px}.hero-logo{display:none}
  .content-grid{grid-template-columns:1fr}.sidebar{grid-template-columns:1fr 1fr}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-image{height:150px}
  .category-tabs{overflow-x:auto;padding-bottom:4px}.category-tabs button{white-space:nowrap}
  .account-grid,.history-grid{grid-template-columns:1fr}
  .page-panel{padding:18px}.page-head{align-items:flex-start;gap:10px}.page-head h2{font-size:31px}
  .admin-grid{grid-template-columns:1fr}
  .admin-tool-head{flex-direction:column}.admin-back-button{width:100%}
  .admin-catalog-toolbar{grid-template-columns:1fr}.admin-catalog-layout{grid-template-columns:1fr}.admin-product-results{max-height:350px}
  .admin-form-grid{grid-template-columns:1fr}.admin-field-wide{grid-column:auto}
  .admin-product-preview{grid-template-columns:1fr}.admin-product-image-preview{height:190px}
  .admin-search-row{grid-template-columns:1fr}.admin-money-row{grid-template-columns:1fr}
  .selected-player{grid-template-columns:1fr}.selected-balance{text-align:left}
  .admin-add-form{grid-template-columns:1fr}.admin-user-row,.system-player-row,.admin-order-row{grid-template-columns:1fr}.admin-user-actions{grid-template-columns:1fr}.admin-role-select{grid-column:auto}.admin-order-meta{text-align:left;justify-items:start}
  .modal-card{width:calc(100% - 20px);margin:2vh auto;grid-template-columns:1fr;max-height:96vh;overflow:auto}.modal-visual{min-height:280px}.modal-copy{padding:26px 22px}.modal-product-photo{min-height:280px;max-height:360px;object-fit:cover}
  .crop-card{width:calc(100% - 20px);margin:1.5vh auto;padding:18px}
  .crop-stage{width:min(520px,calc(100vw - 56px));height:min(520px,calc(100vw - 56px))}
  .crop-scale-readout,.crop-controls,.crop-transform-controls{width:100%}
  .crop-actions{display:grid;grid-template-columns:1fr 1fr}.crop-actions button{min-width:0}
  .currency-popover{max-width:calc(100vw - 24px)}
}

@media(max-width:560px){
  .shell{width:calc(100% - 16px)}
  .top-actions{grid-template-columns:1fr}
  .product-grid{grid-template-columns:1fr}
  .sidebar{grid-template-columns:1fr}
  .hero-copy h1{font-size:40px}
  .steam-button{width:100%}.login-card{width:100%;margin:35px auto;padding:30px 20px}.login-card h1{font-size:38px}
  .quick-amounts{display:grid;grid-template-columns:1fr 1fr}
  .crop-transform-controls{display:grid;grid-template-columns:1fr}
}

/* OpenByShop v11.1: category tabs hover/press feedback */
.category-tabs button{
  transition:transform .16s ease,background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,filter .16s ease;
}
@media (hover:hover){
  .category-tabs button:not(.active):hover{
    color:var(--gold2);
    border-color:#7a5b2b;
    background:#1d1912;
    transform:translateY(-2px);
    box-shadow:0 7px 16px #0004,0 0 0 1px #d8a23d18;
  }
  .category-tabs button.active:hover{
    transform:translateY(-2px);
    filter:brightness(1.08);
    border-color:#f0bd59;
    box-shadow:0 7px 18px #0004,0 0 14px #d8a23d20;
  }
}
.category-tabs button:not(:disabled):active{
  transform:translateY(1px)!important;
  filter:brightness(.96);
}


/* OpenByShop v11.4 — compact desktop header + link editor */
@media(min-width:901px){
  .top-actions{gap:7px}
  .currency-button,.profile-button,.balance-box{min-height:46px}
  .currency-button{padding:0 11px;min-width:82px}
  .balance-box{padding:5px 11px;min-width:105px}
  .balance-box span{font-size:10px}
  .balance-box b{font-size:18px;line-height:1.05}
  .profile-button{padding:6px 11px;min-width:108px}
  .profile-button span{font-size:14px}
  .profile-button small{font-size:11px}
  .header-logout-button{min-height:46px;padding:0 12px}
}
.more-links-wrap{position:relative;display:flex;align-items:center}
.more-links-button{border:0;background:none;color:#d6d6d6;padding:18px 14px;cursor:pointer;position:relative}
.more-links-button:hover{color:var(--gold2)}
.more-links-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:80;min-width:210px;padding:7px;background:#111417;border:1px solid #343a3f;border-radius:9px;box-shadow:0 18px 45px #000b}
.more-links-menu a{display:block;padding:11px 12px;border-radius:6px;color:#ddd;text-decoration:none;white-space:nowrap}
.more-links-menu a:hover{background:#201a11;color:var(--gold2)}
.account-site-links{display:flex;gap:8px;flex-wrap:wrap}
.account-site-links .ghost-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-width:120px}
.admin-links-list{display:grid;gap:12px;margin-top:18px}
.admin-link-row{padding:18px;background:#15191d;border:1px solid #30353a;border-radius:9px}
.admin-link-row-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.admin-link-row-head strong{display:block;font-size:20px;margin-top:4px}
.admin-link-visible{margin:0}
.admin-link-fields{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(320px,1.3fr) 190px;gap:12px;align-items:end}
.admin-link-fields .admin-field{margin-top:0}
@media(max-width:900px){
  .more-links-wrap{display:block}
  .more-links-button{width:100%;text-align:left;padding:13px 12px;border:1px solid #24292d;border-radius:7px;background:#111417}
  .more-links-menu{position:static;margin-top:4px;min-width:0;box-shadow:none}
  .admin-link-fields{grid-template-columns:1fr}
}


/* OpenByShop v11.5 — hero branding + Discord/Support icons */
.hero-copy{
  width:min(56%,620px);
}
.hero-copy>.eyebrow{
  display:block;
  width:100%;
  text-align:center;
  color:#c9c5bd;
  opacity:.82;
  font-family:Impact,"Arial Narrow",sans-serif;
  font-size:15px;
  letter-spacing:.15em;
  text-shadow:0 2px 7px #000;
}
.hero-copy h1{
  width:100%;
  margin:14px 0 12px;
  text-align:center;
  font-size:82px;
  letter-spacing:.055em;
  color:transparent;
  background:
    radial-gradient(circle at 8% 20%,rgba(12,13,14,.95) 0 1px,transparent 1.6px) 0 0/17px 17px,
    radial-gradient(circle at 72% 65%,rgba(12,13,14,.8) 0 1.2px,transparent 1.9px) 0 0/23px 21px,
    linear-gradient(#d7d4ce,#c9c6bf);
  -webkit-background-clip:text;
  background-clip:text;
  filter:drop-shadow(0 4px 4px #000b);
}
.hero-copy>p{
  text-align:center;
  color:#d2d0cb;
}
.hero-logo{
  width:290px;
  height:290px;
  object-fit:contain;
  opacity:.84;
  filter:brightness(.88) contrast(1.08);
  mix-blend-mode:screen;
}
.nav-external-link{
  display:inline-flex!important;
  align-items:center;
  gap:7px;
}
.nav-link-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  opacity:.92;
  transition:transform .16s ease,opacity .16s ease;
}
.nav-external-link:hover .nav-link-icon{
  transform:translateY(-1px);
  opacity:1;
}
@media(max-width:1250px) and (min-width:901px){
  .hero-copy{width:min(58%,560px)}
  .hero-copy h1{font-size:70px}
  .hero-logo{width:230px;height:230px}
}
@media(max-width:900px){
  .hero-copy{width:100%}
  .hero-copy>.eyebrow,.hero-copy h1,.hero-copy>p{text-align:left}
  .hero-copy h1{font-size:48px}
  .nav-external-link{display:flex!important}
}


/* OpenByShop v11.6 — unified OB logo + footer */
.brand img{
  width:58px;
  height:58px;
  object-fit:contain;
  opacity:.9;
  filter:brightness(.92) contrast(1.06);
  mix-blend-mode:screen;
}
.brand b{
  color:#dfdcd5;
  text-shadow:0 2px 8px #0008;
}
.brand small{
  color:#bc9670;
}
.site-footer{
  margin-top:28px;
  border-top:1px solid #24292d;
  background:linear-gradient(180deg,#0b0d10f0,#080a0cf7);
  box-shadow:0 -12px 30px #0003;
}
.site-footer-inner{
  min-height:108px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 0;
}
.site-footer-copy{
  display:grid;
  gap:6px;
}
.site-footer-copy strong{
  font-family:Impact,"Arial Narrow",sans-serif;
  font-size:27px;
  letter-spacing:.03em;
  color:#d9d5ce;
  text-shadow:0 2px 8px #0008;
}
.site-footer-copy span{
  color:#9ea3a9;
  font-size:13px;
}
.site-footer-brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:86px;
  height:86px;
  border-radius:12px;
  border:1px solid #2b3136;
  background:linear-gradient(180deg,#12161afd,#0d1013f8);
  box-shadow:0 12px 28px #0004, inset 0 1px 0 #ffffff08;
  text-decoration:none;
}
.site-footer-brand img{
  width:64px;
  height:64px;
  object-fit:contain;
  opacity:.88;
  filter:brightness(.9) contrast(1.08);
  mix-blend-mode:screen;
}
.site-footer-brand:hover{
  transform:translateY(-1px);
}
@media(max-width:900px){
  .site-footer-inner{
    min-height:auto;
    flex-direction:column;
    align-items:flex-start;
    padding:16px 0 20px;
  }
  .site-footer-copy strong{
    font-size:23px;
  }
  .site-footer-brand{
    width:72px;
    height:72px;
    align-self:flex-end;
  }
  .site-footer-brand img{
    width:54px;
    height:54px;
  }
}


/* OpenByShop v11.7 — compact header + footer matching approved layout */
@media(min-width:901px){
  .topbar{height:78px}
  .topbar-inner{gap:18px}
  .brand{gap:9px}
  .brand img{width:48px;height:48px}
  .brand b{font-size:23px;line-height:1}
  .brand small{font-size:8px;margin-top:4px}
  .nav{margin-left:12px;gap:3px}
  .nav button,.nav a,.more-links-button{padding:13px 10px;font-size:13px}
  .top-actions{gap:6px}
  .currency-button,.profile-button,.balance-box,.header-logout-button{min-height:44px}
  .currency-button{padding:0 10px;min-width:78px}
  .balance-box{padding:5px 9px;min-width:100px}
  .balance-box b{font-size:17px}
  .profile-button{padding:5px 9px;min-width:100px}
  .header-logout-button{padding:0 11px}
}

.site-footer{
  margin-top:24px;
  border-top:1px solid #24292d;
  background:#090b0df2;
}
.site-footer-inner{
  min-height:92px;
  display:grid;
  grid-template-columns:minmax(230px,1.25fr) minmax(150px,.7fr) minmax(220px,1fr) minmax(150px,.65fr);
  gap:34px;
  align-items:center;
  padding:16px 0;
}
.footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:inherit;
  text-decoration:none;
  min-width:0;
}
.footer-brand img{
  width:50px;
  height:50px;
  object-fit:contain;
  opacity:.9;
  filter:brightness(.92) contrast(1.06);
  mix-blend-mode:screen;
}
.footer-brand span{display:grid;min-width:0}
.footer-brand b{
  font-family:Impact,"Arial Narrow",sans-serif;
  font-size:22px;
  line-height:1;
  letter-spacing:.025em;
  color:#d9d6cf;
}
.footer-brand small{
  margin-top:5px;
  color:#c49142;
  font-size:8px;
  font-weight:800;
}
.footer-copyright,.footer-legal,.footer-social{
  display:grid;
  gap:5px;
  color:#83898e;
  font-size:11px;
  line-height:1.35;
}
.footer-legal{gap:4px}
.footer-social>span{margin-bottom:3px}
.footer-social-links{
  display:flex;
  align-items:center;
  gap:8px;
}
.footer-social-links a{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #30353a;
  border-radius:7px;
  background:#101316;
  color:#d9d9d9;
  text-decoration:none;
  transition:transform .15s ease,border-color .15s ease,color .15s ease,background .15s ease;
}
.footer-social-links a:hover{
  transform:translateY(-2px);
  border-color:#80612c;
  color:var(--gold2);
  background:#17140f;
}
.footer-social-links a:active{transform:translateY(1px)}
.footer-social-links svg{width:18px;height:18px}
.footer-social-letter{font-weight:900;font-size:17px}

@media(max-width:1050px) and (min-width:901px){
  .site-footer-inner{
    grid-template-columns:minmax(210px,1.2fr) minmax(140px,.8fr) minmax(150px,.7fr);
    gap:20px;
  }
  .footer-legal{display:none}
}
@media(max-width:900px){
  .site-footer-inner{
    min-height:auto;
    display:grid;
    grid-template-columns:1fr auto;
    gap:18px;
    padding:18px 0;
  }
  .footer-brand{grid-column:1/-1}
  .footer-copyright{grid-column:1}
  .footer-legal{display:none}
  .footer-social{grid-column:2;align-self:end}
  .footer-brand img{width:44px;height:44px}
  .footer-brand b{font-size:20px}
}


/* OpenByShop v11.8 — hero text alignment */
@media(min-width:901px){
  .hero-copy>.eyebrow,
  .hero-copy h1,
  .hero-copy>p{
    position:relative;
    left:-105px;
  }
}


/* OpenByShop v11.10 — softer text contrast */
:root{
  --text:#d9d5ce;
  --muted:#92979c;
}

body{
  color:var(--text);
}

/* Main headings: warm off-white instead of pure white */
h1,h2,h3,h4,
.page-head h2,
.panel-title h2,
.side-card h3,
.admin-card>strong,
.admin-tool-head h3,
.product-body h3{
  color:#dedad2;
}

/* Normal interface text */
.nav button,
.nav a,
.more-links-button,
.profile-button,
.currency-button,
.ghost-button,
.list-item,
.account-box,
.admin-card p,
.admin-field>span{
  color:#c6c4bf;
}

/* Hero text */
.hero-copy>p{
  color:#d2cec6;
}
.hero-features{
  color:#c7c5c0;
}

/* Cards and secondary descriptions */
.product-body p,
.admin-tool-head p,
.creator-box p,
.account-box span,
.side-card>span,
.list-item small,
.order-mini small{
  color:#92979c;
}

/* Avoid harsh pure white in modal / controls */
.modal-close{
  color:#ddd9d2;
}
.modal-copy p{
  color:#a9a6a0;
}

/* Slightly soften bright labels without making the UI dull */
.owner-badge,
.product-state-badge,
.eyebrow{
  text-shadow:none;
}

/* Keep gold as the primary visual accent */
.product-price,
.balance-box b,
.side-card>strong,
.page-head>strong{
  text-shadow:0 1px 8px rgba(216,162,61,.10);
}


/* OpenByShop v11.13 — ONLY large hero SHOP, approved Variant 3 */
.hero-copy h1{
  /* darker steel-gray, textured, slightly volumetric */
  color:transparent !important;
  background:
    radial-gradient(circle at 12% 28%, rgba(30,32,34,.95) 0 1px, transparent 1.6px) 0 0/14px 13px,
    radial-gradient(circle at 70% 68%, rgba(22,24,26,.72) 0 1.1px, transparent 1.8px) 0 0/19px 17px,
    linear-gradient(
      180deg,
      #b8b9b9 0%,
      #97999a 20%,
      #7d8081 48%,
      #a1a3a3 72%,
      #686b6d 100%
    );
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-stroke:.6px rgba(218,220,220,.30);
  text-shadow:
    0 1px 0 rgba(255,255,255,.10),
    0 3px 0 rgba(28,30,31,.82),
    0 5px 6px rgba(0,0,0,.82),
    0 10px 18px rgba(0,0,0,.38);
  filter:none;
}

/* OPENBYSHOP eyebrow above SHOP is intentionally unchanged */


/* OpenByShop v11.14 — Variant 3 ONLY on the three marked texts:
   header OPENBYSHOP / hero SHOP / footer OPENBYSHOP.
   Sizes and layout are intentionally unchanged. */
.brand b,
.hero-copy h1,
.footer-brand b{
  font-family:"DIN Condensed","Avenir Next Condensed","Arial Narrow",Impact,sans-serif !important;
  font-weight:800;
  font-stretch:condensed;
  color:transparent !important;
  background:
    radial-gradient(circle at 15% 26%, rgba(30,32,34,.95) 0 1px, transparent 1.55px) 0 0/13px 12px,
    radial-gradient(circle at 73% 67%, rgba(18,20,22,.72) 0 1px, transparent 1.7px) 0 0/18px 16px,
    linear-gradient(180deg,
      #b8b9ba 0%,
      #989a9b 22%,
      #777a7c 49%,
      #999b9c 70%,
      #65686a 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-stroke:.45px rgba(220,222,222,.25);
  text-shadow:
    0 1px 0 rgba(255,255,255,.08),
    0 2px 0 rgba(27,29,30,.78),
    0 4px 5px rgba(0,0,0,.72);
  filter:none !important;
}

/* Large hero SHOP gets slightly deeper volume, matching approved Variant 3 */
.hero-copy h1{
  -webkit-text-stroke:.65px rgba(220,222,222,.28);
  text-shadow:
    0 1px 0 rgba(255,255,255,.09),
    0 3px 0 rgba(26,28,29,.84),
    0 5px 7px rgba(0,0,0,.82),
    0 10px 18px rgba(0,0,0,.34);
}

/* Do not touch the gold subtitles below header/footer branding */
.brand small,
.footer-brand small{
  background:none !important;
  -webkit-text-fill-color:initial;
}


/* OpenByShop v11.15 — clean condensed typography from approved mockup */

/* Header/footer OPENBYSHOP: remove chrome/3D, keep size/layout */
.brand b,
.footer-brand b{
  font-family:"Arial Narrow","Roboto Condensed","Bahnschrift Condensed","Segoe UI",sans-serif !important;
  font-weight:800 !important;
  font-stretch:condensed;
  letter-spacing:.025em;
  color:#c8c9ca !important;
  background:none !important;
  -webkit-background-clip:initial !important;
  background-clip:initial !important;
  -webkit-text-fill-color:#c8c9ca !important;
  -webkit-text-stroke:0 !important;
  text-shadow:0 2px 4px rgba(0,0,0,.55) !important;
  filter:none !important;
  opacity:1 !important;
}

/* Main page/admin titles: clean narrow gray-white, no chunky distressed fill */
.page-head h1,
.page-head h2,
.panel-title h1,
.panel-title h2,
.admin-page h1,
.admin-page h2,
.admin-shell h1,
.admin-shell h2,
.creator-head h1,
.creator-head h2,
.admin-header h1,
.admin-header h2{
  font-family:"Arial Narrow","Roboto Condensed","Bahnschrift Condensed","Segoe UI",sans-serif !important;
  font-weight:800 !important;
  font-stretch:condensed;
  letter-spacing:.01em;
  color:#d1d2d3 !important;
  background:none !important;
  -webkit-background-clip:initial !important;
  background-clip:initial !important;
  -webkit-text-fill-color:#d1d2d3 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:0 2px 4px rgba(0,0,0,.45) !important;
  filter:none !important;
}

/* Explicit current title fallbacks used by the admin layout */
.admin-hero h1,
.admin-hero h2,
.admin-tool-head h1,
.admin-tool-head h2{
  font-family:"Arial Narrow","Roboto Condensed","Bahnschrift Condensed","Segoe UI",sans-serif !important;
  font-weight:800 !important;
  font-stretch:condensed;
  letter-spacing:.01em;
  color:#d1d2d3 !important;
  background:none !important;
  -webkit-text-fill-color:#d1d2d3 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:0 2px 4px rgba(0,0,0,.45) !important;
  filter:none !important;
}

/* Hero SHOP: same family, but keep a stronger presence without metallic texture */
.hero-copy h1{
  font-family:"Arial Narrow","Roboto Condensed","Bahnschrift Condensed","Segoe UI",sans-serif !important;
  font-weight:900 !important;
  font-stretch:condensed;
  letter-spacing:.02em;
  color:#c7c9ca !important;
  background:none !important;
  -webkit-background-clip:initial !important;
  background-clip:initial !important;
  -webkit-text-fill-color:#c7c9ca !important;
  -webkit-text-stroke:0 !important;
  text-shadow:
    0 2px 0 rgba(255,255,255,.04),
    0 4px 7px rgba(0,0,0,.65) !important;
  filter:none !important;
}


/* OpenByShop v11.16 — slightly grayer UI + unified headings */
:root{
  --text:#c5c8ca;
  --muted:#8e9499;
}

/* Main light text: slightly grayer, less glaring */
body{
  color:var(--text);
}

.nav button,
.nav a,
.more-links-button,
.profile-button,
.currency-button,
.ghost-button,
.list-item,
.account-box,
.admin-card p,
.admin-field>span,
.hero-copy>p,
.hero-features{
  color:#b9bdc0;
}

/* All major UI headings use the clean condensed family.
   This explicitly fixes "Баланс" and "Последние заказы". */
h1,h2,h3,h4,
.page-head h1,
.page-head h2,
.panel-title h1,
.panel-title h2,
.side-card h3,
.page-panel h2,
.admin-tool-head h1,
.admin-tool-head h2,
.admin-tool-head h3,
.history-grid h3,
.crop-head h2,
.modal-copy h2{
  font-family:"Arial Narrow","Roboto Condensed","Bahnschrift Condensed","Segoe UI",sans-serif !important;
  font-stretch:condensed;
  font-weight:800 !important;
  letter-spacing:.01em;
  color:#c2c5c7 !important;
  background:none !important;
  -webkit-background-clip:initial !important;
  background-clip:initial !important;
  -webkit-text-fill-color:#c2c5c7 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:0 2px 4px rgba(0,0,0,.42) !important;
  filter:none !important;
}

/* Header/footer brand: a touch darker gray */
.brand b,
.footer-brand b{
  color:#b9bdc0 !important;
  -webkit-text-fill-color:#b9bdc0 !important;
  text-shadow:0 2px 4px rgba(0,0,0,.50) !important;
}

/* Large SHOP: gray, clear, without chrome */
.hero-copy h1{
  color:#bec2c4 !important;
  -webkit-text-fill-color:#bec2c4 !important;
  text-shadow:
    0 2px 0 rgba(255,255,255,.025),
    0 4px 7px rgba(0,0,0,.62) !important;
}

/* Card/product titles: same gray family, but compact */
.product-body h3,
.admin-card>strong{
  font-family:"Arial Narrow","Roboto Condensed","Bahnschrift Condensed","Segoe UI",sans-serif !important;
  font-weight:800 !important;
  color:#c4c7c9 !important;
  -webkit-text-fill-color:#c4c7c9 !important;
  text-shadow:none !important;
}

/* Secondary copy slightly cooler/darker */
.product-body p,
.admin-tool-head p,
.creator-box p,
.account-box span,
.side-card>span,
.list-item small,
.order-mini small,
.rate-state{
  color:#8e9499 !important;
}

/* Keep semantic/accent colors intact */
.product-price,
.balance-box b,
.side-card>strong,
.page-head>strong,
.eyebrow{
  -webkit-text-fill-color:initial !important;
}

/* Preserve gold and green semantic text */
.balance-box b,
.side-card>strong,
.product-price{
  color:var(--gold2) !important;
}


/* OpenByShop v11.17 — product card image cleanup */
.product-image.has-photo:before{
  display:none !important;
}
.product-image.has-photo{
  background:#0e1114;
}
.product-image.has-photo .product-photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}


/* OpenByShop v11.18 — desktop header alignment and spacing */
@media(min-width:901px){
  /* Center gold subtitle exactly under OPENBYSHOP, not under the OB icon */
  .brand span{
    display:grid;
    text-align:center;
    justify-items:center;
  }
  .brand b,
  .brand small{
    width:100%;
    text-align:center;
  }

  /* Use the available strip between the brand and USD/balance controls */
  .nav{
    flex:1 1 auto;
    min-width:0;
    margin-left:24px;
    margin-right:20px;
    justify-content:space-evenly;
    gap:4px;
  }

  .nav button,
  .nav a,
  .more-links-button{
    padding-left:9px;
    padding-right:9px;
    white-space:nowrap;
  }

  .top-actions{
    flex:0 0 auto;
    margin-left:0;
  }
}


/* OpenByShop v11.19 — approved Hero Variant 4 / one steel-gray tone */
.hero-copy>.eyebrow,
.hero-copy h1{
  color:#858b90 !important;
  -webkit-text-fill-color:#858b90 !important;
  background:none !important;
  -webkit-background-clip:initial !important;
  background-clip:initial !important;
  -webkit-text-stroke:0 !important;
}

/* Keep SHOP strong but no bright-white glare */
.hero-copy h1{
  text-shadow:
    0 2px 0 rgba(255,255,255,.018),
    0 4px 7px rgba(0,0,0,.62) !important;
}

/* The PNG itself is already tinted to #858b90 */
.hero-logo{
  filter:none !important;
  opacity:.94;
}

/* Secondary hero copy stays readable, but softer than before */
.hero-copy>p{
  color:#a9adb0 !important;
}
.hero-features{
  color:#a5aaae !important;
}


/* OpenByShop v11.20 — catalog images exactly as saved in the square crop editor */
.product-image{
  height:auto !important;
  aspect-ratio:1 / 1;
}

/* R2 card images are saved as 600x600, so a square viewport shows the exact crop */
.product-image.has-photo .product-photo,
.product-photo{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* Override the old mobile fixed-height rule too */
@media(max-width:900px){
  .product-image{
    height:auto !important;
    aspect-ratio:1 / 1;
  }
}


/* OpenByShop v11.21 — catalog pagination, 10 products per page */
.catalog-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:24px 0 4px;
  padding-top:18px;
  border-top:1px solid #252a2e;
}
.catalog-pagination[hidden]{display:none!important}
.catalog-page-numbers{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.catalog-page-nav,
.catalog-page-number{
  min-height:38px;
  border:1px solid #343a3f;
  background:#12161a;
  color:#bfc3c6;
  border-radius:7px;
  font-weight:800;
  cursor:pointer;
  transition:transform .15s,border-color .15s,color .15s,background .15s;
}
.catalog-page-nav{padding:0 16px}
.catalog-page-number{min-width:40px;padding:0 10px}
.catalog-page-nav:not(:disabled):hover,
.catalog-page-number:hover{
  transform:translateY(-2px);
  color:#e2b45c;
  border-color:#72572d;
}
.catalog-page-number.active{
  background:linear-gradient(#d4a14a,#a96e20);
  border-color:#e0b25d;
  color:#151515;
}
.catalog-page-nav:disabled{
  opacity:.35;
  cursor:default;
}
.catalog-page-dots{
  min-width:24px;
  text-align:center;
  color:#747b81;
  font-weight:800;
}
.catalog-page-nav:not(:disabled):active,
.catalog-page-number:active{
  transform:translateY(1px);
}

@media(max-width:700px){
  .catalog-pagination{
    gap:7px;
    flex-wrap:wrap;
  }
  .catalog-page-nav{
    padding:0 12px;
  }
  .catalog-page-number{
    min-width:36px;
  }
}


/* OpenByShop v11.22 — account top-up method */
.account-topup-box{
  grid-column:1 / -1;
  gap:12px;
}

.topup-provider{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:15px 16px;
  border:1px solid #343a3f;
  border-radius:8px;
  background:#111519;
}

.topup-provider-info{
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
}

.topup-provider-logo{
  width:46px;
  height:46px;
  flex:0 0 46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#f15a24;
  color:#fff;
  font-size:25px;
  font-weight:900;
  box-shadow:0 5px 16px rgba(0,0,0,.28);
}

.topup-provider-info strong{
  display:block;
  color:#c7c9cb;
  font-size:18px;
  margin-bottom:3px;
}

.topup-provider-info small{
  display:block;
  color:#8f959a;
  line-height:1.4;
}

.topup-provider-button{
  flex:0 0 auto;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  white-space:nowrap;
}

@media(max-width:700px){
  .topup-provider{
    align-items:stretch;
    flex-direction:column;
  }
  .topup-provider-button{
    width:100%;
  }
}


/* OpenByShop v11.23 — Boosty -> Discord ticket manual top-up flow */
.topup-ticket{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:15px 16px;
  border:1px solid #343a3f;
  border-radius:8px;
  background:#0f1317;
}

.topup-ticket-copy{
  min-width:0;
}

.topup-ticket-copy strong{
  display:block;
  margin-bottom:4px;
  color:#c3c7ca;
  font-size:17px;
}

.topup-ticket-copy small{
  display:block;
  color:#8f959a;
  line-height:1.45;
  max-width:720px;
}

.topup-ticket-actions{
  display:flex;
  align-items:center;
  gap:9px;
  flex:0 0 auto;
}

.topup-ticket-button{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  white-space:nowrap;
}

.topup-admin-note{
  margin:0;
  padding:10px 12px;
  border-left:2px solid #b78334;
  background:rgba(183,131,52,.06);
  color:#92989d;
  line-height:1.45;
  font-size:13px;
}

@media(max-width:800px){
  .topup-ticket{
    flex-direction:column;
    align-items:stretch;
  }
  .topup-ticket-actions{
    width:100%;
    flex-direction:column;
  }
  .topup-ticket-actions .ghost-button,
  .topup-ticket-button{
    width:100%;
  }
}


/* OpenByShop v11.24 — player payments inside Balance players */
.admin-payments-section{
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid #2b3034;
}

.admin-payments-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
}

.admin-payments-head h4{
  margin:3px 0 4px;
}

.admin-payments-head p{
  margin:0;
  color:#8f959a;
}

.admin-payment-search-row{
  margin-bottom:12px;
}

.admin-payments-list{
  display:grid;
  gap:9px;
}

.admin-payment-row{
  display:grid;
  grid-template-columns:minmax(220px,.8fr) minmax(300px,1.3fr) auto;
  align-items:center;
  gap:18px;
  padding:13px 14px;
  border:1px solid #30363b;
  border-radius:8px;
  background:#111519;
}

.admin-payment-player{
  min-width:0;
}

.admin-payment-player b{
  display:block;
  margin-bottom:5px;
  color:#c6c9cb;
}

.admin-payment-player code{
  display:block;
  width:max-content;
  max-width:100%;
  color:#8e969c;
  font-size:12px;
  overflow-wrap:anywhere;
}

.admin-payment-details{
  min-width:0;
}

.admin-payment-details strong{
  display:block;
  margin-bottom:3px;
  font-size:16px;
}

.admin-payment-details small{
  display:block;
  color:#8c9398;
  line-height:1.4;
  overflow-wrap:anywhere;
}

.admin-payment-delete{
  white-space:nowrap;
}

@media(max-width:850px){
  .admin-payment-row{
    grid-template-columns:1fr;
    gap:10px;
  }

  .admin-payment-delete{
    width:100%;
  }

  .admin-payment-search-row{
    grid-template-columns:1fr;
  }
}


/* OpenByShop v11.25 — role permissions */
.admin-subtabs{
  display:flex;
  gap:8px;
  margin:0 0 18px;
  padding-bottom:12px;
  border-bottom:1px solid #2b3034;
}
.admin-subtab{
  min-height:40px;
  padding:0 16px;
  border:1px solid #343a3f;
  border-radius:7px;
  background:#111519;
  color:#9da3a8;
  font-weight:800;
  cursor:pointer;
}
.admin-subtab:hover{transform:translateY(-2px);border-color:#6e572f;color:#d0b071}
.admin-subtab.active{background:#1b1d1e;border-color:#9c7130;color:#d9b46d}
.admin-permissions-actions{display:flex;justify-content:flex-end;margin-top:16px}
.admin-permissions-matrix{overflow-x:auto;border:1px solid #30363b;border-radius:9px;background:#0f1317}
.permission-table{min-width:850px}
.permission-row{
  display:grid;
  grid-template-columns:minmax(290px,1.5fr) repeat(4,minmax(110px,.55fr));
  align-items:center;
  min-height:56px;
  border-bottom:1px solid #262c30;
}
.permission-row:last-child{border-bottom:0}
.permission-header{position:sticky;top:0;z-index:2;background:#151a1e;color:#aeb3b7;min-height:48px}
.permission-header>*{padding:0 12px;text-align:center}
.permission-header>:first-child{text-align:left}
.permission-group{
  padding:9px 12px;
  background:#191d20;
  border-bottom:1px solid #30363b;
  color:#b68a49;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.permission-name{padding:10px 12px;min-width:0}
.permission-name b{display:block;color:#c4c8ca;font-size:14px}
.permission-name small{display:block;color:#686f74;margin-top:2px;font-size:10px}
.permission-cell{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-left:1px solid #242a2e;
  color:#8f969b;
  font-size:12px;
  cursor:pointer;
}
.permission-cell input{width:18px;height:18px;accent-color:#b68131;cursor:pointer}
.permission-cell input:disabled{cursor:not-allowed;opacity:.55}
.permission-cell:has(input:checked){background:rgba(52,113,73,.08);color:#aebbb2}
.permission-owner{color:#b99251;background:rgba(181,131,49,.05);cursor:default}
.admin-product-dropzone.is-readonly{cursor:default}
.admin-product-dropzone.is-readonly .admin-product-image-tools small{opacity:.6}
@media(max-width:700px){
  .admin-subtabs{display:grid;grid-template-columns:1fr 1fr}
  .admin-subtab{width:100%}
  .admin-permissions-actions .gold-button{width:100%}
}


/* OpenByShop v11.26 — global fixed notifications */
.notice{
  position:fixed !important;
  top:88px;
  left:50%;
  transform:translate(-50%,-10px);
  z-index:120;
  width:min(1180px,calc(100vw - 36px));
  min-height:48px;
  margin:0 !important;
  padding:11px 48px 11px 46px !important;
  display:flex;
  align-items:center;
  gap:11px;
  border-radius:7px;
  box-shadow:0 12px 34px rgba(0,0,0,.48);
  backdrop-filter:blur(10px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}

.notice[hidden]{
  display:none !important;
}

.notice.is-visible{
  opacity:1;
  transform:translate(-50%,0);
  pointer-events:auto;
}

.notice.is-success{
  background:rgba(22,67,38,.97) !important;
  border:1px solid #3c955a !important;
  color:#d9f2df;
}

.notice.is-error{
  background:rgba(79,28,31,.97) !important;
  border:1px solid #b44e55 !important;
  color:#f3d8da;
}

.notice.is-warning{
  background:rgba(82,62,20,.97) !important;
  border:1px solid #c89c3e !important;
  color:#f0dfb5;
}

.notice-icon{
  position:absolute;
  left:16px;
  width:21px;
  height:21px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-size:13px;
  font-weight:900;
}

.notice.is-success .notice-icon{
  background:#67c884;
  color:#102416;
}

.notice.is-error .notice-icon{
  background:#df6a70;
  color:#2a0d0f;
}

.notice.is-warning .notice-icon{
  background:#e0ad48;
  color:#2d2108;
}

.notice-text{
  min-width:0;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
}

.notice-close{
  position:absolute;
  right:9px;
  top:50%;
  transform:translateY(-50%);
  width:30px;
  height:30px;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:currentColor;
  opacity:.72;
  font-size:23px;
  line-height:1;
  cursor:pointer;
}

.notice-close:hover{
  opacity:1;
  background:rgba(255,255,255,.07);
}

@media(max-width:900px){
  .notice{
    top:80px;
    width:calc(100vw - 20px);
    min-height:46px;
    padding:10px 42px 10px 42px !important;
  }
  .notice-icon{
    left:13px;
  }
  .notice-text{
    font-size:13px;
  }
}


/* OpenByShop v11.27 — Friendly Zone style purchase modal */
.modal-purchase-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:16px 0 10px;
}

.modal-option{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid #30363b;
  border-radius:8px;
  background:#111519;
}

.modal-option>span{
  color:#92989c;
  font-size:13px;
  font-weight:700;
}

.quantity-control{
  display:flex;
  align-items:center;
  gap:10px;
}

.quantity-control strong{
  width:34px;
  text-align:center;
  color:#c8cbcd;
  font-size:18px;
}

.quantity-button{
  width:36px;
  height:36px;
  padding:0;
  border:1px solid #3a4146;
  border-radius:7px;
  background:#171c20;
  color:#c9ccce;
  font-size:22px;
  font-weight:800;
  cursor:pointer;
  transition:transform .15s,border-color .15s,color .15s;
}

.quantity-button:not(:disabled):hover{
  transform:translateY(-2px);
  border-color:#816331;
  color:#e0b15a;
}

.quantity-button:not(:disabled):active{
  transform:translateY(1px);
}

.quantity-button:disabled{
  opacity:.3;
  cursor:default;
}

.modal-server-option{
  display:grid;
  grid-template-columns:auto minmax(145px,1fr);
}

.modal-server-option .admin-input{
  min-width:145px;
}

.modal-total{
  margin-top:8px;
}

.modal-total strong{
  font-size:22px;
}

@media(max-width:700px){
  .modal-purchase-options{
    grid-template-columns:1fr;
  }

  .modal-option{
    min-height:64px;
  }

  .modal-server-option{
    grid-template-columns:1fr;
  }
}


/* OpenByShop v11.28 — single server: hide server selector */
.modal-server-option[hidden]{
  display:none !important;
}

.modal-purchase-options{
  grid-template-columns:minmax(260px,420px);
}


/* OpenByShop v11.29 — grouped orders by Steam player */
.admin-orders-search-toolbar{
  display:grid;
  grid-template-columns:minmax(280px,1fr) auto auto auto;
  gap:8px;
  align-items:center;
}

.admin-order-players-list{
  display:grid;
  gap:10px;
}

.admin-order-player{
  overflow:hidden;
  border:1px solid #343a3f;
  border-radius:9px;
  background:#111519;
}

.admin-order-player.is-open{
  border-color:#68512d;
}

.admin-order-player-head{
  display:flex;
  align-items:stretch;
  gap:8px;
  padding:0;
}

.admin-order-player-toggle{
  flex:1 1 auto;
  min-width:0;
  min-height:78px;
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(260px,auto) 26px;
  align-items:center;
  gap:18px;
  padding:14px 16px;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
  box-shadow:none !important;
}

.admin-order-player-toggle:hover{
  background:#171c20;
}

.admin-order-player-identity b,
.admin-order-player-identity code{
  display:block;
}

.admin-order-player-identity b{
  color:#c9ccce;
  font-size:17px;
  margin-bottom:5px;
}

.admin-order-player-identity code{
  color:#b48d4d;
  font-size:11px;
  overflow-wrap:anywhere;
}

.admin-order-player-summary{
  display:grid;
  justify-items:end;
  gap:3px;
}

.admin-order-player-summary strong{
  color:#c5c8ca;
  font-size:14px;
}

.admin-order-player-summary em{
  color:var(--gold2);
  font-style:normal;
  font-weight:800;
}

.admin-order-player-summary small{
  color:#858c91;
  font-size:10px;
}

.admin-order-player-arrow{
  color:#949ba0;
  font-size:22px;
  text-align:center;
  transition:transform .16s ease;
}

.admin-order-player.is-open .admin-order-player-arrow{
  transform:rotate(180deg);
}

.admin-order-player-actions{
  display:flex;
  align-items:center;
  gap:7px;
  padding:12px 12px 12px 0;
}

.admin-order-player-actions .danger-button{
  white-space:nowrap;
}

.admin-order-player-body{
  padding:10px;
  border-top:1px solid #2b3034;
  background:#0d1114;
}

.admin-order-detail-row{
  grid-template-columns:minmax(0,1fr) auto auto;
  margin-bottom:7px;
  background:#171c20;
}

.admin-order-detail-row:last-child{
  margin-bottom:0;
}

.admin-order-delete{
  align-self:center;
  white-space:nowrap;
}

@media(max-width:1000px){
  .admin-orders-search-toolbar{
    grid-template-columns:1fr 1fr;
  }

  .admin-orders-search-toolbar .admin-input{
    grid-column:1 / -1;
  }

  .admin-order-player-head{
    display:block;
  }

  .admin-order-player-toggle{
    width:100%;
    grid-template-columns:1fr auto;
  }

  .admin-order-player-summary{
    grid-column:1 / 2;
    justify-items:start;
    margin-top:8px;
  }

  .admin-order-player-arrow{
    grid-column:2;
    grid-row:1 / span 2;
  }

  .admin-order-player-actions{
    padding:0 12px 12px;
  }
}

@media(max-width:700px){
  .admin-orders-search-toolbar{
    grid-template-columns:1fr;
  }

  .admin-orders-search-toolbar .admin-input{
    grid-column:auto;
  }

  .admin-order-player-toggle{
    grid-template-columns:1fr 24px;
    padding:12px;
  }

  .admin-order-player-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .admin-order-player-actions .danger-button{
    width:100%;
  }

  .admin-order-detail-row{
    grid-template-columns:1fr;
    gap:10px;
  }

  .admin-order-meta{
    text-align:left;
    justify-items:start;
  }

  .admin-order-delete{
    width:100%;
  }
}


/* OpenByShop v11.31C — display-only purchases + top-ups */
.admin-history-purchase-row{
  border-left:4px solid #a94f55;
  background:linear-gradient(90deg,rgba(117,42,47,.13),#171c20 28%);
}

.admin-history-topup-row{
  border-left:4px solid #4b9d6b;
  background:linear-gradient(90deg,rgba(36,101,62,.16),#171c20 28%);
}

.admin-history-purchase-amount{
  color:#e27c82 !important;
}

.admin-history-topup-amount{
  color:#70d99f !important;
}

.admin-history-topup-label{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:0 9px;
  border:1px solid #377d56;
  border-radius:999px;
  color:#89dfab;
  background:rgba(44,116,75,.12);
  font-size:11px;
  font-weight:800;
}


/* OpenByShop v11.31D — history player list includes top-up-only players */
.history-negative-balance{
  color:#df747a !important;
}


/* OpenByShop v11.31E — ONLY client history status under price */
.history-order-item{
  align-items:flex-start;
}

.history-order-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:7px;
  flex:0 0 auto;
  text-align:right;
}

.history-order-right>strong{
  white-space:nowrap;
}

.history-order-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.025em;
  white-space:nowrap;
}

.history-order-status.is-pending{
  color:#e3b95c;
  border:1px solid #9b7738;
  background:rgba(154,115,48,.10);
}

.history-order-status.is-delivered{
  color:#8fe0ad;
  border:1px solid #3d845a;
  background:rgba(49,119,76,.12);
}


/* OpenByShop — history cleanup controls */
.history-column-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:4px;
}

.history-column-head h3{
  margin:0;
}

.history-operations-clear,
.history-orders-clear{
  min-height:34px;
  padding:0 11px;
  font-size:11px;
  white-space:nowrap;
}

@media(max-width:700px){
  .history-column-head{
    align-items:stretch;
    flex-direction:column;
  }
  .history-operations-clear,
.history-orders-clear{
    width:100%;
  }
}


.admin-history-operation-negative{
  color:#ff9a96;
}

.admin-history-clear-all{
  font-weight:800;
}


/* v3: точечное удаление записей истории */
.admin-history-purchase-row .admin-order-delete,
.admin-history-topup-row .admin-order-delete{
  flex:0 0 auto;
}


/* ==========================================================
   OpenByShop Mobile Catalog v1
   Friendly Zone-style compact 2-column catalog.
   Desktop (>900px) is untouched.
   ========================================================== */
@media(max-width:900px){
  .catalog-panel{
    padding:14px 12px;
  }

  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .product-card{
    min-width:0;
    border-radius:8px;
  }

  .product-image{
    width:100%;
    height:auto !important;
    aspect-ratio:1 / 1 !important;
  }

  .product-body{
    padding:10px 9px 9px;
  }

  .product-body h3{
    margin:0 0 6px;
    min-height:36px;
    font-size:14px !important;
    line-height:18px;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }

  .product-body p{
    display:none;
  }

  .product-foot{
    margin-top:7px;
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .product-price{
    font-size:18px !important;
    line-height:22px;
    text-align:center;
  }

  .product-buy{
    width:100%;
    min-height:42px;
    padding:0 8px;
    font-size:14px;
  }
}

/* Keep two cards even on normal phones.
   Only extremely narrow screens fall back to one column. */
@media(max-width:560px){
  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:350px){
  .product-grid{
    grid-template-columns:1fr !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v2 — Friendly Zone layout
   Mobile only. Desktop >900px untouched.
   ========================================================== */
@media(max-width:900px){
  /* HEADER: logo left, balance + burger right */
  .topbar{
    height:76px !important;
    min-height:76px !important;
  }

  .topbar-inner{
    height:76px !important;
    min-height:76px !important;
    padding:8px 0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto auto !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
  }

  .brand{
    grid-column:1;
    min-width:0;
    margin:0 !important;
  }

  .brand img{
    width:42px !important;
    height:42px !important;
  }

  .brand span{
    min-width:0;
  }

  .brand b{
    font-size:20px !important;
    white-space:nowrap;
  }

  .brand small{
    font-size:7px !important;
    white-space:nowrap;
  }

  .top-actions{
    grid-column:2;
    grid-row:1;
    width:auto !important;
    margin:0 !important;
    display:flex !important;
    align-items:center;
    gap:0 !important;
  }

  /* Friendly Zone-style header: only balance stays visible */
  .top-actions .currency-button,
  .top-actions .profile-button,
  .top-actions .header-logout-button{
    display:none !important;
  }

  .top-actions .balance-box{
    width:auto !important;
    min-width:112px !important;
    min-height:48px !important;
    padding:6px 12px !important;
    border-color:#6f5326;
    background:#101316f2;
  }

  .top-actions .balance-box span{
    display:none;
  }

  .top-actions .balance-box b{
    font-size:20px !important;
    line-height:1 !important;
    color:var(--gold2);
  }

  .mobile-menu-button{
    grid-column:3;
    grid-row:1;
    order:initial !important;
    display:block !important;
    width:48px !important;
    height:48px !important;
    position:relative;
    z-index:121;
    border-color:#6f5326;
    background:#111417f5;
  }

  /* DRAWER is completely hidden until burger is pressed */
  .nav{
    display:none !important;
    position:fixed !important;
    z-index:120 !important;
    top:0 !important;
    right:0 !important;
    left:auto !important;
    width:min(84vw,360px) !important;
    height:100dvh !important;
    margin:0 !important;
    padding:92px 16px 22px !important;
    background:#0b0e11f8 !important;
    border:0 !important;
    border-left:1px solid #5a4324 !important;
    box-shadow:-24px 0 70px #000c !important;
    overflow-y:auto;
    grid-template-columns:1fr !important;
    align-content:start;
    gap:8px !important;
  }

  body.mobile-menu-open::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:119;
    background:#000a;
    backdrop-filter:blur(3px);
  }

  body.mobile-menu-open .nav{
    display:grid !important;
  }

  .nav button,
  .nav a{
    width:100%;
    min-height:48px;
    padding:13px 14px !important;
    text-align:left !important;
    border:1px solid #262b2f !important;
    border-radius:7px !important;
    background:#12161a !important;
  }

  .nav .active{
    color:var(--gold2) !important;
    border-color:#70552a !important;
    background:#1b1710 !important;
  }

  /* HERO: compact and readable, not a giant empty block */
  .main{
    padding-top:12px !important;
  }

  .hero{
    height:230px !important;
    min-height:230px !important;
    padding:20px 22px !important;
    align-items:center !important;
    background-position:62% center !important;
  }

  .hero-copy{
    width:100% !important;
    max-width:520px;
  }

  .hero-copy>.eyebrow{
    font-size:10px !important;
    letter-spacing:.16em;
  }

  .hero-copy h1{
    font-size:54px !important;
    line-height:.88 !important;
    margin:8px 0 7px !important;
  }

  .hero-copy>p{
    font-size:14px !important;
    line-height:1.3;
    margin:0 !important;
    max-width:310px;
  }

  .hero-features{
    margin-top:20px !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    font-size:11px !important;
  }

  .hero-features span{
    min-width:0;
    white-space:normal;
  }

  .hero-logo{
    display:none !important;
  }

  /* Catalog starts immediately below hero, like Friendly Zone */
  .content-grid{
    margin-top:10px !important;
  }

  .catalog-panel{
    padding:14px 10px !important;
  }

  .panel-title{
    margin-bottom:6px;
  }

  .panel-title h2{
    font-size:26px !important;
    margin:0;
  }

  .rate-state{
    display:none !important;
  }

  .category-tabs{
    margin:10px 0 12px !important;
    gap:7px !important;
    overflow-x:auto !important;
    scrollbar-width:none;
  }

  .category-tabs::-webkit-scrollbar{
    display:none;
  }

  .category-tabs button{
    flex:0 0 auto;
    padding:9px 14px !important;
    white-space:nowrap;
  }

  /* The right desktop sidebar is not shown in mobile catalog */
  #shop-view .sidebar{
    display:none !important;
  }

  .content-grid{
    grid-template-columns:1fr !important;
  }

  /* Product cards: Friendly Zone density */
  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .product-card{
    border-radius:8px !important;
  }

  .product-image{
    aspect-ratio:1 / 1 !important;
    height:auto !important;
  }

  .product-body{
    padding:8px 8px 9px !important;
  }

  .product-body h3{
    min-height:34px !important;
    margin:0 0 4px !important;
    font-size:13px !important;
    line-height:17px !important;
  }

  .product-foot{
    margin-top:5px !important;
    gap:7px !important;
  }

  .product-price{
    font-size:17px !important;
    line-height:21px !important;
  }

  .product-buy{
    min-height:40px !important;
    font-size:13px !important;
  }

  .catalog-pagination{
    margin-top:14px !important;
  }
}

@media(max-width:430px){
  .brand b{font-size:18px !important}
  .brand small{display:none}
  .top-actions .balance-box{
    min-width:98px !important;
    padding:6px 9px !important;
  }
  .top-actions .balance-box b{font-size:18px !important}
  .hero{height:218px !important;min-height:218px !important;padding:18px !important}
  .hero-copy h1{font-size:50px !important}
  .hero-copy>p{font-size:13px !important}
  .hero-features{font-size:10px !important;gap:6px !important}
}

@media(max-width:350px){
  .product-grid{
    grid-template-columns:1fr !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v3 — hard header fix
   ========================================================== */
@media(max-width:900px){
  body{min-width:0 !important}

  .shell{
    width:calc(100% - 20px) !important;
    max-width:none !important;
  }

  .topbar{
    height:74px !important;
    min-height:74px !important;
  }

  .topbar-inner{
    height:74px !important;
    min-height:74px !important;
    padding:8px 0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto auto !important;
    grid-template-rows:1fr !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
  }

  #brand-home{
    grid-column:1 !important;
    grid-row:1 !important;
    margin:0 !important;
    min-width:0 !important;
  }

  #brand-home img{
    width:40px !important;
    height:40px !important;
  }

  #brand-home b{
    font-size:19px !important;
  }

  #brand-home small{
    font-size:7px !important;
  }

  #currency-button,
  #profile-button,
  #header-login-button,
  #header-logout-button{
    display:none !important;
  }

  #header-balance{
    display:grid !important;
    width:auto !important;
    min-width:105px !important;
    min-height:46px !important;
    padding:6px 11px !important;
    margin:0 !important;
  }

  #header-balance span{
    display:none !important;
  }

  #header-balance b{
    font-size:18px !important;
    line-height:1 !important;
  }

  .top-actions{
    grid-column:2 !important;
    grid-row:1 !important;
    order:initial !important;
    margin:0 !important;
    width:auto !important;
    display:block !important;
  }

  #mobile-menu-button{
    grid-column:3 !important;
    grid-row:1 !important;
    order:initial !important;
    width:46px !important;
    height:46px !important;
    display:block !important;
    margin:0 !important;
  }

  .nav{
    display:none !important;
  }

  body.mobile-menu-open .nav{
    display:grid !important;
  }

  .main{
    padding-top:10px !important;
  }

  .hero{
    width:100% !important;
    height:220px !important;
    min-height:220px !important;
    padding:18px !important;
    margin:0 !important;
  }

  .hero-copy h1{
    font-size:46px !important;
  }

  .hero-copy>p{
    font-size:13px !important;
  }

  .hero-features{
    margin-top:16px !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    font-size:10px !important;
  }

  .content-grid{
    width:100% !important;
    grid-template-columns:1fr !important;
  }

  .catalog-panel{
    width:100% !important;
  }

  .product-grid{
    width:100% !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }
}

@media(max-width:430px){
  #brand-home b{font-size:17px !important}
  #brand-home small{display:none !important}
  #header-balance{min-width:96px !important;padding:6px 8px !important}
  #header-balance b{font-size:17px !important}
}

@media(max-width:350px){
  .product-grid{grid-template-columns:1fr !important}
}


/* ==========================================================
   OpenByShop Mobile v4 — larger burger button
   ========================================================== */
@media(max-width:900px){
  #mobile-menu-button{
    width:58px !important;
    height:58px !important;
    min-width:58px !important;
    min-height:58px !important;
    font-size:27px !important;
    line-height:1 !important;
    border-radius:10px !important;
  }

  .topbar-inner{
    grid-template-columns:minmax(0,1fr) auto auto !important;
    gap:10px !important;
  }

  #header-balance{
    min-height:58px !important;
    padding:8px 14px !important;
  }
}

@media(max-width:430px){
  #mobile-menu-button{
    width:56px !important;
    height:56px !important;
    min-width:56px !important;
    min-height:56px !important;
    font-size:26px !important;
  }

  #header-balance{
    min-height:56px !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v5 — iPhone 16 Pro Max optimization
   Target CSS viewport around 440px wide.
   Desktop remains untouched.
   ========================================================== */
@media(min-width:431px) and (max-width:460px){
  .shell{
    width:calc(100% - 24px) !important;
  }

  .topbar{
    height:82px !important;
    min-height:82px !important;
  }

  .topbar-inner{
    height:82px !important;
    min-height:82px !important;
    padding:10px 0 !important;
    grid-template-columns:minmax(0,1fr) auto auto !important;
    gap:10px !important;
  }

  #brand-home img{
    width:44px !important;
    height:44px !important;
  }

  #brand-home b{
    font-size:20px !important;
  }

  #brand-home small{
    display:block !important;
    font-size:7px !important;
  }

  #header-balance{
    min-width:118px !important;
    min-height:58px !important;
    padding:8px 14px !important;
    border-radius:10px !important;
  }

  #header-balance b{
    font-size:20px !important;
  }

  #mobile-menu-button{
    width:60px !important;
    height:60px !important;
    min-width:60px !important;
    min-height:60px !important;
    font-size:28px !important;
    border-radius:11px !important;
  }

  .main{
    padding-top:12px !important;
  }

  .hero{
    height:238px !important;
    min-height:238px !important;
    padding:20px 22px !important;
    border-radius:12px !important;
    background-position:60% center !important;
  }

  .hero-copy h1{
    font-size:50px !important;
    line-height:.9 !important;
  }

  .hero-copy>p{
    max-width:330px !important;
    font-size:14px !important;
    line-height:1.35 !important;
  }

  .hero-features{
    margin-top:18px !important;
    font-size:10.5px !important;
    gap:8px !important;
  }

  .content-grid{
    margin-top:12px !important;
  }

  .catalog-panel{
    padding:16px 12px !important;
  }

  .panel-title h2{
    font-size:28px !important;
  }

  .category-tabs{
    gap:7px !important;
    margin:10px 0 14px !important;
  }

  .category-tabs button{
    padding:10px 14px !important;
    font-size:14px !important;
  }

  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
  }

  .product-card{
    border-radius:9px !important;
  }

  .product-body{
    padding:9px 9px 10px !important;
  }

  .product-body h3{
    min-height:36px !important;
    font-size:13.5px !important;
    line-height:18px !important;
  }

  .product-price{
    font-size:18px !important;
    line-height:22px !important;
  }

  .product-buy{
    min-height:42px !important;
    font-size:14px !important;
    border-radius:7px !important;
  }

  .catalog-pagination{
    margin-top:16px !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v6 — true full-width iPhone layout
   Fixes Safari loading at a visually "zoomed" width.
   ========================================================== */
@media(max-width:900px){
  html,
  body{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
  }

  body{
    margin:0 !important;
  }

  .shell,
  .topbar-inner,
  .main,
  .hero,
  .content-grid,
  .catalog-panel{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .shell{
    padding-left:12px !important;
    padding-right:12px !important;
  }

  .topbar .shell,
  .main.shell{
    width:100% !important;
    max-width:none !important;
  }

  .topbar-inner{
    grid-template-columns:minmax(0,1fr) auto auto !important;
  }

  #brand-home{
    min-width:0 !important;
    overflow:hidden !important;
  }

  #brand-home span{
    min-width:0 !important;
  }

  #brand-home b{
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .hero{
    margin-left:0 !important;
    margin-right:0 !important;
  }

  .content-grid{
    margin-left:0 !important;
    margin-right:0 !important;
  }

  .catalog-panel{
    overflow:hidden !important;
  }

  .category-tabs{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
  }

  .product-grid{
    display:grid !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:9px !important;
  }

  .product-card{
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
  }

  .product-image,
  .product-body{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .product-image{
    aspect-ratio:1 / 1 !important;
    height:auto !important;
    overflow:hidden !important;
  }

  .product-image img{
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    object-fit:cover !important;
  }
}

/* iPhone 16 Pro Max / ~440 CSS px:
   keep exactly 2 columns and use the entire screen width. */
@media(min-width:431px) and (max-width:460px){
  .shell{
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .catalog-panel{
    padding:14px 10px !important;
  }

  .product-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    gap:8px !important;
  }
}

/* Do NOT collapse to one column on narrow phones anymore.
   User wants 2 cards even in the smallest/most zoomed-out mobile state. */
@media(max-width:430px){
  .product-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .shell{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .catalog-panel{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .product-body h3{
    font-size:12.5px !important;
    line-height:16px !important;
    min-height:32px !important;
  }

  .product-price{
    font-size:16px !important;
  }

  .product-buy{
    min-height:40px !important;
    font-size:12.5px !important;
  }
}

/* Override previous <=350px single-column rule. */
@media(max-width:350px){
  .product-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v6.1 — DRAWER FIX
   Keeps the burger menu above all page panels and outside
   catalog/hero stacking contexts.
   ========================================================== */
@media(max-width:900px){
  .topbar,
  .topbar-inner,
  .shell,
  .main{
    overflow:visible !important;
  }

  .topbar,
  .topbar-inner{
    transform:none !important;
    filter:none !important;
    contain:none !important;
    isolation:auto !important;
  }

  #mobile-menu-button{
    position:relative !important;
    z-index:10002 !important;
  }

  .nav{
    position:fixed !important;
    top:0 !important;
    right:0 !important;
    bottom:0 !important;
    left:auto !important;

    width:min(86vw,380px) !important;
    max-width:380px !important;
    height:100dvh !important;
    min-height:100dvh !important;

    margin:0 !important;
    padding:
      calc(env(safe-area-inset-top, 0px) + 88px)
      16px
      calc(env(safe-area-inset-bottom, 0px) + 20px)
      16px !important;

    box-sizing:border-box !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;

    background:#0b0e11 !important;
    border:0 !important;
    border-left:1px solid #6d5229 !important;
    border-radius:0 !important;
    box-shadow:-24px 0 70px rgba(0,0,0,.78) !important;

    z-index:10001 !important;
  }

  body:not(.mobile-menu-open) .nav{
    display:none !important;
  }

  body.mobile-menu-open{
    overflow:hidden !important;
    touch-action:none;
  }

  body.mobile-menu-open .nav{
    display:grid !important;
    grid-template-columns:1fr !important;
    align-content:start !important;
    gap:8px !important;
  }

  body.mobile-menu-open::before{
    content:"";
    position:fixed !important;
    inset:0 !important;
    width:100vw !important;
    height:100dvh !important;
    margin:0 !important;
    background:rgba(0,0,0,.72) !important;
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
    z-index:10000 !important;
    pointer-events:auto !important;
  }

  .nav button,
  .nav a{
    position:relative !important;
    z-index:10003 !important;
  }

  /* Catalog/hero must always stay under the open drawer. */
  .hero,
  .content-grid,
  .catalog-panel,
  .product-grid,
  .product-card{
    position:relative;
    z-index:auto !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v6.2 — CATALOG FIT FIX
   Entire catalog panel must fit the iPhone viewport.
   ========================================================== */
@media(max-width:900px){
  html, body{
    overflow-x:hidden !important;
  }

  .main,
  .content-grid,
  .catalog-panel{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .catalog-panel{
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:10px !important;
    padding-right:10px !important;
    overflow:hidden !important;
  }

  .panel-title,
  .category-tabs,
  .product-grid,
  .catalog-pagination{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* Categories stay inside the catalog width and scroll horizontally. */
  .category-tabs{
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding-bottom:2px !important;
  }

  .category-tabs::-webkit-scrollbar{
    display:none;
  }

  .category-tabs button{
    flex:0 0 auto !important;
    min-width:0 !important;
    max-width:none !important;
    white-space:nowrap !important;
  }

  /* Exactly two cards inside the available catalog width. */
  .product-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
    overflow:visible !important;
  }

  .product-card{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }

  .product-image,
  .product-body,
  .product-foot,
  .product-buy{
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  .product-body h3{
    overflow-wrap:anywhere !important;
    word-break:normal !important;
  }

  /* Prevent any child from forcing the catalog wider than screen. */
  .catalog-panel img{
    max-width:100% !important;
  }
}

/* iPhone 16 Pro Max: use nearly full screen width for catalog. */
@media(min-width:431px) and (max-width:460px){
  .main.shell{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .catalog-panel{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .product-grid{
    gap:8px !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v6.3 — Friendly Zone drawer
   Keeps v6.2 catalog/full-width layout unchanged.
   ========================================================== */
@media(max-width:900px){
  .nav{
    position:fixed !important;
    top:0 !important;
    right:0 !important;
    bottom:0 !important;
    left:auto !important;
    width:84vw !important;
    max-width:390px !important;
    height:100dvh !important;
    padding:
      calc(env(safe-area-inset-top,0px) + 92px)
      14px
      calc(env(safe-area-inset-bottom,0px) + 18px) !important;
    box-sizing:border-box !important;
    background:#0b0e11 !important;
    border-left:1px solid #72562b !important;
    box-shadow:-28px 0 80px rgba(0,0,0,.82) !important;
    overflow-y:auto !important;
    z-index:10001 !important;
    align-content:start !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  body:not(.mobile-menu-open) .nav{display:none !important}
  body.mobile-menu-open .nav{display:grid !important}

  .nav button,
  .nav a{
    width:100% !important;
    min-height:52px !important;
    margin:0 !important;
    padding:13px 15px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    text-align:left !important;
    font-size:15px !important;
    border-radius:8px !important;
    border:1px solid #292e32 !important;
    background:#12161a !important;
  }

  .nav button.active,
  .nav a.active{
    color:var(--gold2) !important;
    border-color:#75582b !important;
    background:#1b1710 !important;
  }

  /* Logout stays visually separated at the bottom of the drawer. */
  .nav #logout-button,
  .nav .logout-button,
  .nav [data-action="logout"]{
    margin-top:18px !important;
    border-color:#713636 !important;
    color:#ffb0aa !important;
  }

  #mobile-menu-button{
    position:relative !important;
    z-index:10002 !important;
  }

  body.mobile-menu-open::before{
    content:"";
    position:fixed !important;
    inset:0 !important;
    background:rgba(0,0,0,.72) !important;
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
    z-index:10000 !important;
  }
}


/* ==========================================================
   OpenByShop Mobile v6.4 — DRAWER VISIBILITY + COMPACT PRODUCT MODAL
   ========================================================== */
@media(max-width:900px){
  /* v6.3 bug fix: the backdrop was above the whole sticky topbar stacking context.
     Keep backdrop under the topbar/drawer so the drawer content is visible. */
  body.mobile-menu-open::before{
    z-index:19 !important;
  }

  .topbar{
    z-index:20 !important;
    overflow:visible !important;
  }

  .topbar-inner{
    overflow:visible !important;
  }

  .nav{
    z-index:10001 !important;
  }

  #mobile-menu-button{
    z-index:10002 !important;
  }

  .mobile-drawer-head{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:center;
    padding:12px;
    margin:0 0 8px;
    border:1px solid #383126;
    border-radius:9px;
    background:#101419;
  }

  .mobile-drawer-player{
    min-width:0;
    display:grid;
    gap:3px;
  }

  .mobile-drawer-player strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:16px;
    color:#f2eee8;
  }

  .mobile-drawer-player small{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px;
    color:#8f969c;
  }

  .mobile-drawer-wallet{
    display:grid;
    justify-items:end;
    gap:1px;
  }

  .mobile-drawer-wallet span,
  .mobile-drawer-wallet small{
    font-size:10px;
    color:#8f969c;
  }

  .mobile-drawer-wallet strong{
    color:var(--gold2);
    font-size:18px;
  }

  .nav .mobile-drawer-logout{
    margin-top:auto !important;
    min-height:50px !important;
    color:#ffb4ae !important;
    border-color:#663c3a !important;
    background:#191111 !important;
  }

  /* Compact product modal: everything important should fit on one screen
     on iPhone 16 Pro Max without scrolling to reach Buy. */
  #product-modal{
    padding:
      max(8px,env(safe-area-inset-top,0px))
      8px
      max(8px,env(safe-area-inset-bottom,0px)) !important;
  }

  #product-modal .modal-card{
    width:100% !important;
    max-width:520px !important;
    height:auto !important;
    max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)) !important;
    margin:0 auto !important;
    grid-template-columns:1fr !important;
    overflow:auto !important;
    border-radius:12px !important;
  }

  #product-modal .modal-visual{
    min-height:0 !important;
    height:clamp(175px,31dvh,245px) !important;
  }

  #product-modal .modal-product-photo{
    min-height:0 !important;
    height:100% !important;
    max-height:none !important;
    object-fit:cover !important;
  }

  #product-modal .modal-copy{
    padding:14px 14px 14px !important;
  }

  #product-modal .modal-copy .eyebrow{
    font-size:10px !important;
  }

  #product-modal .modal-copy h2{
    margin:4px 38px 6px 0 !important;
    font-size:24px !important;
    line-height:1.05 !important;
  }

  #product-modal .modal-copy p{
    margin:0 0 9px !important;
    font-size:12px !important;
    line-height:1.35 !important;
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    overflow:hidden !important;
  }

  #product-modal .modal-purchase-options{
    margin:8px 0 7px !important;
    grid-template-columns:1fr !important;
  }

  #product-modal .modal-option{
    min-height:48px !important;
    padding:7px 10px !important;
  }

  #product-modal .modal-option>span{
    font-size:12px !important;
  }

  #product-modal .quantity-button{
    width:32px !important;
    height:32px !important;
    font-size:19px !important;
  }

  #product-modal .quantity-control{
    gap:6px !important;
  }

  #product-modal .quantity-control strong{
    width:28px !important;
    font-size:16px !important;
  }

  #product-modal .modal-total{
    margin-top:4px !important;
    padding-top:8px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
  }

  #product-modal .modal-total span{
    font-size:12px !important;
  }

  #product-modal .modal-total strong{
    font-size:21px !important;
  }

  #product-modal .modal-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1.55fr) minmax(0,1fr) !important;
    gap:8px !important;
    margin-top:9px !important;
  }

  #product-modal .modal-actions button{
    min-height:42px !important;
    padding:0 10px !important;
    font-size:13px !important;
  }

  #product-modal .modal-close{
    right:10px !important;
    top:10px !important;
    width:34px !important;
    height:34px !important;
  }
}

@media(max-width:390px){
  #product-modal .modal-visual{
    height:165px !important;
  }

  #product-modal .modal-copy h2{
    font-size:21px !important;
  }

  #product-modal .modal-copy p{
    -webkit-line-clamp:1 !important;
  }
}

/* ==========================================================
   OpenByShop Mobile v6.5 — SLIDING DRAWER + SCROLL LOCK + BALANCE CENTER
   Built strictly on confirmed v6.4 mobile frontend.
   Desktop (>900px) is untouched.
   ========================================================== */
@media(max-width:900px){
  /* Main header balance: value must sit exactly in the middle of its own frame. */
  #header-balance,
  .top-actions .balance-box{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
  }

  #header-balance b,
  .top-actions .balance-box b{
    display:block !important;
    width:100% !important;
    margin:0 !important;
    text-align:center !important;
    line-height:1 !important;
  }

  /* Keep the drawer mounted so transform can animate it instead of popping in/out. */
  body:not(.mobile-menu-open) .nav,
  body.mobile-menu-open .nav{
    display:grid !important;
  }

  .nav{
    transform:translate3d(104%,0,0) !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    will-change:transform,opacity;
    transition:
      transform .30s cubic-bezier(.22,.75,.22,1),
      opacity .20s ease,
      visibility 0s linear .30s !important;
    overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-y !important;
  }

  body.mobile-menu-open .nav{
    transform:translate3d(0,0,0) !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    transition:
      transform .30s cubic-bezier(.22,.75,.22,1),
      opacity .20s ease,
      visibility 0s !important;
  }

  /* Smooth backdrop fade. v6.4 stacking rule is preserved: backdrop under topbar/drawer. */
  body::before{
    content:"";
    position:fixed !important;
    inset:0 !important;
    width:100vw !important;
    height:100dvh !important;
    margin:0 !important;
    background:rgba(0,0,0,.72) !important;
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
    z-index:19 !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transition:opacity .24s ease,visibility 0s linear .24s !important;
  }

  body.mobile-menu-open::before{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    transition:opacity .24s ease,visibility 0s !important;
  }

  /* Page is frozen at its current scroll position; drawer keeps its own vertical scroll. */
  html.obs-mobile-drawer-locked{
    overflow:hidden !important;
  }

  body.obs-mobile-drawer-locked{
    position:fixed !important;
    top:var(--obs-mobile-drawer-top,0px) !important;
    left:0 !important;
    right:0 !important;
    width:100% !important;
    overflow:hidden !important;
    touch-action:auto !important;
  }

  body.mobile-menu-open{
    touch-action:auto !important;
  }
}


/* OpenByShop SAFE mobile patch — based strictly on confirmed-working v6.5. */
@media(max-width:900px){
  /* Remove the old gold drawer edge without changing drawer mechanics. */
  .nav{border-left:0 !important;}

  /* Steam identity inside existing v6.5 drawer header. */
  .mobile-drawer-player{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
  }
  .mobile-drawer-avatar{
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    flex:0 0 42px;
    overflow:hidden;
    border-radius:50%;
    border:1px solid #3a4045;
    background:#171b1f;
  }
  .mobile-drawer-avatar img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
  }
  .mobile-drawer-avatar img[hidden],
  #mobile-drawer-player-avatar-fallback[hidden]{display:none !important;}
  #mobile-drawer-player-avatar-fallback{
    display:flex;
    width:100%;
    height:100%;
    align-items:center;
    justify-content:center;
    font-size:20px;
  }
  .mobile-drawer-player-copy{
    display:grid;
    min-width:0;
    gap:3px;
  }

  /* Larger product card, but still not full-screen. Image is never cropped. */
  #product-modal{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:max(12px,env(safe-area-inset-top,0px)) 10px max(12px,env(safe-area-inset-bottom,0px)) !important;
  }
  #product-modal[hidden]{display:none !important;}
  #product-modal .modal-card{
    width:min(96vw,650px) !important;
    max-width:650px !important;
    max-height:92dvh !important;
    margin:0 auto !important;
    overflow-y:auto !important;
    border-radius:16px !important;
  }
  #product-modal .modal-visual{
    min-height:280px !important;
    height:clamp(280px,38dvh,360px) !important;
  }
  #product-modal .modal-product-photo{
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    object-fit:contain !important;
    object-position:center !important;
  }
  #product-modal .modal-copy{padding:16px 16px 18px !important;}
  #product-modal .modal-copy p{-webkit-line-clamp:2 !important;}
  #product-modal .modal-actions{margin-top:10px !important;}
}

@media(max-width:390px){
  #product-modal .modal-card{max-height:93dvh !important;}
  #product-modal .modal-visual{height:260px !important;min-height:260px !important;}
}


/* OpenByShop SAFE desktop Steam profile patch — based on confirmed working v6.6. */
@media(min-width:901px){
  /* Mobile-only drawer identity must never participate in desktop header layout. */
  .mobile-drawer-head,
  .mobile-drawer-logout{
    display:none !important;
  }

  #profile-button.profile-button:not([hidden]){
    display:flex !important;
    align-items:center !important;
    gap:9px !important;
    padding:5px 10px 5px 6px !important;
    min-width:132px !important;
    min-height:54px !important;
  }

  #profile-button .desktop-profile-avatar{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:36px !important;
    height:36px !important;
    flex:0 0 36px !important;
    overflow:hidden !important;
    border-radius:50% !important;
    border:1px solid #3a4045 !important;
    background:#171b1f !important;
  }

  #profile-button .desktop-profile-avatar img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
  }

  #profile-button .desktop-profile-avatar img[hidden],
  #profile-avatar-fallback[hidden]{
    display:none !important;
  }

  #profile-avatar-fallback{
    display:flex;
    width:100%;
    height:100%;
    align-items:center;
    justify-content:center;
    font-size:17px !important;
    line-height:1;
  }

  #profile-button .desktop-profile-copy{
    display:grid !important;
    min-width:0 !important;
    gap:1px !important;
    text-align:left !important;
  }

  #profile-button .desktop-profile-copy > span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:115px;
    font-size:14px !important;
    line-height:1.15;
  }

  #profile-button .desktop-profile-copy > small{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:115px;
    font-size:11px !important;
    line-height:1.15;
  }
}

@media(max-width:900px){
  /* Desktop chip avatar is not used on mobile; drawer has its own Steam avatar. */
  #profile-button .desktop-profile-avatar{
    display:none !important;
  }
}


/* OpenByShop v6.8 SAFE — admin weapon builder only. Storefront/mobile layout unchanged. */
.admin-weapon-builder{margin:16px 0 4px;padding:15px;border:1px solid #3b3428;border-radius:9px;background:#111519}
.admin-weapon-builder[hidden]{display:none!important}
.admin-weapon-builder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:13px}
.admin-weapon-builder-head span{display:block;color:#c7a663;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.admin-weapon-builder-head strong{display:block;margin-top:4px;font-size:18px;color:#f0eee9}
.admin-weapon-builder-head small{max-width:440px;color:#a7adb2;line-height:1.45;text-align:right}
.admin-weapon-builder-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px}
.admin-weapon-field{margin:0}
.admin-weapon-dependency{display:block;margin-top:5px;color:#9a8a6d;font-size:10px;line-height:1.35}
.admin-weapon-builder-note{margin:12px 0 0;color:#9aa0a5;font-size:11px;line-height:1.45}
@media(max-width:900px){.admin-weapon-builder-head{display:block}.admin-weapon-builder-head small{display:block;margin-top:8px;text-align:left;max-width:none}.admin-weapon-builder-fields{grid-template-columns:1fr}}
