/* =====================================================================
   v4.5 · Phase 4B — Member Exclusives gallery + personalization editor.
   Mobile-first. Loaded after v44.css. Brand fonts for personalization
   (RCX …) are loaded on demand by js/platform/artwork.js.
   ===================================================================== */

/* the master membership switch also hides gallery links */
.rc-members-off a[href="#/exclusives"], .rc-members-off a[href="#/account/exclusives"] { display: none !important; }

/* ---------- hero ---------- */
.x-hero .ph-art img:nth-child(2) { transform: translateY(8%) rotate(4deg); }
.x-body { padding-top: 18px; padding-bottom: clamp(48px, 8vw, 96px); }

/* ---------- status + demo note ---------- */
.x-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border-radius: 20px; background: #fff; border: 1px solid #ece4f7;
  box-shadow: 0 24px 50px -40px rgba(27, 16, 53, .55); color: var(--ink); }
.x-status > .ico { flex: none; width: 22px; height: 22px; color: var(--violet); }
.x-status p { flex: 1 1 240px; margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }
.x-status p b { color: var(--ink); }
.x-status.ok { background: linear-gradient(120deg, #fffbea, #e9fff6); border-color: #bdf0d9; }
.x-status.ok > .ico { color: #0f8a5f; }
.x-status.warn { background: linear-gradient(120deg, #fff4e8, #fff); border-color: #ffd2ae; }
.x-status.warn > .ico { color: #ea580c; }
.x-status.invite { background: linear-gradient(115deg, #fff7d6 0%, #ffe6f0 55%, #f1e6ff 100%); border-color: #f5d9f0; }
.x-status.invite > .ico { color: var(--coral); }
.x-status-a { display: flex; flex-wrap: wrap; gap: 8px; }
.x-demo { display: inline-flex; padding: 2px 8px; border-radius: 7px; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7a5200; background: #ffe9a8; vertical-align: middle; }
.x-demo-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 2px 0; font-size: .78rem; line-height: 1.5; color: var(--ink-soft); }
.x-demo-note .ico { flex: none; width: 15px; height: 15px; margin-top: 2px; color: #b7791f; }

/* ---------- section heads ---------- */
.xg-new, .xg-browse { margin-top: clamp(26px, 4vw, 40px); }
.xg-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 18px; margin-bottom: 14px; }
.xg-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display); font-size: clamp(1.2rem, 3.6vw, 1.6rem); font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.xg-h h2 .ico { width: 22px; height: 22px; color: var(--tangerine); }
.xg-h p { margin: 0; font-size: .86rem; color: var(--ink-soft); }
.xg-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 420px; }
.xg-search .ico { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--ink-soft); pointer-events: none; }
.xg-search input { width: 100%; min-height: 46px; padding: 10px 14px 10px 40px; border-radius: 999px; border: 1.5px solid #e4daf3; background: #fff; font: inherit; font-size: .92rem; color: var(--ink);
  box-shadow: 0 10px 24px -20px rgba(27, 16, 53, .6); transition: border-color .2s, box-shadow .2s; }
.xg-search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }

/* ---------- chips ---------- */
.xg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.xg-chips::-webkit-scrollbar { display: none; }
.xc { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #e6dcf5; background: #fff; color: var(--ink);
  font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: transform .2s var(--ease-spring), background .2s, border-color .2s, color .2s; }
.xc em { font-style: normal; font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #f2ebfd; color: var(--ink-soft); }
.xc .ico { width: 15px; height: 15px; }
.xc:hover { border-color: var(--lilac); transform: translateY(-1px); }
.xc[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 12px 24px -16px rgba(27, 16, 53, .9); }
.xc[aria-pressed="true"] em { background: rgba(255, 255, 255, .16); color: #fff; }
.xc-pz[aria-pressed="true"] { background: linear-gradient(120deg, var(--tangerine), var(--coral)); border-color: transparent; }

/* ---------- tiles ---------- */
.xg-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xt { position: relative; min-width: 0; perspective: 900px; }
.xt-btn { position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; border-radius: 22px; background: #fff; text-align: left; color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 0 #fff inset, 0 24px 44px -32px rgba(27, 16, 53, .65), 0 0 0 1px #eee6f8; transform-style: preserve-3d;
  transition: transform .45s var(--ease-spring), box-shadow .3s; }
.xt-btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.xt-art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 22px 22px 16px 16px; background: radial-gradient(120% 90% at 50% 0%, #3a1d7a 0%, #160b35 60%, #0d0820 100%); isolation: isolate; }
.xt-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 32%), linear-gradient(0deg, rgba(13, 8, 32, .35), rgba(13, 8, 32, 0) 40%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.xt-bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(22px) saturate(1.4) brightness(.8); opacity: .75; z-index: -1; }
.xt-img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); transition: transform .5s var(--ease-spring); }
.xt-locked { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center; color: rgba(255, 255, 255, .9); }
.xt-locked b { font-size: .86rem; }
.xt-locked small { font-size: .74rem; color: rgba(255, 255, 255, .62); max-width: 18ch; }
.xt-lockart { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: linear-gradient(140deg, rgba(255, 214, 102, .3), rgba(192, 132, 252, .3)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.xt-lockart .ico { width: 24px; height: 24px; color: var(--sun); }
.xt-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 5px; pointer-events: none; }
.xt-badges.inline { position: static; margin: 4px 0 10px; }
.xb { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #0d0820; background: #fff;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .55); }
.xb .ico { width: 11px; height: 11px; }
.xb-new { background: linear-gradient(120deg, #ffd666, #ff8a3d); }
.xb-feat { background: #fff5e9; }
.xb-tier { background: linear-gradient(120deg, #c084fc, #8b5cf6); color: #fff; }
.xb-pz { background: linear-gradient(120deg, #5eeab4, #38bdf8); }
.xt-badges:not(.inline) .xb-pz .xb-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.xt-badges:not(.inline) .xb-pz { padding: 5px; margin-left: auto; }
.xt-badges:not(.inline) .xb-pz .ico { width: 12px; height: 12px; }
.xt-artwrap { position: relative; display: block; }
.xt-lock { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: inline-flex; }
.xt-meta { display: grid; gap: 2px; padding: 11px 13px 14px; }
.xt-cat { font-size: .7rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-sample { font-style: normal; color: #b7791f; }
.xt-meta b { font-family: var(--font-display); font-size: .88rem; font-weight: 700; line-height: 1.25; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xt-meta small { font-size: .72rem; color: var(--ink-soft); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .xt-btn:hover { transform: translateY(-6px) rotateX(4deg); box-shadow: 0 1px 0 #fff inset, 0 40px 60px -36px rgba(27, 16, 53, .8), 0 0 0 1px #e2d4f7; }
  .xt-btn:hover .xt-img { transform: translateZ(30px) scale(1.04); }
}
.xt-lock { align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: .66rem; font-weight: 800; color: #fff; background: rgba(13, 8, 32, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.xt-lock .ico { width: 11px; height: 11px; color: var(--sun); }

/* "New for Members" rail */
.xg-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 62%); gap: 14px; overflow-x: auto; padding: 4px 4px 18px; margin: 0 -4px; scroll-snap-type: x mandatory;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.xg-rail:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 18px; }
.xg-rail .xt { scroll-snap-align: start; }
.xt-big .xt-art { background: radial-gradient(120% 90% at 50% 0%, #5b2aa8 0%, #1d0d46 55%, #0d0820 100%); }
.xt-big .xt-btn { box-shadow: 0 1px 0 #fff inset, 0 30px 50px -34px rgba(91, 42, 168, .8), 0 0 0 1px #e6d8fa; }
.xt-big .xt-meta b { font-size: .96rem; }

.xg-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; border-radius: 24px; background: #fff; border: 1.5px dashed #e2d6f3; color: var(--ink-soft); }
.xg-empty .ico { width: 28px; height: 28px; color: var(--lilac); }
.xg-empty p { margin: 0; max-width: 36ch; }
.xg-empty b { color: var(--ink); }
.xg-skel { aspect-ratio: 4 / 5.9; border-radius: 22px; }
.xg-loading { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
img.x-missing { opacity: .2; }

/* ---------- dialogs (shared) ---------- */
.x-modal, .x-ed { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; opacity: 0; transition: opacity .25s, visibility 0s linear .25s; }
.x-modal.open, .x-ed.open { visibility: visible; opacity: 1; transition: opacity .25s; }
.x-backdrop { position: absolute; inset: 0; background: rgba(9, 4, 26, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.x-close { position: absolute; top: 10px; right: 10px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s, transform .2s; }
.x-close:hover { background: rgba(255, 255, 255, .26); transform: rotate(90deg); }
.x-close:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.x-close .ico { width: 20px; height: 20px; }
.x-spin { display: inline-block; width: 15px; height: 15px; margin-right: 6px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; vertical-align: -2px; animation: xspin .7s linear infinite; }
@keyframes xspin { to { transform: rotate(360deg); } }

/* ---------- detail dialog ---------- */
.x-card { position: relative; width: 100%; max-height: 94vh; max-height: 94dvh; overflow: auto; overscroll-behavior: contain; border-radius: 28px 28px 0 0; color: #fff;
  background: radial-gradient(140% 70% at 50% 0%, #351a72 0%, #160b35 55%, #0d0820 100%); box-shadow: 0 -30px 80px -30px rgba(0, 0, 0, .7);
  transform: translateY(40px); transition: transform .4s var(--ease-out); }
.x-modal.open .x-card { transform: none; }
.x-view { padding: 18px 18px 0; }
.x-view .xt-art.x-art { aspect-ratio: auto; height: min(52vh, 92vw); border-radius: 22px; background: radial-gradient(100% 80% at 50% 10%, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 70%); }
.x-view .xt-img { inset: 4%; width: 92%; height: 92%; }
.x-view .xt-locked { height: 220px; }
.x-side { padding: 18px 20px 26px; }
.x-cat { margin: 0 0 6px; font-size: .76rem; font-weight: 700; color: rgba(255, 255, 255, .7); }
.x-cat .ico { width: 14px; height: 14px; color: var(--sun); vertical-align: -2px; }
.x-side h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.x-desc { margin: 0 0 16px; font-size: .94rem; line-height: 1.6; color: rgba(255, 255, 255, .82); }
.x-sub { margin: 18px 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.x-files { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.x-files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.xf-n { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xf-n > .ico { flex: none; width: 18px; height: 18px; color: var(--mint); }
.xf-n span { display: grid; min-width: 0; }
.xf-n b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xf-n small { font-size: .72rem; color: rgba(255, 255, 255, .6); }
.x-files .btn-ghost-dark { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); flex: none; }
.x-files .btn-ghost-dark:hover { background: #fff; color: var(--ink); }
.x-files.locked li { opacity: .72; }
.xf-lock .ico { width: 16px; height: 16px; color: rgba(255, 255, 255, .5); }
.x-pz-btn { margin-top: 4px; min-height: 52px; font-size: 1rem; }
.x-pz-btn .ico, .x-side .btn .ico { width: 17px; height: 17px; }
.x-side .btn-block + .btn-block { margin-top: 8px; }
.x-side > .btn-ghost-dark { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); }
.x-fine { margin: 10px 0 0; font-size: .8rem; line-height: 1.5; color: rgba(255, 255, 255, .66); }
.x-gate { display: flex; gap: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(130deg, rgba(255, 214, 102, .14), rgba(255, 92, 138, .14) 60%, rgba(192, 132, 252, .16)); border: 1px solid rgba(255, 214, 102, .32); }
.x-gate > .ico { flex: none; width: 22px; height: 22px; color: var(--sun); margin-top: 2px; }
.x-gate b { display: block; font-size: .98rem; }
.x-gate p { margin: 4px 0 0; font-size: .84rem; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.x-gate-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.x-gate-a .btn-ghost-dark { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.x-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.x-tags span { padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: rgba(255, 255, 255, .72); background: rgba(255, 255, 255, .08); }

/* ---------- editor ---------- */
.x-ed-card { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; height: 100dvh; background: #f7f2ff; color: var(--ink); overflow: hidden;
  transform: translateY(30px); transition: transform .4s var(--ease-out); }
.x-ed.open .x-ed-card { transform: none; }
.x-ed-h { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 62px 10px 16px; background: #0d0820; color: #fff; }
.x-ed-h small { display: flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); }
.x-ed-h small .ico { width: 13px; height: 13px; }
.x-ed-h h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-ed-h .x-close { top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
.x-ed-h .x-close:hover { transform: translateY(-50%) rotate(90deg); }
.x-ed-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.x-ed-stage { position: sticky; top: 0; z-index: 2; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px 8px;
  background: radial-gradient(120% 100% at 50% 0%, #2c1663 0%, #120a2c 70%); box-shadow: 0 18px 30px -24px rgba(13, 8, 32, .9); }
.x-ed-frame { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 12px; width: 100%; height: 42vh; height: 42dvh; min-height: 220px; }
.x-ed-cv { display: block; max-width: 100%; border-radius: 10px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .1); background: #1b1035; }
.x-ed-wait { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; align-items: center; color: rgba(255, 255, 255, .8); font-size: .86rem; font-weight: 700; }
.x-ed-safe { position: absolute; pointer-events: none; border: 2px dashed rgba(255, 214, 102, .95); border-radius: 6px; box-shadow: 0 0 0 9999px rgba(13, 8, 32, .28); transition: all .2s; }
.x-ed-hint { margin: 0; min-height: 1.3em; font-size: .74rem; font-weight: 600; text-align: center; color: rgba(255, 255, 255, .7); }
.x-ed-hint.warn { color: var(--sun); }
.x-ed-panel { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; align-content: start; gap: 14px; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
.x-f { margin: 0; padding: 14px; border: 1px solid #e8def7; border-radius: 20px; background: #fff; box-shadow: 0 16px 34px -30px rgba(27, 16, 53, .6); min-width: 0; }
.x-f legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.x-f-in { clear: both; position: relative; }
.x-f-in input { width: 100%; min-height: 50px; padding: 12px 64px 12px 14px; border-radius: 14px; border: 1.5px solid #ddd0f0; background: #fbf8ff; font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.x-f-in input:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }
.x-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .74rem; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.x-f-msg { min-height: 0; margin: 6px 2px 0; font-size: .76rem; font-weight: 700; color: #c2410c; }
.x-f-msg:empty { display: none; }
.x-fonts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); gap: 8px; margin-top: 12px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.x-font { position: relative; display: grid; gap: 2px; justify-items: center; min-height: 64px; padding: 10px 8px 8px; border-radius: 14px; border: 1.5px solid #e6dcf5; background: #fff; cursor: pointer; text-align: center; transition: border-color .2s, background .2s, transform .2s; }
.x-font:hover { border-color: var(--lilac); }
.x-font input { position: absolute; opacity: 0; pointer-events: none; }
.x-font-s { max-width: 100%; font-size: 1.05rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.x-font small { font-size: .66rem; font-weight: 700; color: var(--ink-soft); }
.x-font:has(input:checked) { border-color: var(--violet); background: #f4edff; box-shadow: 0 10px 20px -16px rgba(139, 92, 246, .9); }
.x-font:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }
.x-size { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.x-lbl { font-size: .78rem; font-weight: 800; color: var(--ink-soft); margin-right: 2px; }
.x-size input[type="range"] { flex: 1; min-width: 0; accent-color: var(--violet); height: 28px; }
.x-ib { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid #e6dcf5; background: #fff; color: var(--ink); cursor: pointer; }
.x-ib:hover { border-color: var(--violet); }
.x-ib .ico { width: 16px; height: 16px; }
.x-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.x-sw { position: relative; display: grid; place-items: center; width: 40px; height: 40px; cursor: pointer; }
.x-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.x-sw span { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(27, 16, 53, .18), 0 6px 12px -8px rgba(27, 16, 53, .8); transition: transform .2s var(--ease-spring), box-shadow .2s; pointer-events: none; }
.x-sw input:checked + span { transform: scale(1.12); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--violet), 0 6px 12px -6px rgba(27, 16, 53, .8); }
.x-sw input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 5px; }
.x-ed-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; position: sticky; bottom: 0; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, #f7f2ff 70%, rgba(247, 242, 255, 0)); }
.x-ed-actions .btn { min-height: 50px; min-width: 0; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.x-ed-actions .btn .ico { width: 17px; height: 17px; }
.x-ed-actions .btn[disabled] { opacity: .6; cursor: progress; }
.x-ed-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: .76rem; line-height: 1.5; color: var(--ink-soft); }
.x-ed-note .ico { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--violet); }

/* ---------- dashboard ---------- */
.x-dash .x-status { margin-top: 4px; }
.x-hist { margin-top: 26px; }
.x-hist h3 .ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--violet); }
.x-mini { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: linear-gradient(115deg, #fff7d6, #ffe6f0 55%, #efe4ff); border: 1px solid #f1dcef; box-shadow: 0 20px 40px -34px rgba(27, 16, 53, .6); transition: transform .25s var(--ease-spring); }
.x-mini:hover { transform: translateY(-2px); }
.x-mini > span:nth-child(2) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.x-mini b { font-family: var(--font-display); font-size: .95rem; }
.x-mini small { font-size: .8rem; color: var(--ink-soft); }
.x-mini > .ico { width: 18px; height: 18px; color: var(--violet); }
.x-mini-pics { display: flex; flex: none; }
.x-mini-pics img { width: 44px; height: 55px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 8px 16px -10px rgba(27, 16, 53, .8); background: #1b1035; }
.x-mini-pics img + img { margin-left: -18px; transform: rotate(6deg); }
.x-mini-pics img:first-child { transform: rotate(-6deg); }

/* ---------- membership page teaser ---------- */
.x-teaser { display: grid; gap: 18px; align-items: center; margin: 4px 0 26px; padding: 22px; border-radius: 26px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #5b2aa8 0%, #1d0d46 50%, #0d0820 100%); box-shadow: 0 30px 60px -40px rgba(27, 16, 53, .9); }
.x-teaser h2 { margin: 2px 0 6px; font-family: var(--font-display); font-size: clamp(1.2rem, 4vw, 1.6rem); font-weight: 800; }
.x-teaser p { margin: 0 0 14px; font-size: .9rem; line-height: 1.55; color: rgba(255, 255, 255, .8); }
.x-teaser .x-cat { margin: 0; color: var(--sun); }
.x-teaser-pics { display: flex; justify-content: center; }
.x-teaser-pics img { width: 26%; max-width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .8); background: #1b1035; }
.x-teaser-pics img:nth-child(odd) { transform: rotate(-6deg) translateY(6px); }
.x-teaser-pics img:nth-child(even) { transform: rotate(5deg); }
.x-teaser-pics img + img { margin-left: -4%; }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .xt-badges:not(.inline) .xb-pz { padding: 4px 8px; }
  .xt-badges:not(.inline) .xb-pz .xb-t { position: static; width: auto; height: auto; clip: auto; }
  .xg-grid, .xg-loading { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .xg-rail { grid-auto-columns: minmax(220px, 34%); gap: 18px; }
  .x-teaser { grid-template-columns: 1.2fr 1fr; padding: 28px 30px; }
}
@media (min-width: 760px) {
  .x-modal, .x-ed { align-items: center; padding: 24px; }
  .x-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); width: min(1040px, 100%); max-height: min(760px, 92vh); border-radius: 30px; overflow: hidden; transform: translateY(16px) scale(.98); }
  .x-view { padding: 22px; display: grid; }
  .x-view .xt-art.x-art { height: auto; min-height: 420px; }
  .x-side { overflow-y: auto; padding: 34px 28px 28px; }
  .x-ed-card { width: min(1180px, 100%); height: min(820px, 94vh); border-radius: 28px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8); }
  .x-ed-body { flex-direction: row; overflow: hidden; }
  .x-ed-stage { position: relative; flex: 1.25; min-width: 0; justify-content: center; padding: 22px; }
  .x-ed-frame { height: auto; flex: 1; min-height: 0; }
  .x-ed-panel { flex: 1; min-width: 330px; max-width: 440px; overflow-y: auto; padding: 20px; }
}
/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  .xg-grid, .xg-loading { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
  .xg-rail { grid-auto-columns: minmax(240px, 23.5%); gap: 22px; }
  .x-teaser { grid-template-columns: 1.3fr 1fr; padding: 32px 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .x-card, .x-ed-card, .xt-btn, .xt-img, .xc, .x-mini { transition: none !important; transform: none !important; }
  .x-spin { animation-duration: 2s; }
}

/* ===== v4.5.1 — Member Exclusives UI polish: overflow fix, scroll arrows, tier-accurate status ===== */
/* Dashboard: the rail's % columns were sizing the dashboard's implicit grid column wider than the screen */
.dash-main:has(> .x-dash) { grid-template-columns: minmax(0, 1fr); }
.dash-main > .x-dash, .x-dash > section { min-width: 0; }

/* Horizontal scrollers with previous / next arrows (swipe, trackpad and keyboard scrolling still work) */
.x-scroll { position: relative; min-width: 0; }
.x-scroll > .xg-rail { scroll-padding-inline: 4px; }
.x-scroll > [data-x-track] { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.x-scroll > [data-x-track]::-webkit-scrollbar { display: none; }
.x-scroll { --x-fade: 52px; }
.x-scroll.can-r > [data-x-track] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--x-fade)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--x-fade)), transparent); }
.x-scroll.can-l > [data-x-track] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--x-fade)); mask-image: linear-gradient(90deg, transparent, #000 var(--x-fade)); }
.x-scroll.can-l.can-r > [data-x-track] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--x-fade), #000 calc(100% - var(--x-fade)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--x-fade), #000 calc(100% - var(--x-fade)), transparent); }
.x-arrow { position: absolute; z-index: 3; top: var(--x-arrow-top, 50%); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(13, 8, 32, .62); border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -12px rgba(13, 8, 32, .8); transform: translateY(-50%); transition: opacity .2s ease, transform .2s ease, background .2s ease; }
.x-arrow.prev { left: 6px; }
.x-arrow.next { right: 6px; }
.x-arrow .ico { width: 18px; height: 18px; }
.x-arrow:hover { background: rgba(139, 92, 246, .9); transform: translateY(-50%) scale(1.08); }
.x-arrow:active { transform: translateY(-50%) scale(.96); }
.x-arrow:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.x-arrow:disabled { opacity: 0; pointer-events: none; }
.x-arrow[hidden] { display: none; }
.x-scroll-rail { --x-arrow-top: 40%; }
@media (max-width: 639px) {
  .x-arrow { width: 34px; height: 34px; }
  .x-arrow .ico { width: 16px; height: 16px; }
  .x-scroll { --x-fade: 40px; }
}
/* Editor font picker: light, compact arrows */
.x-scroll-fonts { margin-top: 12px; --x-fade: 40px; }
.x-scroll-fonts > .x-fonts { margin-top: 0; }
.x-scroll-fonts .x-arrow { width: 30px; height: 30px; color: var(--ink); background: #fff; border: 1.5px solid var(--lilac); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 8px 18px -10px rgba(27, 16, 53, .55); --x-arrow-top: calc(50% - 2px); }
.x-scroll-fonts .x-arrow .ico { width: 15px; height: 15px; }
.x-scroll-fonts .x-arrow.prev { left: -4px; }
.x-scroll-fonts .x-arrow.next { right: -4px; }
.x-scroll-fonts .x-arrow:hover { color: #fff; background: var(--violet); border-color: var(--violet); }
.x-scroll-fonts .x-arrow:focus-visible { outline-color: var(--violet); }
@media (prefers-reduced-motion: reduce) { .x-arrow { transition: none; } .x-arrow:hover, .x-arrow:active { transform: translateY(-50%); } }

/* Status strip: link to compare plans when some pieces belong to another tier */
.x-status-link { font-size: .86rem; font-weight: 800; color: var(--violet); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.x-status-link:hover { color: var(--coral); }
