/* Dead Center Apps - admin creator labs (/admin/labs/). Builds on dca.css + store.css (.ad-form, .ad-table, .panel). */
.lb-tabs { position: sticky; top: 0; z-index: 5; background: var(--void); padding: .6rem 0; margin-bottom: 1rem; }
.lb-tabs button { padding: .75rem 1rem; font-size: .95rem; }
.lb-how { margin: 0 0 1.2rem; padding: .3rem 1.1rem; border: 1px dashed #5a3540; border-radius: 14px; background: linear-gradient(135deg, rgba(255,138,42,.08), transparent 60%), var(--crypt); }
.lb-how summary { font: 800 1rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ember); padding: .6rem 0; cursor: pointer; }
.lb-how ol { margin: 0 0 .9rem; padding-left: 1.3rem; color: var(--ash); }
.lb-how li { margin: .35rem 0; line-height: 1.45; }
.lb-how b { color: var(--bone); }
.lb-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 1.2rem; align-items: start; }
.lb-form { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.lb-form-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.lb-form-head h3 { margin: 0; font-size: 1.7rem; }
.lb-form .ad-grid2 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.lb-form input[type=text], .lb-form input[type=number], .lb-form input:not([type]), .lb-form select { width: 100%; min-width: 0; box-sizing: border-box; }
.lb-pricebar { margin: 0; }
.lb-side { position: sticky; top: 72px; }
.lb-side-coin { position: static; }
.lb-list-h { margin: 2rem 0 .6rem; font-size: 1.5rem; }

/* images */
.lb-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.lb-img { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.lb-img-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font: 800 .85rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }
.lb-img-head .hint { font: 400 .85rem/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--dim); }
.lb-size { font: 700 .75rem/1 var(--ui); letter-spacing: .08em; color: var(--gold); border: 1px solid #7a6a2f; border-radius: 6px; padding: .25rem .4rem; }
.lb-drop { display: block; cursor: pointer; border: 2px dashed #5a3540; border-radius: 14px; background: #0d0709; overflow: hidden; transition: border-color .15s; }
.lb-drop:hover, .lb-drop:focus-within, .lb-drop.over { border-color: var(--blood-hot); }
.lb-prev { aspect-ratio: 1 / 1; display: grid; place-items: center; text-align: center; padding: .6rem; min-height: 120px;
  background-color: #1a1114; background-image: linear-gradient(45deg, #231519 25%, transparent 25%, transparent 75%, #231519 75%), linear-gradient(45deg, #231519 25%, transparent 25%, transparent 75%, #231519 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.lb-prev img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lb-prev-wide { aspect-ratio: 16 / 9; }
.lb-prev-wide img { width: 100%; height: 100%; object-fit: cover; }
.lb-extra-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.lb-extra { position: relative; display: flex; flex-direction: column; gap: .3rem; }
.lb-extra .lb-prev { min-height: 90px; }
.lb-extra input[type=text] { font-size: .85rem; padding: .4rem .5rem; }
.lb-extra .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }

/* released switch */
.lb-switch { display: flex; align-items: center; gap: .8rem; cursor: pointer; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--crypt-2); text-transform: none; letter-spacing: 0; font: 500 1rem var(--body); color: var(--bone); }
.lb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lb-switch .lb-knob { flex: none; width: 50px; height: 28px; border-radius: 14px; background: #3a2229; position: relative; transition: background .15s; }
.lb-switch .lb-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--bone); transition: left .15s; }
.lb-switch input:checked + .lb-knob { background: #2f7a3a; }
.lb-switch input:checked + .lb-knob::after { left: 25px; }
.lb-switch input:focus-visible + .lb-knob { outline: 3px solid var(--gold); outline-offset: 2px; }
.lb-switch small { display: block; color: var(--dim); font-size: .85rem; line-height: 1.3; }
.lb-switch b { font: 800 1rem var(--ui); letter-spacing: .06em; text-transform: uppercase; }
.lb-switch input:checked ~ span b { color: var(--toxic); }

/* preview card (looks like a store card) */
.lb-card { position: relative; display: flex; flex-direction: column; gap: .45rem; background: var(--crypt-2); border: 1px solid var(--line); border-radius: 16px; padding: .8rem; max-width: 300px; }
.lb-card .art { height: 150px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; font-size: 3rem;
  background-color: #0d0709; background-image: linear-gradient(45deg, #1a1114 25%, transparent 25%, transparent 75%, #1a1114 75%), linear-gradient(45deg, #1a1114 25%, transparent 25%, transparent 75%, #1a1114 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.lb-card .art img { max-height: 130px; max-width: 100%; object-fit: contain; }
.lb-card h4 { margin: .1rem 0 0; font: 800 1.2rem/1.15 var(--ui); }
.lb-card p { margin: 0; color: var(--ash); font-size: .95rem; line-height: 1.35; }
.lb-card .lb-price { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .2rem; }
.lb-card .lb-price span { border-radius: 10px; padding: .55rem .7rem; font: 800 .95rem/1 var(--ui); }
.lb-card .lb-price .g { background: linear-gradient(180deg, #ffd766, #e0a510); color: #241400; }
.lb-card .lb-price .e { background: linear-gradient(180deg, #ffa25a, #d4600c); color: #240c00; }
.lb-card .lb-price .f { background: #2f7a3a; color: #fff; }
.lb-card .lb-price .r { background: var(--crypt); border: 1px solid var(--line); color: var(--ash); }
.lb-draft, .st-item .tag.draft { background: #5a2ad8 !important; color: #fff; }
.lb-card .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: #5a2ad8; color: #fff; }
.lb-sizes { margin-top: .9rem; }

/* palette */
.lb-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.lb-sw { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem .4rem .4rem; border: 1px solid var(--line); border-radius: 10px; background: var(--crypt-2); cursor: pointer; }
.lb-sw input[type=color] { width: 38px; height: 38px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; flex: none; }
.lb-sw input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.lb-sw input[type=color]::-webkit-color-swatch { border: 2px solid rgba(255,255,255,.25); border-radius: 8px; }
.lb-sw span { display: flex; flex-direction: column; min-width: 0; }
.lb-sw b { font: 800 .8rem/1.1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.lb-sw code { font-size: .75rem; color: var(--dim); }
.lb-colorrow { display: flex; gap: .5rem; align-items: center; }
.lb-colorrow input[type=color] { width: 46px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #0d0709; flex: none; }
.lb-colorrow input[type=text] { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* theme preview */
.lb-theme-prev { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 260px; background: #222; }
.lb-tp-bg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: .55; }
.lb-tp-in { position: relative; padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.lb-tp-kicker { font: 700 .8rem/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; }
.lb-tp-title { margin: 0; font: 800 1.9rem/1.05 var(--ui); letter-spacing: .02em; }
.lb-tp-text { margin: 0; font-size: .95rem; line-height: 1.4; }
.lb-tp-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.lb-tp-btn, .lb-tp-btn2 { border: 0; border-radius: 10px; padding: .6rem 1rem; font: 800 1rem/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; cursor: default; }
.lb-tp-danger { font: 800 .75rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: .35rem .5rem; border-radius: 6px; color: #fff; }
.lb-tp-swatches { display: flex; gap: .3rem; margin-top: .5rem; }
.lb-tp-swatches span { flex: 1; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.4); }

/* coin lab */
.lb-layout-coin { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
.lb-faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.lb-face { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.lb-face-stage { position: relative; border-radius: 14px; overflow: hidden; border: 2px dashed #5a3540;
  background-color: #1a1114; background-image: linear-gradient(45deg, #231519 25%, transparent 25%, transparent 75%, #231519 75%), linear-gradient(45deg, #231519 25%, transparent 25%, transparent 75%, #231519 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.lb-face-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; touch-action: none; cursor: grab; }
.lb-face-stage canvas.drag { cursor: grabbing; }
.lb-face-pick { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(0,0,0,.72); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .55rem 1rem; font: 800 .9rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.lb-face-pick:hover { background: var(--blood); }
.lb-face-tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lb-face-tools label { flex: 1 1 140px; display: flex; align-items: center; gap: .5rem; font: 700 .8rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ash); }
.lb-face-tools input[type=range] { flex: 1; min-width: 80px; accent-color: var(--blood-hot); }
.lb-games { display: flex; flex-wrap: wrap; gap: .4rem; }
.lb-games label { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--crypt-2); cursor: pointer; font: 600 .95rem var(--body); text-transform: none; letter-spacing: 0; color: var(--bone); }
.lb-games label.on { border-color: var(--blood-hot); background: rgba(255,51,72,.12); }
.lb-games input { width: auto; margin: 0; }
.lb-3d { position: relative; aspect-ratio: 1 / 1; max-height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, #2a1a20, #0d0709 70%); touch-action: none; }
.lb-3d canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.lb-3d-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; text-align: center; padding: 1rem; }

/* list */
.lb-table .ad-acts a { 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); text-decoration: none; display: inline-block; }
.lb-table img, .lb-thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #0d0709; display: block; }
.lb-thumb { display: grid; place-items: center; font-size: 1.5rem; }
.lb-thumb.round { border-radius: 50%; }
.lb-table code { font-size: .78rem; }
.lb-table .ad-state.draft { color: #c9b3ff; border-color: #5a2ad8; }
.lb-table .ad-state.live { color: var(--toxic); border-color: #3f7a2f; }
.lb-table small { color: var(--dim); display: block; }

/* busy */
.lb-form.busy { opacity: .6; pointer-events: none; }

@media (max-width: 860px) {
  .lb-layout, .lb-layout-coin { grid-template-columns: 1fr; }
  .lb-side { position: static; }
  .lb-side .lb-card { max-width: none; }
}
@media (max-width: 640px) {
  .lb-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .lb-tabs button { flex: none; }
  .lb-how { padding: .2rem .8rem; }
  .lb-form.panel, .lb-side.panel { padding: 1rem; }
  .lb-table th:nth-child(6), .lb-table td:nth-child(6) { display: none; }
  .lb-faces { grid-template-columns: 1fr; }
}
html.embed .site-head, html.embed .site-foot, html.embed .st-hero, html.embed .sr-only { display: none !important; }
html.embed .lb-tabs { top: 0; }

/* the three lab tiles on the /admin/ dashboard */
.lb-tiles .lb-tile { border-color: #5a3540; background: linear-gradient(135deg, rgba(90,42,216,.18), rgba(255,138,42,.08) 60%, var(--crypt-2)); padding: 1.5rem 1.4rem; min-height: 150px; }
.lb-tiles .lb-tile b { font-size: 1.35rem; }
.lb-tiles .lb-tile:hover { border-color: var(--gold); }
