/* TshirtTube Apparel Challenges storefront. Namespaced under .acs so it sits on
   tshirttube.com and challengetube.com without touching their styles.
   White page, ink type, challenge-red action, gold for EXP (ChallengeTube palette). */
.acs {
  --acs-ink: #14161c; --acs-muted: #5f6672; --acs-line: #e6e8ee; --acs-bg2: #f6f7fa;
  --acs-red: #e5372b; --acs-red-hi: #c41f14; --acs-gold: #f2b705; --acs-gold-ink: #7a5200;
  --acs-ok: #157a3e; --acs-ok-soft: #e7f7ee; --acs-warn: #8a5100; --acs-warn-soft: #fff4df; --acs-bad: #b42318; --acs-bad-soft: #fdeaea; --acs-info: #1d4ed8; --acs-info-soft: #e8f0ff;
  --acs-r: 16px;
  color: var(--acs-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5;
}
.acs *, .acs *::before, .acs *::after { box-sizing: border-box; }
.acs h1 { font: 900 clamp(26px, 4.4vw, 40px)/1.1 Poppins, Inter, system-ui, sans-serif; letter-spacing: -.015em; margin: 0 0 .35em; }
.acs h2 { font: 800 clamp(20px, 2.6vw, 26px)/1.15 Poppins, Inter, system-ui, sans-serif; margin: 0 0 .4em; }
.acs h3 { font-size: 16px; font-weight: 800; margin: 0 0 .4em; }
.acs p { margin: 0 0 .7em; }
.acs a { color: var(--acs-red-hi); }
.acs img { max-width: 100%; display: block; }
.acs-muted { color: var(--acs-muted); } .acs-small { font-size: 13px; } .acs-tiny { font-size: 12px; } .acs-center { text-align: center; }
.acs-lead { font-size: 16px; color: var(--acs-muted); }

.acs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--acs-line); background: #fff; color: var(--acs-ink) !important; font-weight: 700; text-decoration: none !important; cursor: pointer; font-size: 14px; }
.acs-btn:hover { border-color: #cfd3dc; }
.acs-btn:disabled { opacity: .55; cursor: not-allowed; }
.acs-btn--red { background: var(--acs-red); border-color: var(--acs-red); color: #fff !important; }
.acs-btn--red:hover { background: var(--acs-red-hi); }
.acs-btn--ghost { background: transparent; }
.acs-btn--sm { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.acs-btn--lg { min-height: 50px; font-size: 16px; padding: 12px 22px; }
.acs-btn--block { width: 100%; }
.acs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.acs-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f4; color: var(--acs-ink); white-space: nowrap; }
.acs-chip--ink { background: rgba(20, 22, 28, .82); color: #fff; }
.acs-chip--ok { background: var(--acs-ok-soft); color: var(--acs-ok); } .acs-chip--warn { background: var(--acs-warn-soft); color: var(--acs-warn); }
.acs-chip--bad { background: var(--acs-bad-soft); color: var(--acs-bad); } .acs-chip--info { background: var(--acs-info-soft); color: var(--acs-info); }
.acs-chip--d-easy { background: #e3f6ea; color: #116b35; } .acs-chip--d-medium { background: #e6efff; color: #1f4fbf; }
.acs-chip--d-hard { background: #fde8d6; color: #9a3c00; } .acs-chip--d-epic { background: #efe3ff; color: #6a1fc4; }
.acs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.acs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.acs-section { margin-top: 32px; }
.acs-panel { border: 1px solid var(--acs-line); border-radius: var(--acs-r); padding: 16px; background: #fff; margin-top: 14px; }
.acs-panel--soft { background: var(--acs-bg2); }
.acs-empty { padding: 28px 16px; text-align: center; color: var(--acs-muted); border: 1px dashed var(--acs-line); border-radius: var(--acs-r); grid-column: 1 / -1; }
.acs-loading { display: grid; place-items: center; min-height: 140px; grid-column: 1 / -1; }
.acs-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .15); border-top-color: var(--acs-red); animation: acs-spin .8s linear infinite; vertical-align: -3px; }
.acs-spin--lg { width: 34px; height: 34px; border-width: 3px; }
@keyframes acs-spin { to { transform: rotate(360deg); } }

/* cards */
.acs-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.acs-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.acs-row > * { scroll-snap-align: start; }
.acs-card { display: flex; flex-direction: column; border: 1px solid var(--acs-line); border-radius: var(--acs-r); overflow: hidden; background: #fff; color: inherit !important; text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.acs-card:hover { box-shadow: 0 10px 30px rgba(20, 22, 28, .1); transform: translateY(-2px); }
.acs-card__media { position: relative; aspect-ratio: 7 / 8; background: radial-gradient(circle at 50% 40%, #ffffff, #eceef3); display: grid; place-items: center; }
.acs-card__media img { width: 86%; height: 86%; object-fit: contain; }
.acs-card__badges { position: absolute; left: 8px; top: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.acs-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.acs-card__title { font-weight: 800; font-size: 16px; color: var(--acs-ink) !important; text-decoration: none !important; line-height: 1.25; }
.acs-card__sub { color: var(--acs-muted); font-size: 13px; margin: 0; }
.acs-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.acs-price { font-weight: 800; }
.acs-exp { display: flex; flex-wrap: wrap; gap: 6px; }
.acs-exp span { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.acs-exp__p { background: #fff7d6; color: var(--acs-gold-ink); }
.acs-exp__c { background: var(--acs-gold); color: #3b2a00; }

/* catalog filters */
.acs-filters { display: grid; gap: 10px; margin-bottom: 16px; }
.acs-row-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acs-input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--acs-line); border-radius: 10px; background: #fff; font: inherit; color: inherit; }
.acs-row-f .acs-input { width: auto; min-width: 150px; flex: 1 1 150px; }
.acs-tabs { display: flex; gap: 6px; overflow-x: auto; }
.acs-tab { border: 1px solid var(--acs-line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; font: inherit; font-weight: 700; }
.acs-tab[aria-selected="true"] { background: var(--acs-ink); color: #fff; border-color: var(--acs-ink); }
.acs-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.acs-check--block { display: flex; align-items: flex-start; padding: 12px; border: 1px solid var(--acs-line); border-radius: 12px; margin: 10px 0; }
.acs-check input { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* detail */
.acs-detail { display: grid; gap: 22px; }
@media (min-width: 900px) { .acs-detail { grid-template-columns: 1.05fr 1fr; align-items: start; } .acs-detail__art { position: sticky; top: 76px; } }
.acs-stage { position: relative; border-radius: 22px; background: repeating-conic-gradient(#f2f3f6 0% 25%, #fafbfc 0% 50%) 0 0 / 22px 22px; aspect-ratio: 7 / 8; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--acs-line); }
.acs-stage img { width: 92%; height: 92%; object-fit: contain; }
.acs-stage__note { position: absolute; left: 10px; bottom: 10px; }
.acs-mockups { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.acs-mock { width: 74px; flex: none; padding: 0; border: 1px solid var(--acs-line); border-radius: 10px; background: #fff; cursor: pointer; overflow: hidden; }
.acs-rewards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.acs-rewards > div { border-radius: 14px; padding: 12px; background: #fff8dc; border: 1px solid #f6e2a0; }
.acs-rewards b { display: block; font-size: 20px; color: var(--acs-gold-ink); }
.acs-rewards span { font-size: 12px; color: var(--acs-muted); }
.acs-two { display: grid; gap: 14px; }
@media (min-width: 800px) { .acs-two { grid-template-columns: 1fr 1fr; } }
.acs-steps { margin: 0 0 10px; padding-left: 20px; }
.acs-steps li { margin: 4px 0; }
.acs-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 10px; }
.acs-kv dt { color: var(--acs-muted); } .acs-kv dd { margin: 0; text-align: right; }

/* customize + options */
.acs-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--acs-muted); }
.acs-bar { flex: 1; height: 8px; background: #eef0f4; border-radius: 99px; overflow: hidden; }
.acs-bar span { display: block; height: 100%; background: var(--acs-red); transition: width .2s; }
.acs-alert { border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 14px; }
.acs-alert--ok { background: var(--acs-ok-soft); color: var(--acs-ok); } .acs-alert--warn { background: var(--acs-warn-soft); color: var(--acs-warn); } .acs-alert--bad { background: var(--acs-bad-soft); color: var(--acs-bad); }
.acs-field { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; }
.acs-field > span { font-weight: 700; text-transform: capitalize; }
.acs-swatches, .acs-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.acs-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9cdd6; cursor: pointer; }
.acs-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--acs-red); }
.acs-size { display: grid; min-width: 62px; padding: 6px 10px; border: 1px solid var(--acs-line); border-radius: 10px; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.acs-size small { font-weight: 500; color: var(--acs-muted); font-size: 11px; }
.acs-size[aria-pressed="true"] { border-color: var(--acs-ink); box-shadow: inset 0 0 0 1px var(--acs-ink); }
.acs-total { font-size: 20px; margin: 12px 0 4px; }
.acs-grid3 { display: grid; gap: 0 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .acs-grid3 { grid-template-columns: 2fr 1fr 1fr; } }

/* face picker */
.acs-picker { position: relative; display: inline-block; max-width: 100%; margin: 8px 0; cursor: crosshair; }
.acs-picker img { max-height: 58vh; width: auto; border-radius: 12px; }
.acs-facebox { position: absolute; border: 3px solid #fff; outline: 2px solid var(--acs-red); border-radius: 10px; background: rgba(229, 55, 43, .12); cursor: pointer; }
.acs-facebox:hover, .acs-facebox:focus { background: rgba(229, 55, 43, .3); }
.acs-manual { position: absolute; border: 3px solid #fff; outline: 2px solid var(--acs-red); border-radius: 50%; pointer-events: none; }

/* lists, profile */
.acs-list { display: grid; gap: 10px; }
.acs-list__row { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--acs-line); border-radius: 12px; }
.acs-thumbs { display: flex; gap: 4px; flex: none; }
.acs-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.acs-timeline { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.acs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.acs-stats > div { border: 1px solid var(--acs-line); border-radius: 12px; padding: 10px 12px; }
.acs-stats b { display: block; font-size: 22px; }
.acs-stats span { font-size: 12px; color: var(--acs-muted); }
.acs-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.acs-badge { padding: 6px 12px; border-radius: 999px; background: linear-gradient(135deg, #fff3c4, #ffe08a); font-weight: 800; font-size: 13px; }

/* modal + toasts */
.acs-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(12, 14, 20, .55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.acs-modal__box { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.acs-toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1100; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.acs-toast { background: var(--acs-ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.acs-toast--ok { background: var(--acs-ok); } .acs-toast--bad { background: var(--acs-bad); }

@media (max-width: 560px) {
  .acs-rewards b { font-size: 17px; }
  .acs-head { align-items: flex-start; }
  .acs-modal__box { padding: 16px; border-radius: 16px; }
}

/* admin face-template editor */
.ac-ed { display: grid; gap: 18px; }
@media (min-width: 1000px) { .ac-ed { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); align-items: start; } .ac-ed__stage { position: sticky; top: 76px; } }
.ac-ed__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ac-ed__canvas { position: relative; width: 100%; max-width: 640px; }
.ac-ed__canvas canvas { display: block; border-radius: 12px; }
#edCanvas { background: repeating-conic-gradient(#eceef2 0% 25%, #fafbfc 0% 50%) 0 0 / 20px 20px; border: 1px solid var(--acs-line); }
#edOverlay { position: absolute; inset: 0; touch-action: none; cursor: move; outline: none; }
.ac-ed__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0 10px; }
.ac-ed__grid .acs-field { margin: 6px 0; }
.ac-ed__grid .acs-field > span { font-size: 12px; font-weight: 600; text-transform: none; }
.ac-ed__region { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--acs-line); }
.ac-ed__cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ac-ed__cmp figure { margin: 0; }
.ac-ed__cmp img { width: 100%; border-radius: 10px; background: repeating-conic-gradient(#eceef2 0% 25%, #fafbfc 0% 50%) 0 0 / 14px 14px; border: 1px solid var(--acs-line); }
.ac-ed__cmp figcaption { font-size: 12px; color: var(--acs-muted); margin-top: 4px; }
