/* Dead Center Apps - store + store admin pages */
.st-hero { padding: clamp(2.2rem, 5vw, 3.6rem) 0 1rem; }
.st-hero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); margin: 0 0 .3rem; }
.st-wallet { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0 0; }
.st-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 999px; background: var(--crypt-2); border: 1px solid var(--line); font: 800 1.1rem/1 var(--ui); letter-spacing: .04em; }
.st-pill.gold { color: var(--gold); }
.st-pill.egg { color: #ffa25a; }
.st-pill small { color: var(--dim); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.st-boost { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--ember); background: linear-gradient(90deg, rgba(255,138,42,.18), rgba(255,138,42,.04)); color: var(--bone); font-weight: 700; }

/* game picker */
.st-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; margin-top: 1.4rem; }
.st-game { position: relative; display: flex; flex-direction: column; background: var(--crypt); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--bone); text-decoration: none; transition: transform .15s ease, border-color .15s ease; box-shadow: var(--shadow); }
.st-game:hover, .st-game:focus-visible { transform: translateY(-3px); border-color: var(--blood-hot); }
.st-game .art { aspect-ratio: 16 / 10; background: #0d0709 center / cover no-repeat; }
.st-game .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.st-game h3 { margin: 0; font-size: 1.7rem; }
.st-game p { margin: 0; color: var(--ash); }
.st-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .4rem; }
.st-chips span { font: 700 .8rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; padding: .35rem .55rem; border-radius: 6px; background: var(--crypt-2); border: 1px solid var(--line); color: var(--ash); }
.st-sale-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--blood); color: #fff; font: 800 .8rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; padding: .45rem .6rem; border-radius: 6px; box-shadow: 0 6px 20px rgba(193,18,31,.5); }

