:root {
  color-scheme:dark;
  --page:#101113;
  --surface:#1b1d20;
  --raised:#24262a;
  --line:#37393e;
  --text:#f7f7f8;
  --muted:#b4b6bd;
  --coral:#ff615b;
  --coral-ink:#200909;
  --card:#f5f5f6;
  --card-ink:#191a1e;
  --bottom-inset:max(env(safe-area-inset-bottom),var(--tg-content-safe-area-inset-bottom,0px));
  font-family:Roboto,system-ui,Arial,sans-serif;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; color:var(--text); background:var(--page); }
button,input,select,textarea { font:inherit; }
button { color:inherit; cursor:pointer; }
button:disabled { opacity:.5; cursor:default; }
a { color:#ff8a85; overflow-wrap:anywhere; }
:focus-visible { outline:2px solid var(--coral); outline-offset:3px; }
p { margin:0 0 14px; line-height:1.52; }
small,.muted { color:var(--muted); }
p,h1,h2,h3,summary,small,strong { overflow-wrap:anywhere; }
h1,h2,h3 { margin:0 0 12px; line-height:1.2; }
h1 { font-size:clamp(24px,5.6vw,33px); }
h2 { font-size:21px; }
h3 { font-size:17px; }
.shell { width:min(100%,620px); margin-inline:auto; }
.top { background:#17181a; border-bottom:1px solid #26272c; }
.bar { position:relative; min-height:51px; display:flex; align-items:center; padding:7px 11px; gap:10px; }
.logo,.quiet,.nav button { padding:0; border:0; background:none; }
.logo { display:flex; align-items:center; gap:9px; white-space:nowrap; }
.wordmark { font-size:21px; font-weight:800; letter-spacing:-.04em; }
.brand-dot { color:var(--coral); }
.logo-img { width:36px; height:36px; object-fit:contain; border-radius:4px; }
.quiet { color:#ff9993; }
.nav-back,.search-toggle { color:var(--text); min-width:37px; min-height:36px; }
.search-toggle { margin-left:auto; display:grid; place-items:center; }
.search-icon { display:inline-block; position:relative; width:21px; height:21px; border:2px solid currentColor; border-radius:50%; flex:none; }
.search-icon::after { content:""; position:absolute; width:10px; height:2px; background:currentColor; right:-7px; bottom:-3px; transform:rotate(45deg); border-radius:2px; }
#view-title { font-size:clamp(16px,5vw,23px); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-transform:uppercase; }
.admin-link { font-size:13px; }
.search { position:absolute; top:100%; right:8px; z-index:5; width:min(300px,calc(100% - 16px)); display:flex; align-items:center; gap:10px; border-radius:10px; padding:7px 12px; background:var(--surface); box-shadow:0 8px 22px #0009; border:1px solid var(--line); }
.search input { background:none; border:0; padding:5px 2px; }
main { min-height:calc(100vh - 51px); padding:9px 8px calc(78px + var(--bottom-inset)); }
main[data-page=product] { padding-top:0; }
main[data-page=cart],main[data-page=checkout],main[data-page=profile],main[data-page=success] { padding:15px 11px calc(78px + var(--bottom-inset)); }
.shop-banner { margin:0 0 14px; background:#17181c; border:1px solid #2b2c30; border-radius:12px; overflow:hidden; }
.hero img { width:100%; max-height:420px; display:block; object-fit:contain; }
.banner-fallback { min-height:clamp(115px,36vw,204px); display:grid; place-items:center; }
.banner-fallback > span { font-weight:800; font-size:clamp(39px,10vw,68px); letter-spacing:-.07em; }
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin-bottom:9px; }
.category,.product { overflow:hidden; border-radius:12px; }
.category { border:1px solid var(--line); padding:0; text-align:left; background:var(--surface); }
.category-caption { display:grid; gap:3px; padding:10px; text-align:center; }
.category-caption strong { font-size:15px; line-height:1.24; }
.category-caption small { line-height:1.3; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.art { position:relative; display:block; overflow:hidden; aspect-ratio:1; background:#ededf0; }
.art img { width:100%; height:100%; display:block; object-fit:contain; }
.category .art img { object-fit:cover; }
.photo-placeholder { position:absolute; inset:34%; border:2px solid #b5b5bc; border-radius:6px; }
.photo-placeholder::before { content:""; position:absolute; top:16%; right:18%; width:16%; height:16%; border-radius:50%; background:#b5b5bc; }
.photo-placeholder::after { content:""; position:absolute; bottom:13%; inset-inline:13%; height:46%; background:#b5b5bc; clip-path:polygon(0 100%,34% 18%,55% 65%,72% 32%,100% 100%); }
.product { display:flex; flex-direction:column; position:relative; min-width:0; padding:0; background:var(--card); color:var(--card-ink); border:1px solid #dddde0; }
.product .art { width:100%; }
.card-content { flex:1; width:100%; padding:9px 7px; min-height:102px; display:grid; justify-items:center; grid-template-rows:1fr auto; gap:8px; }
.card-content strong { align-self:center; text-align:center; font-weight:550; line-height:1.35; }
.card-price { display:flex; align-items:center; justify-content:center; gap:6px; padding:5px 9px; min-height:32px; border-radius:6px; background:var(--coral); color:var(--coral-ink); font-weight:800; white-space:normal; }
.card-price.unavailable { background:#545864; color:#fff; }
.cart-icon { display:inline-block; flex:none; position:relative; width:18px; height:17px; }
.cart-icon::before,.cart-icon::after { content:""; position:absolute; background:currentColor; }
.cart-icon::before { top:0; left:0; width:18px; height:13px; clip-path:polygon(0 0,18% 0,28% 20%,100% 20%,80% 86%,30% 91%,13% 16%,0 16%); }
.cart-icon::after { bottom:1px; left:5px; width:3px; height:3px; border-radius:50%; box-shadow:7px 0 currentColor; }
.product-tag { position:absolute; z-index:1; top:0; padding:5px 8px; border-radius:8px; color:#fff; font-size:12px; font-weight:750; }
.product-tag.hit { left:0; background:#bf3749; }
.product-tag.new-badge { right:0; background:#f7af3f; color:#261703; }
.detail-photo { position:relative; margin-inline:-8px; overflow:hidden; background:#ededf0; }
.detail-photo .art { width:min(100%,480px); margin-inline:auto; }
.detail-photo .product-tag { margin:6px; }
.detail-body { padding:14px 3px 0; }
.detail-body h1 { font-size:clamp(22px,5vw,30px); margin-bottom:16px; }
.detail-form select { margin-top:5px; }
.detail-purchase { margin:6px 0; flex-wrap:wrap; }
.detail-purchase .primary { display:inline-flex; align-items:center; gap:6px; text-transform:uppercase; }
.detail-purchase strong { font-size:clamp(16px,4.6vw,21px); }
.detail-purchase output { white-space:nowrap; }
.detail-state { display:flex; align-items:center; gap:8px; }
.heart { color:var(--coral); min-width:35px; min-height:35px; font-size:26px; line-height:1; }
.detail-description { margin:19px 0 15px; white-space:pre-wrap; }
.share-button { width:100%; min-height:43px; display:flex; justify-content:center; align-items:center; gap:10px; text-transform:uppercase; font-weight:600; }
.share-icon { display:inline-block; position:relative; width:19px; height:21px; flex:none; }
.share-icon::before { content:""; position:absolute; left:1px; top:8px; width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:10px -6px currentColor,10px 6px currentColor; }
.share-icon::after { content:""; position:absolute; left:6px; top:6px; width:10px; height:10px; border-left:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg) skew(-12deg,-12deg); }
.category-description { margin:5px 4px 11px; }
.empty { color:var(--muted); margin:8px 6px 17px; }
.screen-title,.row-spread { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.screen-title { margin:0 0 16px; }
.screen-title h1 { margin:0; text-transform:uppercase; font-weight:600; }
.row-spread p { margin:0; }
.close-page { font-size:32px; line-height:1; padding:0 4px; }
.controls { display:grid; gap:10px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.form-grid .wide { grid-column:1/-1; }
.primary,.secondary,.danger { border-radius:8px; min-height:40px; border:1px solid transparent; padding:8px 11px; font-weight:700; }
.primary { background:var(--coral); color:var(--coral-ink); }
.secondary { background:var(--raised); border-color:#505158; color:var(--text); }
.danger { background:#341d20; border-color:#692e34; color:#ffc3be; }
input,select,textarea { color:var(--text); background:#141517; border:1px solid #505158; border-radius:7px; padding:9px; min-width:0; }
input:where(:not([type=checkbox])),select,textarea { width:100%; min-height:39px; }
input[type=file] { overflow:hidden; }
textarea { resize:vertical; }
.field { display:grid; gap:5px; }
.check { display:flex; gap:8px; align-items:center; }
.check input { accent-color:var(--coral); }
.panel { border:1px solid var(--line); border-radius:11px; background:var(--surface); margin:0 0 12px; padding:13px; }
.narrow { max-width:570px; margin:auto; }
.line-item { display:grid; grid-template-columns:minmax(84px,39%) minmax(0,1fr); gap:12px; align-items:center; padding:8px; margin-bottom:13px; border:1px solid #dddde0; border-radius:9px; background:var(--card); color:var(--card-ink); }
.line-item .art { width:100%; }
.line-info { position:relative; min-width:0; }
.line-info strong,.line-info small { padding-right:25px; }
.line-item strong,.line-item small { display:block; }
.line-item small { color:#4b4e57; margin-top:4px; }
.line-price { display:block; font-weight:800; margin:7px 0; }
.line-remove { position:absolute; top:-5px; right:0; width:28px; height:28px; color:#ad2130; font-size:25px; font-weight:800; line-height:1; }
.line-count { display:flex; gap:8px; align-items:center; }
.step { display:flex; gap:3px; align-items:center; justify-content:space-between; border:1px solid #caced4; border-radius:4px; background:#fff; }
.step button,.step button:disabled { min-width:28px; min-height:30px; padding:2px 3px; border:0; color:var(--card-ink); background:transparent; font-size:11px; }
.step span { padding-inline:3px; min-width:17px; text-align:center; }
.promo-form { display:flex; align-items:center; border:1px solid #505158; border-radius:7px; }
.promo-form input { border:0; background:transparent; }
.promo-form button { padding:9px 11px; }
.remove-promo { justify-self:start; }
.cart-summary { margin-top:18px; }
.cart-totals { margin:10px 0; }
.cart-totals .total { margin:0; }
.keep-shopping { justify-self:center; padding:8px; display:block; margin-inline:auto; }
.checkout-meta,.total { font-size:1.13rem; font-weight:750; }
.checkout .form-grid { grid-template-columns:1fr; background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:12px; }
.time-row { display:grid; grid-template-columns:minmax(0,1fr) 15px minmax(0,1fr); align-items:center; gap:4px; text-align:center; }
.inline,.actions { display:flex; flex-wrap:wrap; gap:8px; align-items:end; }
.inline label { flex:1 1 150px; }
.results,.quick-create,.brand-editor { margin-top:12px; }
.stats { display:grid; gap:11px; margin:0 0 16px; }
.stat { color:var(--text); font-weight:650; }
.referral { line-height:1.5; }
.profile-fields { border-top:1px solid var(--line); margin:18px 0; padding-top:16px; gap:16px; }
.profile-fields .field { font-weight:600; }
.profile-fields > .primary { text-transform:uppercase; }
.verified { color:#b6dfae; }
.contact-telegram { display:block; padding:9px; border:1px solid #505158; text-align:center; border-radius:8px; text-decoration:none; }
.product-badge-options { display:flex; flex-wrap:wrap; gap:8px 14px; border:1px solid var(--line); border-radius:7px; }
.order { border-top:1px solid var(--line); padding:11px 0; }
.order summary { cursor:pointer; }
.status { color:#ff9b96; }
pre { font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; background:#131416; border-radius:7px; padding:10px; }
.brand-preview,.asset-preview { display:block; max-width:100%; max-height:180px; object-fit:contain; border-radius:7px; }
.brand-preview.logo,.asset-preview { width:90px; height:90px; object-fit:contain; }
.bottom { position:fixed; bottom:0; left:0; right:0; z-index:6; border-top:1px solid #313236; background:#17181a; padding-bottom:var(--bottom-inset); }
.nav { display:flex; }
.nav button { position:relative; flex:1 1 0; min-width:0; padding:6px 1px 8px; font-size:clamp(9px,2.6vw,11px); color:var(--text); }
.nav button[aria-current] { color:#ff817c; font-weight:750; }
.nav i { position:relative; display:block; margin:auto; width:26px; height:25px; line-height:23px; font-size:22px; font-style:normal; }
.nav .nav-heart { line-height:22px; font-size:25px; }
.nav-menu::before { content:""; position:absolute; left:3px; top:3px; width:20px; height:3px; background:currentColor; box-shadow:0 7px currentColor,0 14px currentColor; }
.nav-grid::before { content:""; position:absolute; left:3px; top:2px; width:9px; height:9px; background:currentColor; box-shadow:11px 0 currentColor,0 11px currentColor,11px 11px currentColor; }
.nav-cart::before { content:""; position:absolute; width:21px; height:15px; left:1px; top:2px; background:currentColor; clip-path:polygon(0 0,100% 8%,80% 90%,24% 100%,12% 15%,0 15%); }
.nav-cart::after { content:""; position:absolute; left:7px; bottom:4px; width:4px; height:4px; background:currentColor; border-radius:50%; box-shadow:10px 0 currentColor; }
.nav-profile::before,.nav-profile::after { content:""; position:absolute; left:50%; transform:translateX(-50%); background:currentColor; }
.nav-profile::before { top:2px; width:10px; height:10px; border-radius:50%; }
.nav-profile::after { bottom:3px; width:20px; height:10px; border-radius:10px 10px 3px 3px; }
.badge { position:absolute; top:1px; left:calc(50% + 7px); background:var(--coral); color:var(--coral-ink); border-radius:15px; padding:1px 5px; font-weight:800; }
#toast { position:fixed; z-index:8; left:50%; transform:translateX(-50%); bottom:calc(66px + var(--bottom-inset)); width:max-content; max-width:calc(100% - 28px); padding:10px 13px; background:var(--raised); border:1px solid #5d4648; border-radius:9px; box-shadow:0 8px 22px #0008; }
dialog { width:min(92%,490px); border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); padding:14px; }
dialog::backdrop { background:#000b; }
#share-title { margin:0; }
#share-preview { white-space:pre-wrap; overflow-wrap:anywhere; }
