:root {
  --bg: #0b0d12; --panel: #141821; --panel2: #1b2130; --line: #273041;
  --fg: #e7ecf3; --muted: #8893a7; --accent: #6ea8fe; --accent2: #3d6fd6;
  --ok: #4ade80; --warn: #fbbf24; --err: #f87171; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #16203a 0%, var(--bg) 60%);
  color: var(--fg); font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 24px 16px 64px; }
header.top { display: flex; align-items: center; gap: 12px; padding: 16px; max-width: 1000px; margin: 0 auto; }
header.top .brand { font-weight: 700; letter-spacing: .3px; font-size: 18px; }
header.top .brand span { color: var(--accent); }
header.top .spacer { flex: 1; }
.badge { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.card h2 { margin: 0 0 14px; font-size: 16px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }

label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=file], select, textarea {
  width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 10px 12px; font: inherit;
}
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent2); }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.checks label { display: flex; align-items: center; gap: 6px; color: var(--fg); margin: 0; }
.checks input { width: auto; }

button, .btn {
  background: var(--accent2); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { background: var(--accent); }
button.secondary { background: var(--panel2); border: 1px solid var(--line); color: var(--fg); }
button.danger { background: #3a2026; border: 1px solid #5b2a33; color: var(--err); }
button.small { padding: 6px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: not-allowed; }

.msg { padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: #2a1619; border: 1px solid #5b2a33; color: var(--err); }
.msg.ok { background: #13241a; border: 1px solid #1f5137; color: var(--ok); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
td code, code.inline { background: var(--panel2); padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, monospace; font-size: 12px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.pill.on { color: var(--ok); border-color: #1f5137; }
.pill.off { color: var(--muted); }
.pill.lvl { color: var(--accent); border-color: var(--accent2); }

.login-wrap { max-width: 380px; margin: 10vh auto 0; }
.login-wrap .brand { text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.login-wrap .brand span { color: var(--accent); }
.login-wrap .sub { text-align: center; color: var(--muted); margin-bottom: 20px; font-size: 13px; }

pre.report { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; font-size: 12px; max-height: 260px; }
.docs h3 { margin-top: 28px; }
.docs code.inline, .docs pre { font-size: 13px; }
.docs pre { background: var(--panel2); border: 1px solid var(--line); padding: 12px; border-radius: 8px; overflow: auto; }
.tag { display:inline-block; font-size:11px; color:var(--warn); margin-left:6px;}

/* ---------- animations & loading ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.card { animation: fadeUp .35s ease both; }
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }

#loader {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(900px 500px at 50% 30%, #16203a 0%, var(--bg) 70%);
  transition: opacity .4s ease; 
}
#loader.hide { opacity: 0; pointer-events: none; }
#loader .logo { font-size: 30px; font-weight: 800; letter-spacing: .5px; animation: pulse 1.6s ease-in-out infinite; }
#loader .logo span { color: var(--accent); }
.spinner { width: 42px; height: 42px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; display: inline-block; vertical-align: middle; }

/* nav */
nav.tabs { display: flex; gap: 6px; }
nav.tabs button { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
nav.tabs button:hover { color: var(--fg); background: var(--panel2); }
nav.tabs button.active { color: var(--fg); background: var(--panel2); border-color: var(--line); }
.view { display: none; }
.view.active { display: block; animation: fadeIn .3s ease both; }

/* script cards */
.scard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; animation: fadeUp .3s ease both; }
.scard .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scard .title { font-weight: 700; font-size: 15px; }
.scard .meta { color: var(--muted); font-size: 12px; }
.scard .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.loaderbox { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.loaderbox code { flex: 1; min-width: 0; overflow-x: auto; white-space: pre; }

/* drawer */
#drawer { position: fixed; inset: 0; z-index: 900; display: none; }
#drawer.open { display: block; }
#drawer .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: fadeIn .2s ease both; }
#drawer .panel-r { position: absolute; top: 0; right: 0; height: 100%; width: min(640px, 100%); background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; padding: 20px; animation: slideIn .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
#drawer h2 { margin-top: 0; }
.drawer-close { position: sticky; top: 0; float: right; }

/* skeleton */
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--panel2) 25%, #222a3a 37%, var(--panel2) 63%); background-size: 800px 100%; animation: shimmer 1.3s infinite linear; margin: 8px 0; }

/* wizard */
.steps { counter-reset: step; }
.step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .num { counter-increment: step; flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); }
.step .num::before { content: counter(step); }
.step .body { flex: 1; }
.step .body h4 { margin: 4px 0 6px; }
.codecopy { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-family: ui-monospace, monospace; font-size: 15px; letter-spacing: 1px; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); display: inline-block; vertical-align: middle; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; z-index: 1100; animation: fadeUp .25s ease both; }

/* ---------- busy overlay (obfuscation progress) ---------- */
.busy { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(11,13,18,.82); backdrop-filter: blur(3px); animation: fadeIn .2s ease both; }
.busy .lbl { font-weight: 700; font-size: 16px; }
.busy .eta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.busy .bar { width: 260px; height: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.busy .bar > i { display: block; height: 100%; width: 35%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 999px; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

/* "rebuild your scripts NOW" banner (panel) */
.rebuild-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(180deg, #2a2111, #211a0d);
  border: 1px solid #5b4a1f; border-left: 3px solid var(--warn);
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
}
.rebuild-banner .rb-icon { color: var(--warn); font-size: 18px; line-height: 1; }
.rebuild-banner .rb-text { flex: 1 1 240px; color: #f6e8c6; font-size: 14px; }
.rebuild-banner .rb-cta { background: var(--warn); color: #241a05; font-weight: 700; }
.rebuild-banner .rb-cta:hover { background: #ffd34d; }
.rebuild-banner .rb-x {
  background: transparent; border: 0; color: var(--muted); font-size: 13px;
  padding: 4px 8px; cursor: pointer;
}
.rebuild-banner .rb-x:hover { color: var(--fg); background: transparent; }


/* ---- storefront themes (palette only; owner's accent overrides --accent) ---- */
[data-theme="midnight"] { --bg: #0b0d12; --panel: #141821; --panel2: #1b2130; --line: #273041; --fg: #e7ecf3; --muted: #8893a7; --accent: #6ea8fe; --accent2: #3d6fd6; }
[data-theme="neon"]     { --bg: #0a0712; --panel: #150f24; --panel2: #1e1533; --line: #2f2350; --fg: #efe9ff; --muted: #9a8cc0; --accent: #b794ff; --accent2: #7c3aed; }
[data-theme="mono"]     { --bg: #0c0c0d; --panel: #161617; --panel2: #1f1f21; --line: #313134; --fg: #ededed; --muted: #9a9a9e; --accent: #d4d4d8; --accent2: #6b6b70; }
[data-theme="sunset"]   { --bg: #140a0a; --panel: #211110; --panel2: #2d1715; --line: #452220; --fg: #ffeae2; --muted: #c99a8e; --accent: #ff8a5b; --accent2: #e04f2f; }
[data-theme="forest"]   { --bg: #080f0b; --panel: #101c15; --panel2: #16271d; --line: #233b2c; --fg: #e3f3e8; --muted: #86a893; --accent: #5fd392; --accent2: #2f9e62; }
[data-theme="crimson"]  { --bg: #100708; --panel: #1d0e11; --panel2: #281216; --line: #3f1d23; --fg: #ffe6ea; --muted: #c78b95; --accent: #ff647c; --accent2: #c42a44; }



/* store builder: live theme preview (panel) */
.theme-preview { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--fg); }
.theme-preview .tp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.theme-preview .tp-badge { font-size: 11px; background: var(--accent2); color: #fff; padding: 2px 8px; border-radius: 999px; }
.theme-preview .tp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.theme-preview .tp-title { font-weight: 700; }
.theme-preview .tp-desc { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.theme-preview .tp-foot { display: flex; align-items: center; gap: 10px; }
.theme-preview .tp-price { font-weight: 800; color: var(--accent); }
.theme-preview .tp-btn { margin-left: auto; background: var(--accent2); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; }

/* ===================================================================== */
/*  customer storefront — polished / animated                            */
/* ===================================================================== */
body.shop { background: var(--bg); overflow-x: hidden; }
body.shop .sm { font-size: 12px; }

/* animated background layers (behind everything) */
#fxCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; }
#fxGradient { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none;
  background: linear-gradient(130deg, var(--bg), color-mix(in srgb, var(--accent) 22%, var(--bg)) 45%, var(--panel2) 75%, var(--bg));
  background-size: 300% 300%; animation: gradShift 18s ease infinite; }
@keyframes gradShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
body.shop::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(1100px 560px at 50% -12%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.shop-top, .shop-main { position: relative; z-index: 1; }

/* header */
.shop-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line); }
.shop-brand { font-weight: 800; font-size: 20px; letter-spacing: .3px; cursor: pointer; }
.shop-brand:hover { color: var(--accent); }
.shop-top .spacer { flex: 1; }
.pill-link { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.pill-link:hover { color: var(--fg); text-decoration: none; }
.cart-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #07101f; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; margin-left: 5px; }

/* buttons */
.ghost-btn { background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; padding: 9px 15px; font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, transform .08s, background .15s; }
.ghost-btn:hover { border-color: var(--accent); }
.ghost-btn:active { transform: translateY(1px); }
.ghost-btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.ghost-btn.bump { animation: bump .3s ease; }
@keyframes bump { 0%,100%{transform:scale(1)} 35%{transform:scale(1.12)} }
.cta { display: inline-block; width: 100%; border: 0; border-radius: 12px; padding: 13px 18px; font: inherit; font-weight: 700; cursor: pointer;
  color: #07101f; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent2)));
  box-shadow: 0 8px 24px -10px var(--accent); transition: transform .1s, box-shadow .2s, filter .15s; }
.cta:hover { filter: brightness(1.06); box-shadow: 0 12px 30px -10px var(--accent); }
.cta:active { transform: translateY(1px); }
.cta:disabled { filter: grayscale(.6) brightness(.8); cursor: not-allowed; box-shadow: none; }
.cta.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); box-shadow: none; margin-top: 8px; }
.cta.ghost:hover { border-color: var(--accent); filter: none; }

/* main + views */
.shop-main { max-width: 1060px; margin: 0 auto; padding: 8px 20px 70px; }
.shop-view { display: none; }
.shop-view.active { display: block; animation: viewIn .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* hero */
.shop-hero { padding: 40px 0 18px; text-align: center; }
.shop-hero h1 { margin: 0 0 12px; font-size: clamp(30px, 6vw, 50px); font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(120deg, var(--fg), color-mix(in srgb, var(--accent) 70%, var(--fg))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { max-width: 620px; margin: 0 auto; color: var(--muted); white-space: pre-wrap; font-size: 16px; line-height: 1.6; }
.grid-head { margin: 10px 0 4px; font-size: 13px; }
.shop-foot { text-align: center; margin: 48px 0 6px; font-size: 12px; color: var(--muted); }

/* product grid + cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; margin-top: 14px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 10px; cursor: pointer; overflow: hidden;
  background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  opacity: 0; animation: cardIn .5s cubic-bezier(.2,.8,.2,1) both; transition: transform .18s ease, border-color .18s, box-shadow .25s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.pcard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: linear-gradient(130deg, var(--accent), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.pcard:hover { transform: translateY(-5px); border-color: transparent; box-shadow: 0 22px 44px -22px var(--accent); }
.pcard:hover::after { opacity: 1; }
.pcard-body { flex: 1; }
.pcard-name { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.pcard-desc { color: var(--muted); font-size: 13px; line-height: 1.5; }
.pcard-foot { display: flex; align-items: center; gap: 10px; }
.pcard-price { font-weight: 900; font-size: 20px; color: var(--accent); }
.pcard-view { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); transition: color .15s, transform .15s; }
.pcard:hover .pcard-view { color: var(--accent); transform: translateX(3px); }

/* product detail */
.back-btn { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 18px 0 8px; }
.back-btn:hover { color: var(--accent); }
.product-detail { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.pd-name { font-size: clamp(26px, 4vw, 38px); font-weight: 900; margin: 0 0 12px; letter-spacing: -.4px; }
.pd-badges { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pd-price { font-size: 24px; font-weight: 900; color: var(--accent); }
.pd-desc { color: var(--fg); opacity: .9; white-space: pre-wrap; line-height: 1.7; font-size: 15px; }
.card-surface { background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.pd-buy { position: sticky; top: 88px; }
.pd-buy-price { font-size: 28px; font-weight: 900; margin-bottom: 14px; }
.qty-pick { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qty-pick .qty, .cart-qty .qty { min-width: 26px; text-align: center; font-weight: 700; }

/* drawers (cart + account) */
.drawer { position: fixed; inset: 0; z-index: 900; display: none; }
.drawer.open { display: block; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); animation: fadeIn .2s ease both; }
.drawer .panel-r { position: absolute; top: 0; right: 0; height: 100%; width: min(430px, 100%); overflow-y: auto; padding: 22px;
  background: color-mix(in srgb, var(--bg) 94%, var(--panel)); border-left: 1px solid var(--line); box-shadow: -30px 0 60px -30px rgba(0,0,0,.7);
  animation: drawerIn .32s cubic-bezier(.2,.9,.2,1) both; }
@keyframes drawerIn { from { transform: translateX(60px); opacity: .3; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-head h2 { margin: 0; font-size: 18px; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.cart-qty { display: flex; align-items: center; gap: 6px; }
.cart-line { font-weight: 800; min-width: 60px; text-align: right; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; font-size: 16px; font-weight: 600; }
.cart-total b { color: var(--accent); font-size: 20px; }
.loggedin { font-size: 13px; color: var(--muted); margin: 10px 0; }
.acct-actions { display: flex; gap: 10px; margin-top: 12px; }
.acct-actions .cta { margin-top: 0; }
.order-row { background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; }
.order-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }

/* order / payment modal */
.modal { position: fixed; inset: 0; z-index: 950; display: none; }
.modal.open { display: block; }
.modal .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); animation: fadeIn .2s ease both; }
.order-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(540px, 94vw); max-height: 90vh; overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 92%, var(--panel)); border: 1px solid var(--line); border-radius: 20px; padding: 26px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); animation: modalIn .3s cubic-bezier(.2,.9,.2,1) both; }
@keyframes modalIn { from { transform: translate(-50%, -46%) scale(.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.order-box h2 { margin: 2px 0 10px; }
.order-x { position: absolute; top: 14px; right: 14px; }
.pay-field { margin: 14px 0; }
.copyfield { display: flex; gap: 8px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.copyfield code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: ui-monospace, monospace; font-size: 13px; }
.pay-status { display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; font-size: 14px; }
.countdown { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.deliv { border-top: 1px solid var(--line); padding: 16px 0; }
.deliv-name { font-weight: 800; margin-bottom: 8px; }
.deliv-key { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.deliv-key code { flex: 1; min-width: 0; overflow-x: auto; }
.deliv-text { white-space: pre-wrap; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; margin-top: 6px; }
.fatal { max-width: 460px; margin: 12vh auto; text-align: center; }

/* toast polish */
body.shop .toast { opacity: 0; transform: translateX(-50%) translateY(10px); transition: opacity .25s, transform .25s; }
body.shop .toast.in { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) { .product-detail { grid-template-columns: 1fr; } .pd-buy { position: static; } }
@media (prefers-reduced-motion: reduce) { .shop-view.active, .pcard, .order-box, .drawer .panel-r, #fxGradient { animation: none !important; } }

/* --- product media, icons, features, LTC icon --- */
.pcard-media { margin: -20px -20px 6px; height: 150px; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--panel2); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pcard:hover .pcard-media img { transform: scale(1.05); }
.pcard-name { display: flex; align-items: center; gap: 2px; }
.pcard-icon { font-size: 18px; margin-right: 6px; }
.pcard-feat { margin-top: 2px; }

.pd-gallery { margin-bottom: 20px; }
.pd-main-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel2); }
.pd-main-img { width: 100%; max-height: 440px; object-fit: contain; display: block; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumb { width: 66px; height: 66px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--panel2); transition: border-color .15s, transform .1s; }
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.active { border-color: var(--accent); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-name { display: flex; align-items: center; gap: 10px; }
.pd-icon { font-size: .9em; }

.pd-features { margin-top: 22px; }
.pd-feat-title { font-weight: 800; margin-bottom: 14px; font-size: 16px; }
.feat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.feat-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.feat-check { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 900;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }

.ltc-ico { display: inline-flex; vertical-align: middle; flex: 0 0 auto; }
.ltc-ico svg { display: block; width: 100%; height: 100%; }
.pay-h2 { display: flex; align-items: center; gap: 10px; }

/* --- panel: product editor image uploader --- */
.img-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.img-cell { position: relative; width: 74px; height: 74px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.img-x { position: absolute; top: 2px; right: 2px; padding: 1px 6px; font-size: 11px; border-radius: 6px; }