/* one game's store */
.st-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; justify-content: space-between; }
.st-back { color: var(--ash); text-decoration: none; font: 700 .95rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.st-back:hover { color: var(--bone); }
.st-banners { display: grid; gap: .5rem; margin: 1rem 0 0; }
.st-banner { padding: .75rem 1rem; border-radius: 12px; background: linear-gradient(90deg, #5a0a14, #230810); border: 1px solid var(--blood-hot); font-weight: 700; }
.st-banner small { color: var(--ash); font-weight: 500; margin-left: .4rem; }
.st-tabs { position: sticky; top: 64px; z-index: 5; display: flex; gap: .4rem; overflow-x: auto; padding: .8rem 0; margin: .6rem 0 .2rem; background: linear-gradient(180deg, var(--void) 75%, transparent); scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs button { flex: none; font: 800 .95rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: .75rem 1rem; border-radius: 10px; border: 2px solid var(--line); background: var(--crypt); color: var(--ash); cursor: pointer; }
.st-tabs button[aria-selected="true"] { background: var(--blood); border-color: #ff4b5e; color: #fff; }
.st-tabs button small { opacity: .7; margin-left: .3rem; }
.st-blurb { color: var(--ash); margin: .2rem 0 1rem; }
.st-group { margin: 1.4rem 0 .6rem; font: 800 .9rem/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.st-item { position: relative; display: flex; flex-direction: column; gap: .45rem; background: var(--crypt); border: 1px solid var(--line); border-radius: 16px; padding: .8rem; }
.st-item.owned { border-color: #2f7a3a; }
.st-item.feat { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255,204,77,.25), 0 10px 30px rgba(255,204,77,.08); }
.st-item .art { height: 120px; border-radius: 12px; background: #0d0709; display: grid; place-items: center; font-size: 3rem; overflow: hidden; }
.st-item .art img { height: 100px; max-width: 100%; object-fit: contain; }
.st-item h4 { margin: .1rem 0 0; font: 800 1.2rem/1.15 var(--ui); letter-spacing: .02em; }
.st-item p { margin: 0; color: var(--ash); font-size: .95rem; line-height: 1.35; }
.st-item .tag { position: absolute; top: .6rem; left: .6rem; font: 800 .75rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: .3rem .45rem; border-radius: 6px; background: var(--blood); color: #fff; }
.st-item .tag.ok { background: #2f7a3a; }
.st-item .tag.feat { background: var(--gold); color: #241400; left: auto; right: .6rem; }
.st-item .tag.draft { background: #5a2ad8; }
.st-item .was { text-decoration: line-through; color: var(--dim); font-size: .85rem; margin-left: .25rem; }
.st-acts { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; padding-top: .3rem; }
.st-acts button, .st-acts a { flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: .7rem .5rem; font: 800 1rem/1 var(--ui); letter-spacing: .04em; cursor: pointer; text-align: center; text-decoration: none; white-space: nowrap; }
.st-acts .g { flex: 1.6; background: linear-gradient(180deg, #ffd766, #e0a510); color: #241400; }
.st-acts .e { background: linear-gradient(180deg, #ffa25a, #d4600c); color: #240c00; }
.st-acts .u { background: var(--crypt-2); border: 1px solid var(--line); color: var(--bone); }
.st-acts .u.on { background: #2f7a3a; border-color: #4fbf5f; color: #fff; }
.st-acts .sure { outline: 3px solid #fff; outline-offset: 1px; }
.st-acts button:disabled { opacity: .55; cursor: default; }
.st-swatch { width: 100%; height: 100%; }
.st-ship { width: 100%; height: 100%; }
.st-msg { min-height: 1.4em; font-weight: 700; margin: .4rem 0 0; }
.st-msg.bad { color: var(--blood-hot); } .st-msg.ok { color: var(--toxic); }

/* eggs */
.st-eggs { margin-top: 2.6rem; }
.st-eggs h2 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .3rem; }
.st-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; margin-top: 1rem; }
.st-pack { position: relative; display: flex; flex-direction: column; gap: .4rem; align-items: center; text-align: center; background: radial-gradient(circle at 50% 0%, rgba(255,138,42,.22), transparent 60%), var(--crypt); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem 1rem; }
.st-pack .egg-big { font-size: 3.2rem; line-height: 1; filter: drop-shadow(0 0 16px rgba(255,120,40,.55)); }
.st-pack b { font: 800 1.5rem/1 var(--ui); }
.st-pack .price { font: 800 1.4rem/1 var(--ui); color: var(--gold); }
.st-pack .per { color: var(--dim); font-size: .85rem; }
.st-pack .badge2 { position: absolute; top: -10px; background: var(--ember); color: #1a0a02; font: 800 .75rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 6px; }
.st-pack button { width: 100%; margin-top: .4rem; }
.st-note { color: var(--dim); font-size: .9rem; margin-top: 1rem; }
.st-empty { color: var(--ash); padding: 2rem 0; }

@media (max-width: 560px) {
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .st-item { padding: .6rem; }
  .st-item .art { height: 88px; font-size: 2.3rem; }
  .st-item .art img { height: 76px; }
  .st-item p { display: none; }
  .st-item h4 { font-size: 1.02rem; }
  .st-acts button, .st-acts a { font-size: .9rem; padding: .6rem .3rem; }
  .st-tabs { top: 56px; }
  .st-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- admin ---------------- */
.ad-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.ad-bar select, .ad-bar input, .ad-form input, .ad-form select, .ad-form textarea { background: #0d0709; color: var(--bone); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; font: 500 1rem var(--body); }
.ad-form textarea { width: 100%; min-height: 110px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.ad-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ad-table th, .ad-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ad-table th { font: 800 .8rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); position: sticky; top: 0; background: var(--crypt); }
.ad-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ad-table tr.off td { opacity: .5; }
.ad-table code { font-size: .8rem; color: var(--dim); }
.ad-state { font: 800 .72rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: .25rem .4rem; border-radius: 5px; border: 1px solid var(--line); color: var(--ash); white-space: nowrap; }
.ad-state.custom { color: var(--toxic); border-color: #3f7a2f; }
.ad-state.edited { color: var(--gold); border-color: #7a6a2f; }
.ad-state.removed { color: var(--blood-hot); border-color: #7a2f3a; }
.ad-state.hidden { color: var(--dim); }
.ad-acts { display: flex; gap: .3rem; flex-wrap: wrap; }
.ad-acts button { font: 700 .82rem/1 var(--ui); letter-spacing: .06em; padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--line); background: var(--crypt-2); color: var(--bone); cursor: pointer; }
.ad-acts button.danger { border-color: #7a2f3a; color: var(--blood-hot); }
.ad-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem 1rem; }
.ad-form label { display: flex; flex-direction: column; gap: .3rem; font: 700 .85rem/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.ad-form label.chk input { width: auto; flex: none; }
.ad-form label.chk { flex-direction: row; justify-content: flex-start; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font: 600 1rem var(--body); color: var(--bone); }
.ad-form .hint { font: 400 .85rem/1.35 var(--body); text-transform: none; letter-spacing: 0; color: var(--dim); }
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .7rem; margin: 1rem 0; }
.ad-stats div { background: var(--crypt-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.ad-stats b { display: block; font: 800 1.6rem/1.1 var(--ui); color: var(--gold); }
.ad-stats span { color: var(--dim); font-size: .85rem; }
.ad-scroll { overflow-x: auto; max-width: 100%; }
dialog.ad-dlg { width: min(760px, 100% - 1.5rem); background: var(--crypt); color: var(--bone); border: 1px solid var(--line); border-radius: 18px; padding: 0; }
dialog.ad-dlg::backdrop { background: rgba(0,0,0,.7); }
dialog.ad-dlg .in { padding: 1.3rem; max-height: 85vh; overflow-y: auto; }
dialog.ad-dlg h3 { margin: 0 0 1rem; font-size: 1.8rem; }

/* ---------- admin portal hub ---------- */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.adm-tile { display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem 1.3rem; border-radius: 16px; background: var(--crypt-2, #1f1318); border: 1px solid var(--line, #3a2229); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.adm-tile:hover { border-color: #ff3348; transform: translateY(-2px); }
.adm-tile b { font: 800 1.15rem/1.2 var(--ui); letter-spacing: .03em; }
.adm-tile span { color: var(--ash, #c4b8ad); font-size: .95rem; }
.adm-role { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font: 700 .78rem var(--ui); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line, #3a2229); }
.adm-role.owner { color: #ffcc4d; border-color: #7a6a2f; }
.adm-res { display: flex; align-items: center; gap: .8rem; justify-content: space-between; padding: .6rem .8rem; border: 1px solid var(--line, #3a2229); border-radius: 10px; margin-bottom: .5rem; flex-wrap: wrap; }

/* ---------- master admin portal (/admin/) ---------- */
.ap-hero { padding-bottom: .4rem; }
.ap-tabs { position: sticky; top: 0; z-index: 5; background: var(--void); padding: .6rem 0; margin-bottom: 1rem; }
.ap-tabs button { padding: .7rem .9rem; font-size: .88rem; }
.ap-stats b { display: flex; align-items: center; gap: .35rem; }
.ap-coin { width: 1.1em; height: 1.1em; vertical-align: -.15em; }
.ap-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin: 1rem 0; }
.ap-mini { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid #26171c; color: inherit; text-decoration: none; }
.ap-mini > span:nth-child(2) { flex: 1; min-width: 0; }
.ap-mini b { display: block; }
.ap-mini small { color: var(--dim); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-mini:hover b { color: var(--blood-hot); }
.ap-k { width: 28px; text-align: center; font-size: 1.1rem; }
.ap-role { margin-top: 1.2rem; font-size: .92rem; }
.ap-find input[type=search] { flex: 1 1 260px; }
.ap-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .8rem 1rem; margin-bottom: .8rem; border: 1px dashed #5a3540; border-radius: 12px; background: var(--crypt); }
.ap-bulk > b { flex: 1 1 100%; font: 700 .95rem var(--ui); letter-spacing: .05em; color: var(--ash); }
.ap-bulk-f, .ap-bulk-b { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ap-bulk-f label { display: flex; align-items: center; gap: .35rem; font: 700 .85rem var(--ui); color: var(--ash); }
.ap-bulk-f input { width: 7.5rem; padding: .45rem .55rem; }
.ap-bulk-f label.wide input { width: 15rem; }
.ap-bulk label.chk { display: flex; gap: .35rem; align-items: center; color: var(--ash); }
.ap-players tbody tr { cursor: pointer; }
.ap-players tbody tr:hover td { background: rgba(255, 51, 72, .07); }
.ap-who { display: flex; align-items: center; gap: .6rem; }
.ap-who small { display: block; color: var(--dim); }
.ap-who .adm-role { font-size: .66rem; padding: .08rem .35rem; margin-left: .2rem; }
.ap-ban { color: var(--blood-hot); border-color: #7a2f3a; }
.ap-on { color: var(--toxic); font: 700 .75rem var(--ui); letter-spacing: .06em; margin-left: .2rem; }
.ap-lvl { font: 800 .85rem var(--ui); letter-spacing: .05em; color: var(--c); border: 1px solid var(--c); border-radius: 6px; padding: .15rem .45rem; white-space: nowrap; }
.ap-pager { display: flex; gap: .6rem; align-items: center; justify-content: flex-end; margin-top: .8rem; flex-wrap: wrap; }
.ap-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.ap-head .avatar, .ap-head img { flex: none; }
.ap-head-t { flex: 1; min-width: 240px; }
.ap-head h2 { margin: 0 0 .2rem; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.ap-head h2 .adm-role, .ap-head h2 .ap-on { font-size: .75rem; vertical-align: middle; }
.ap-head p { margin: .2rem 0; }
.ap-meta { font-size: .92rem; }
.ap-id { font-size: .75rem; color: var(--dim); word-break: break-all; }
.ap-mode { display: flex; gap: .4rem; }
.ap-mode select { flex: 0 0 auto; max-width: 52%; }
.ap-mode input { flex: 1; min-width: 0; }
.ap-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-top: .9rem; }
.ap-row-l { justify-content: flex-start; }
.ap-row-l input { flex: 1 1 200px; }
.ap-quick { display: flex; flex-wrap: wrap; gap: .3rem; }
.ap-quick button, .ap-acts button, .ap-acts a, .ap-gtabs button { font: 700 .82rem/1 var(--ui); letter-spacing: .05em; padding: .5rem .65rem; border-radius: 8px; border: 1px solid var(--line); background: var(--crypt-2); color: var(--bone); cursor: pointer; text-decoration: none; }
.ap-acts { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.ap-acts .danger { border-color: #7a2f3a; color: var(--blood-hot); }
.ap-quick button:hover, .ap-acts button:hover, .ap-acts a:hover, .ap-gtabs button:hover { border-color: var(--blood-hot); }
.ap-seg { display: flex; gap: 1.2rem; margin-bottom: .6rem; }
#pfXp > label.chk { margin-top: .6rem; }
.ap-gtop { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ap-gtabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.ap-gtabs button[aria-pressed="true"] { background: var(--blood); border-color: #ff4b5e; color: #fff; }
.ap-gtabs small { color: var(--dim); }
.ap-g3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.ap-g3 h4 { margin: 0 0 .5rem; font: 800 .85rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.ap-g3 p { margin: .3rem 0 .6rem; }
.ap-items { display: flex; flex-wrap: wrap; gap: .35rem; max-height: 220px; overflow-y: auto; }
.ap-item { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .25rem .25rem .55rem; border-radius: 999px; background: var(--crypt-2); border: 1px solid var(--line); font-size: .85rem; }
.ap-item button { border: 0; background: none; color: var(--dim); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.ap-item button:hover { color: var(--blood-hot); }
#pgAdd { flex: 1 1 180px; min-width: 0; }
.ap-danger { margin-top: 1.2rem; padding: 1rem; border: 1px solid #7a2f3a; border-radius: 12px; background: rgba(193, 18, 31, .08); }
.ap-danger p { font-size: .9rem; margin: .4rem 0 0; }
.ap-pos { color: var(--toxic); } .ap-neg { color: var(--blood-hot); }
details { margin: .4rem 0; }
details summary { cursor: pointer; font: 700 1rem var(--ui); letter-spacing: .05em; padding: .4rem 0; }
.ap-game { margin-bottom: 1.2rem; border-top: 3px solid var(--gc); }
.ap-game-h { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ap-game-h img { width: 96px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.ap-game-h > div { flex: 1; min-width: 200px; }
.ap-game-h h3 { margin: 0; }
.ap-st-live { color: var(--toxic); border-color: #3f7a2f; } .ap-st-hidden, .ap-st-missing { color: var(--dim); } .ap-st-coming_soon { color: var(--gold); border-color: #7a6a2f; }
.ap-gstats div { padding: .6rem .8rem; } .ap-gstats b { font-size: 1.3rem; }
.ap-fs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.ap-fs[disabled] { opacity: .55; }
.ap-gift { margin-top: .8rem; }
.ap-top { margin: 0; padding-left: 1.3rem; } .ap-top li { margin: .25rem 0; }
.ap-frame { width: 100%; height: 900px; border: 1px solid var(--line); border-radius: 14px; background: var(--void); display: block; }
.ap-frame-tall { height: calc(100vh - 140px); min-height: 640px; }
.ap-frame-note { margin: 0 0 .7rem; }
@media (max-width: 640px) {
  .ap-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .ap-tabs button { flex: none; }
  .ap-players th:nth-child(6), .ap-players td:nth-child(6), .ap-players th:nth-child(7), .ap-players td:nth-child(7) { display: none; }
  .ap-bulk-f input, .ap-bulk-f label.wide input { width: 100%; }
  .ap-bulk-f label { flex: 1 1 40%; }
  .ap-bulk-f label.wide { flex-basis: 100%; }
}
/* the store manager inside the portal */
html.embed .site-head, html.embed .site-foot, html.embed .st-hero, html.embed .sr-only { display: none !important; }
html.embed body { background: var(--void); }
html.embed main > section { padding-top: .5rem; }
.ap-bulk label.chk input, .ap-row label.chk input, .ap-seg input { width: auto; flex: none; }
.ap-bulk label.chk { white-space: nowrap; }
