/* The Graphic Studio (graphic-studio.js): a full-screen app over
   /guide-builder/ with Create, Choose a cookie, the editor and Share.
   The chrome is the site's design system (every colour a --th-* token, both
   themes); the graphics themselves carry the colour (graphic-looks.css).
   One markup: below 900px the editor is a phone editor (preview on top, one
   bottom sheet, a toolbar in the thumb zone); above it three columns. */

html.gx-locked, html.gx-locked body { overflow: hidden; }

.th.gx {
  container: th gx / size;
  position: fixed;
  inset: 0;
  z-index: 100;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--th-ground);
  color: var(--th-ink);
  outline: none;
}
.gx .gx-screen { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.gx .gx-ico { width: 20px; height: 20px; }
.gx .gx-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-ink-3); }
/* Which Look a setting belongs to ("Cookie art · Gilded"). */
.gx .gx-lbl-sub { color: var(--th-gold); }
.gx .gx-meta { font-size: 12.5px; font-weight: 600; color: var(--th-ink-3); }
.gx .gx-hint { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--th-ink-3); }
.gx .gx-hint a, .gx .gx-save-line a { color: var(--th-gold); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.gx .gx-mt { margin-top: 22px; }
.gx .gx-mt-s { margin-top: 14px; }
.gx .gx-center { text-align: center; }
.gx .gx-block { width: 100%; }
.gx .gx-grow { flex: 1; }
.gx .gx-empty { padding: 18px 4px; color: var(--th-ink-3); }
.gx .gx-dot-ok { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--th-up); flex: none; }
.gx .gx-dot-ok[data-error="true"] { background: var(--th-down, #ff6b6b); }
.gx .th-btn.gx-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.gx .th-btn.gx-lg { height: 52px; padding: 0 22px; font-size: 16px; }
.gx .th-btn--sel { border-color: transparent; background: var(--th-sel-bg); color: var(--th-sel-ink); box-shadow: var(--th-sel-shadow); }
.gx .th-btn .gx-ico { width: 18px; height: 18px; }
.gx .th-seg button[disabled] { opacity: 0.4; cursor: not-allowed; }
.gx .gx-seg-wide { display: flex; width: 100%; }
.gx .gx-seg-wide button { flex: 1; justify-content: center; }
.gx .gx-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--th-gold); font-size: 13.5px; font-weight: 600; }
.gx .gx-link .gx-ico { width: 16px; height: 16px; }
.gx .gx-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gx .gx-count { font-size: 12px; font-weight: 600; color: var(--th-ink-3); }

/* Icon buttons, chips, fields */
.gx .gx-ibtn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: var(--th-btn-bg); color: var(--th-ink); }
.gx .gx-ibtn:hover { background: var(--th-btn-hover); }
.gx .gx-ibtn--bare { background: transparent; }
.gx .gx-ibtn--sm { width: 32px; height: 32px; }
.gx .gx-ibtn--sm .gx-ico { width: 16px; height: 16px; }
.gx .gx-ibtn[disabled] { opacity: 0.35; cursor: default; }
.gx .gx-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--th-btn-bg); color: var(--th-ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.gx .gx-chip:hover { background: var(--th-btn-hover); }
.gx .gx-chip.is-on, .gx .gx-chip[aria-pressed="true"] { background: var(--th-sel-bg); color: var(--th-sel-ink); }
.gx .gx-chip[disabled] { opacity: 0.4; cursor: not-allowed; }
.gx .gx-chip img { width: 18px; height: 18px; object-fit: contain; }
.gx .gx-chip--static { cursor: default; background: var(--th-btn-bg); }
.gx .gx-chip-dot { width: 14px; height: 14px; border-radius: 50%; background: rgb(var(--gx-sw)); }
.gx .gx-chips { display: flex; gap: 8px; margin-top: 8px; }
.gx .gx-chips--wrap { flex-wrap: wrap; }
.gx .gx-chips--scroll { overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
.gx .gx-chips--scroll::-webkit-scrollbar { display: none; }
.gx .gx-field { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--th-field-bg); border: 1px solid var(--th-line-2); color: var(--th-ink); }
.gx .gx-field input:focus-visible { outline: none; }
.gx .gx-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: inherit; font-size: 15px; outline: none; }
.gx .gx-field:focus-within { border-color: var(--th-gold-line); box-shadow: 0 0 0 3px var(--th-gold-faint); }
.gx .gx-field .gx-ico { color: var(--th-ink-3); }
.gx .gx-label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--th-ink-2); }
.gx .gx-input { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--th-line-2); background: var(--th-field-bg); color: var(--th-ink); font-size: 15px; line-height: 1.35; }
.gx .gx-input:focus { outline: none; border-color: var(--th-gold-line); box-shadow: 0 0 0 3px var(--th-gold-faint); }
.gx .gx-input::placeholder { color: var(--th-ink-3); opacity: 0.8; }
.gx .gx-textarea { min-height: 104px; resize: vertical; font-family: inherit; }
.gx .gx-select { min-width: 0; height: 40px; padding: 0 30px 0 12px; border-radius: 12px; border: 1px solid var(--th-line-2); background: var(--th-field-bg); color: var(--th-ink); font-size: 14px; }
.gx .gx-select:focus { outline: none; border-color: var(--th-gold-line); box-shadow: 0 0 0 3px var(--th-gold-faint); }
.gx .gx-select[disabled] { opacity: 0.6; }
.gx .gx-select option { color: #111318; }

/* App bars */
.gx .gx-bar { display: flex; align-items: center; gap: 10px; flex: none; height: 60px; padding: 0 12px; border-bottom: 1px solid var(--th-line); background: var(--th-surface-sunk); }
.gx .gx-bar-title { font-size: 22px; flex: 1; }
.gx .gx-bar-ttl { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gx .gx-bar-ttl > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--th-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-bar-ttl > b { font-size: 17px; font-family: "CookieRun KR", "Outfit", sans-serif; color: var(--th-heading); }
.gx .gx-title-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 0; border: 0; background: none; color: var(--th-heading); font-size: 15px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-title-btn .gx-ico { width: 15px; height: 15px; color: var(--th-ink-3); }
.gx .gx-rename { min-height: 34px; padding: 4px 10px; font-weight: 700; max-width: 340px; }
.gx .gx-bar-fill { flex: 1; }
.gx .gx-bar--editor .gx-bar-ttl { flex: 0 1 auto; }
.gx .gx-share-btn { height: 38px; }

/* Create ----------------------------------------------------------------------------------- */
.gx .gx-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.gx .gx-narrow { width: 100%; max-width: 680px; margin: 0 auto; padding: 16px 16px 28px; }
.gx .gx-lede { margin-top: 10px; font-size: 13.5px; color: var(--th-ink-3); }
.gx .gx-fmts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.gx .gx-fmt { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--th-line); background: var(--th-surface-1); color: var(--th-ink); text-align: left; }
.gx .gx-fmt.is-ready { box-shadow: 0 0 0 2px var(--th-gold); }
.gx .gx-fmt.is-ready:hover { transform: translateY(-1px); }
.gx .gx-fmt[disabled] { cursor: default; }
.gx .gx-fmt[disabled] .gx-fmt-art { filter: saturate(0.75); opacity: 0.8; }
.gx .gx-fmt-art { position: relative; display: block; height: 112px; overflow: hidden; }
.gx .gx-fmt-art--build { background: linear-gradient(160deg, #1d6b4c 0%, #0b2a1d 100%); }
.gx .gx-fmt-art--team { background: linear-gradient(160deg, #24357d 0%, #0b1030 100%); }
.gx .gx-fmt-art--tier { background: linear-gradient(160deg, #3a2073 0%, #1b0e38 100%); }
.gx .gx-fmt-art--rotation { background: linear-gradient(160deg, #6b3a12 0%, #1d1008 100%); }
.gx .gx-fmt-face { position: absolute; left: 12px; top: 14px; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #9df0c6; box-shadow: 0 0 0 2px #ffffff, 0 4px 10px rgba(0, 0, 0, 0.5); }
.gx .gx-fmt-wheel { position: absolute; left: 104px; top: 8px; width: 56px; height: 56px; object-fit: contain; }
.gx .gx-fmt-bea { position: absolute; left: 106px; top: 60px; width: 48px; height: 48px; object-fit: contain; }
.gx .gx-fmt-mini { position: absolute; top: 58px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #ffffff, 0 4px 10px rgba(0, 0, 0, 0.5); }
.gx .gx-fmt-tier { position: absolute; left: 12px; right: 12px; height: 26px; display: flex; align-items: center; gap: 5px; }
.gx .gx-fmt-tier i { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font: 700 11px/1 "CookieRun KR", sans-serif; font-style: normal; color: #ffffff; }
.gx .gx-fmt-tier img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; }
.gx .gx-tier-ss { background: linear-gradient(180deg, #ff4d6d, #ec34a0); }
.gx .gx-tier-s { background: linear-gradient(180deg, #ff8c38, #f76828); }
.gx .gx-tier-a { background: linear-gradient(180deg, #fcc840, #f0a624); }
.gx .gx-fmt-line { position: absolute; left: 18px; right: 18px; top: 52px; height: 3px; border-radius: 2px; background: rgba(240, 205, 126, 0.6); }
.gx .gx-fmt-times { position: absolute; left: 10px; right: 6px; top: 82px; display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: #ffd98a; }
.gx .gx-fmt-txt { display: block; padding: 10px 12px 12px; }
/* Single cards: one part of a build, three across, smaller art. */
.gx .gx-fmts--single { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gx .gx-fmt-art--single { display: flex; align-items: center; justify-content: center; height: 78px; }
.gx .gx-fmt-art--cookie { background: linear-gradient(160deg, #1d6b4c 0%, #0b2a1d 100%); }
.gx .gx-fmt-art--toppings { background: linear-gradient(160deg, #7a2232 0%, #26080e 100%); }
.gx .gx-fmt-art--beascuit { background: linear-gradient(160deg, #6e5214 0%, #221905 100%); }
.gx .gx-fmt-solo { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.gx .gx-fmt-solo--face { border-radius: 50%; object-fit: cover; background: #9df0c6; box-shadow: 0 0 0 2px #ffffff, 0 4px 10px rgba(0, 0, 0, 0.5); }
.gx .gx-fmt--single .gx-fmt-txt { padding: 8px 10px 10px; }
.gx .gx-fmt--single .gx-fmt-txt b { font-size: 14.5px; }
.gx .gx-fmt--single .gx-fmt-txt > span { font-size: 11.5px; }
.gx .gx-fmt-txt b { display: block; font: 700 16px/1.15 "CookieRun KR", "Outfit", sans-serif; color: var(--th-heading); }
.gx .gx-fmt-txt > span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; color: var(--th-ink-3); }
.gx .gx-soon { display: inline-block; margin-top: 8px; padding: 3px 8px; border-radius: 999px; background: var(--th-btn-bg); font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: 0.04em; color: var(--th-ink-2); }
.gx .gx-later { margin-top: 12px; font-size: 12.5px; color: var(--th-ink-3); }
.gx .gx-resume-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gx .gx-resume { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--th-line); background: var(--th-surface-1); color: var(--th-ink); text-align: left; }
.gx .gx-resume:hover { background: var(--th-surface-2); }
.gx .gx-resume-th { position: relative; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; background: var(--th-surface-3); box-shadow: 0 0 0 2px rgb(var(--gx-rc)); }
.gx .gx-resume-th img { width: 100%; height: 100%; object-fit: cover; }
.gx .gx-resume-txt { flex: 1; min-width: 0; }
.gx .gx-resume-txt b { display: block; font-size: 14.5px; font-weight: 700; color: var(--th-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-resume-txt > span { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--th-ink-3); }
.gx .gx-resume > .gx-ico { color: var(--th-ink-3); }
.gx .gx-guide-card { display: flex; gap: 16px; align-items: center; margin-top: 22px; padding: 16px; border-radius: 18px; border: 1px solid var(--th-line); background: var(--th-surface-1); }
.gx .gx-guide-card b { font: 700 18px/1.2 "CookieRun KR", "Outfit", sans-serif; color: var(--th-heading); }
.gx .gx-guide-card p { margin: 6px 0 12px; font-size: 13.5px; color: var(--th-ink-3); }
.gx .gx-guide-art { flex: none; width: 110px; height: 110px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #3a2073, #1b0e38); }
.gx .gx-guide-art img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 20%; }
/* The full guide builder ships after the graphics: until then its side of Create
   is a Coming soon placeholder (graphic-studio-view.js guideSide), with a small
   "Soon" mark on its segment and, for an admin only, the builder itself. */
.gx .gx-seg-soon { margin-left: 7px; padding: 2px 6px; border-radius: 999px; border: 1px dashed currentColor; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.2; text-transform: uppercase; opacity: 0.75; }
.gx .gx-guide-card--soon { border-style: dashed; border-color: var(--th-line-3); }
.gx .gx-guide-card--soon .gx-guide-art img { filter: saturate(0.8); }
.gx .gx-guide-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.gx .gx-guide-admin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--th-surface-2); }
.gx .gx-guide-admin p { flex: 1 1 240px; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--th-ink-3); }
.gx .gx-guide-admin b { color: var(--th-ink-2); }

/* Choose a cookie --------------------------------------------------------------------------- */
.gx .gx-scroll--picker .gx-narrow { padding-bottom: 210px; }
.gx .gx-search { margin-top: 4px; }
.gx .gx-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.gx .gx-chips--scroll { margin-top: 12px; }
.gx .gx-filter-choices { margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--th-surface-1); border: 1px solid var(--th-line); }
.gx .gx-face { position: relative; display: block; flex: none; width: var(--gx-face); height: var(--gx-face); }
.gx .gx-face-img { width: 100%; height: 100%; border-radius: 22%; object-fit: cover; background: var(--th-surface-3); box-shadow: 0 0 0 2px rgb(var(--gx-rc, 155, 162, 176)); }
.gx .gx-face-el { position: absolute; right: -7px; top: -7px; width: 37%; height: 37%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)); }
.gx .gx-face.is-selected::after { content: ""; position: absolute; inset: -5px; border-radius: 28%; box-shadow: 0 0 0 2.5px var(--th-gold); pointer-events: none; }
.gx .gx-face-check { position: absolute; left: -7px; bottom: -7px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--th-gold); color: #2b1b05; box-shadow: 0 0 0 2px var(--th-ground); }
.gx .gx-face-check .gx-ico { width: 13px; height: 13px; stroke-width: 3; }
.gx .gx-pgrid, .gx .gx-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); row-gap: 16px; column-gap: 4px; margin-top: 14px; }
.gx .gx-pf { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 0 0; border: 0; border-radius: 14px; background: none; color: var(--th-ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.gx .gx-pf:hover { color: var(--th-heading); }
.gx .gx-pf.is-on { color: var(--th-heading); }
/* The chosen cookie, in Recently used's place (pickedFrame in graphic-studio-view.js):
   a pick redraws the list at its top, so the grid's highlighted portrait is out of sight. */
.gx .gx-picked { display: flex; align-items: center; gap: 18px; margin-top: 12px; padding: 14px 16px 14px 18px; border-radius: 18px; border: 1px solid var(--th-gold-line); background: linear-gradient(115deg, rgba(var(--gx-rc), 0.2) 0%, rgba(var(--gx-rc), 0) 60%), var(--th-surface-1); }
.gx .gx-picked-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gx .gx-picked-txt b { font: 700 18px/1.2 "CookieRun KR", "Outfit", sans-serif; color: var(--th-heading); overflow-wrap: anywhere; }
.gx .gx-picked-rarity { display: block; height: 20px; width: auto; }
.gx .gx-picked-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.gx .gx-picked-fact { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--th-ink-2); }
.gx .gx-picked-fact img { width: 18px; height: 18px; object-fit: contain; }
.gx .gx-fadebar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--th-surface-sunk); border-top: 1px solid var(--th-line); box-shadow: 0 -30px 30px -6px rgba(var(--th-ground-rgb), 0.95); padding-bottom: env(safe-area-inset-bottom); }
.gx .gx-fadebar .gx-narrow { padding: 12px 16px 16px; }
.gx .gx-fadebar .th-seg { margin-top: 8px; }
.gx .gx-fadebar .th-btn.gx-lg { margin-top: 12px; }

/* Editor ---------------------------------------------------------------------------------- */
.gx .gx-editor { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; grid-template-rows: 64px minmax(0, 1fr); grid-template-areas: "bar bar bar" "left stage right"; }
.gx .gx-editor > .gx-bar { grid-area: bar; height: 64px; padding: 0 16px; gap: 12px; }
.gx .gx-left { grid-area: left; min-height: 0; overflow-y: auto; border-right: 1px solid var(--th-line); background: var(--th-surface-sunk); }
.gx .gx-right { grid-area: right; min-height: 0; overflow-y: auto; border-left: 1px solid var(--th-line); background: var(--th-surface-sunk); }
.gx .gx-stage { grid-area: stage; position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background-color: var(--th-ground); background-image: radial-gradient(rgba(var(--th-ink-rgb, 236, 238, 242), 0.07) 1px, transparent 1.2px); background-size: 18px 18px; }
.gx .gx-toolbar { display: none; }
.gx .gx-only-phone { display: none; }
.gx .gx-left-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 18px 10px; }
.gx .gx-sec { border-bottom: 1px solid var(--th-line); }
.gx .gx-left .gx-sec:first-of-type { border-top: 1px solid var(--th-line); }
.gx .gx-sec[data-open="true"] { background: var(--th-surface-1); }
.gx .gx-sec-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; border: 0; background: none; color: var(--th-ink); text-align: left; }
.gx .gx-sec[data-open="true"] .gx-sec-sum { visibility: hidden; }
.gx .gx-sec-head b { font-size: 14.5px; font-weight: 700; color: var(--th-heading); }
.gx .gx-sec-sum { margin-left: auto; min-width: 0; max-width: 60%; font-size: 12px; font-weight: 600; color: var(--th-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-st { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; border-radius: 50%; }
.gx .gx-st--ok { background: rgba(95, 224, 165, 0.16); color: var(--th-up); }
.gx .gx-st--ok .gx-ico { width: 12px; height: 12px; stroke-width: 3.5; }
.gx .gx-st--todo { box-shadow: inset 0 0 0 1.5px var(--th-ink-faint); }
.gx .gx-st--cur { background: var(--th-gold); color: #2b1b05; font-size: 11px; font-weight: 800; }
.gx .gx-sec-body { padding: 0 18px; }
.gx .gx-sec[data-open="true"] .gx-sec-body { padding: 2px 18px 18px; }
.gx .gx-sec--look .gx-sec-body { padding: 18px 20px 24px; }
.gx .gx-sec-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* The stage and its preview */
.gx .gx-stage-hint { flex: none; padding: 14px 16px 0; font-size: 12.5px; text-align: center; color: var(--th-ink-3); }
.gx .gx-fit { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.gx .gx-fit-box { position: relative; flex: none; overflow: hidden; border-radius: 8px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--th-line-2); }
.gx .gx-fit-box > .gl { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* A graphic with transparent corners (a compact card, the Collector card): the
   stage's dots show through them, and its shadow follows the card's own shape. */
.gx .gx-fit-box[data-transparent] { box-shadow: none; filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.6)); }
.gx .gx-stage-meta { flex: none; display: flex; justify-content: center; gap: 10px; padding: 0 16px 6px; }
.gx .gx-stage-meta .gx-chip { height: 28px; font-size: 12px; }
.gx .gx-omitted { flex: none; min-height: 18px; padding: 0 16px 10px; font-size: 12px; text-align: center; color: var(--th-ink-3); }
.gx .gx-omitted:empty { padding-bottom: 4px; }
/* When saving needs the creator: keep both copies, or download a backup. */
.gx .gx-notices { flex: none; display: grid; gap: 8px; padding: 12px 16px 0; }
.gx .gx-notices:empty { display: none; }
.gx .gx-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--th-down, #ff8f8f); border-radius: 10px; background: var(--th-surface-1); color: var(--th-ink); font-size: 13px; line-height: 1.4; }
.gx .gx-notice > span { flex: 1 1 200px; min-width: 0; }
.gx .gx-share-panel .gx-notices { padding: 0; margin-top: 12px; }
/* Tap-to-edit: lengths inside the graphic are export pixels, so they are
   divided by the preview's scale (--gx-inv) to land as screen pixels. */
.gx .gx-fit-box .gl.is-editing [data-part] { cursor: pointer; }
.gx .gx-fit-box .gl.is-editing [data-part][data-hover] { outline: calc(1.5px * var(--gx-inv, 1)) solid rgba(255, 255, 255, 0.7); outline-offset: calc(3px * var(--gx-inv, 1)); }
.gx .gx-fit-box[data-tool="cookie"] .gl.is-editing [data-part="cookie"],
.gx .gx-fit-box[data-tool="toppings"] .gl.is-editing [data-part="toppings"],
.gx .gx-fit-box[data-tool="beascuit"] .gl.is-editing [data-part="beascuit"],
.gx .gx-fit-box[data-tool="stats"] .gl.is-editing [data-part="stats"],
.gx .gx-fit-box[data-tool="notes"] .gl.is-editing [data-part="notes"],
.gx .gx-fit-box[data-tool="title"] .gl.is-editing [data-part="title"],
.gx .gx-fit-box[data-tool="tiers"][data-tier-index="0"] .gl.is-editing [data-part="tiers"][data-tier="0"],
.gx .gx-fit-box[data-tool="cookies"][data-tier-index="0"] .gl.is-editing [data-part="cookies"][data-tier="0"],
.gx .gx-fit-box[data-tool="tiers"][data-tier-index="1"] .gl.is-editing [data-part="tiers"][data-tier="1"],
.gx .gx-fit-box[data-tool="cookies"][data-tier-index="1"] .gl.is-editing [data-part="cookies"][data-tier="1"],
.gx .gx-fit-box[data-tool="tiers"][data-tier-index="2"] .gl.is-editing [data-part="tiers"][data-tier="2"],
.gx .gx-fit-box[data-tool="cookies"][data-tier-index="2"] .gl.is-editing [data-part="cookies"][data-tier="2"],
.gx .gx-fit-box[data-tool="tiers"][data-tier-index="3"] .gl.is-editing [data-part="tiers"][data-tier="3"],
.gx .gx-fit-box[data-tool="cookies"][data-tier-index="3"] .gl.is-editing [data-part="cookies"][data-tier="3"],
.gx .gx-fit-box[data-tool="tiers"][data-tier-index="4"] .gl.is-editing [data-part="tiers"][data-tier="4"],
.gx .gx-fit-box[data-tool="cookies"][data-tier-index="4"] .gl.is-editing [data-part="cookies"][data-tier="4"],
.gx .gx-fit-box[data-tool="tiers"][data-tier-index="5"] .gl.is-editing [data-part="tiers"][data-tier="5"],
.gx .gx-fit-box[data-tool="cookies"][data-tier-index="5"] .gl.is-editing [data-part="cookies"][data-tier="5"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="0"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="1"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="2"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="3"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="4"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="5"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="6"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="7"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="8"],
.gx .gx-fit-box[data-tool="steps"] .gl.is-editing [data-part="steps"][data-step-index="9"],
.gx .gx-fit-box[data-tool="team"] .gl.is-editing [data-part="team"],
.gx .gx-fit-box[data-tool="treasures"] .gl.is-editing [data-part="treasures"],
.gx .gx-fit-box[data-tool="timings"] .gl.is-editing [data-part="timings"],
.gx .gx-fit-box[data-tool="builds"][data-member="0"] .gl.is-editing [data-part="builds"][data-slot="0"],
.gx .gx-fit-box[data-tool="builds"][data-member="1"] .gl.is-editing [data-part="builds"][data-slot="1"],
.gx .gx-fit-box[data-tool="builds"][data-member="2"] .gl.is-editing [data-part="builds"][data-slot="2"],
.gx .gx-fit-box[data-tool="builds"][data-member="3"] .gl.is-editing [data-part="builds"][data-slot="3"],
.gx .gx-fit-box[data-tool="builds"][data-member="4"] .gl.is-editing [data-part="builds"][data-slot="4"] { outline: calc(2.5px * var(--gx-inv, 1)) solid #f0cd7e; outline-offset: calc(3px * var(--gx-inv, 1)); }
.gx .gx-tip { position: fixed; z-index: 6; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.94); color: #111318; font-size: 11.5px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6); }
.gx .gx-img-missing { visibility: hidden; }

/* Cookie tool */
.gx .gx-cookie-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.gx .gx-cookie-txt { flex: 1; min-width: 0; }
.gx .gx-cookie-txt b { display: block; font-size: 15px; font-weight: 700; color: var(--th-heading); }
.gx .gx-cookie-txt span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--th-ink-3); }

/* Toppings tool */
/* Five slots, the plus and the tart share the row, so it fits any column width. */
.gx .gx-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto minmax(0, 1fr); align-items: center; gap: 6px; max-width: 400px; margin-top: 14px; }
.gx .gx-slot { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 52px; height: auto; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; background: var(--th-surface-3); color: var(--th-ink-3); }
.gx .gx-slot img { width: 70%; height: 80%; object-fit: contain; }
.gx .gx-slot.is-empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--th-line-3); }
.gx .gx-slot.is-on { box-shadow: 0 0 0 2.5px var(--th-gold); }
.gx .gx-slot.is-fill { box-shadow: 0 0 0 2px var(--th-gold-line); }
.gx .gx-slot-n { position: absolute; left: -4px; top: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--th-surface-sunk); color: var(--th-ink-3); font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 1px var(--th-line-2); }
.gx .gx-slot.is-on .gx-slot-n { background: var(--th-gold); color: #2b1b05; }
.gx .gx-slot-plus { color: var(--th-ink-faint); font-weight: 700; font-size: 18px; }
.gx .gx-pick-label { margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--th-ink-2); }
.gx .gx-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.gx .gx-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px 6px; border: 0; border-radius: 14px; background: transparent; color: var(--th-ink-2); font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; }
.gx .gx-pick:hover { background: var(--th-btn-bg); }
.gx .gx-pick img { width: 40px; height: 44px; object-fit: contain; }
.gx .gx-pick.is-on { background: var(--th-surface-3); color: var(--th-heading); box-shadow: inset 0 0 0 1.5px var(--th-gold-line); }
.gx .gx-pick-check { position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--th-gold); color: #2b1b05; }
.gx .gx-pick-check .gx-ico { width: 11px; height: 11px; stroke-width: 3.5; }

/* Beascuit tool */
.gx .gx-beas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.gx .gx-bea { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 0; border-radius: 14px; background: var(--th-btn-bg); color: var(--th-ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.gx .gx-bea img { width: 56px; height: 56px; object-fit: contain; }
.gx .gx-bea.is-on { background: var(--th-surface-3); color: var(--th-heading); box-shadow: inset 0 0 0 1.5px var(--th-gold-line); }
.gx .gx-effects { display: grid; gap: 8px; margin-top: 8px; }
.gx .gx-effect { display: flex; align-items: center; gap: 10px; }
.gx .gx-effect .gx-select { flex: 1; }
.gx .gx-effect-n { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--th-surface-3); font-size: 11px; font-weight: 800; color: var(--th-ink-2); }
.gx .gx-effect-lock { font-size: 11px; color: var(--th-ink-3); white-space: nowrap; }
.gx .gx-fill-row { display: flex; gap: 8px; margin-top: 10px; }
.gx .gx-fill-row .gx-select { flex: 1; }

/* Stats tool */
.gx .gx-stat { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--th-line); }
.gx .gx-stat:first-of-type { border-top: 0; padding-top: 0; }
.gx .gx-rank { width: 26px; height: 26px; margin-top: 7px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fff2c8 0%, #f0cd7e 45%, #c99b46 100%); color: #2b1b05; font-size: 13px; font-weight: 800; }
.gx .gx-stat-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.gx .gx-stat-note { grid-column: 1 / -1; }
.gx .gx-pct { position: relative; display: block; }
.gx .gx-pct .gx-input { padding-right: 26px; }
.gx .gx-pct span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--th-ink-3); font-size: 13px; }
.gx .gx-stat-moves { display: flex; flex-direction: column; gap: 6px; }
/* The game's Bonus Effect Tips: read-only rows, each a share of players. */
.gx .gx-tips { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.gx .gx-tip { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px 6px 8px; border-radius: 12px; background: var(--th-surface-2); }
.gx .gx-tip .gx-rank { margin-top: 0; }
.gx .gx-tip b { flex: 1; min-width: 0; font-size: 14px; }
.gx .gx-tip > span:last-child { flex: none; font-size: 13px; color: var(--th-ink-2); }

/* Look tool */
.gx .gx-looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 12px; }
.gx .gx-lookopt { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--th-ink-3); font-size: 12.5px; font-weight: 600; }
.gx .gx-lookopt.is-on { color: var(--th-heading); }
.gx .gx-lt { position: relative; display: block; width: 78px; height: 86px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--th-line-2); }
.gx .gx-lookopt.is-on .gx-lt { box-shadow: 0 0 0 2.5px var(--th-gold), 0 0 0 5px var(--th-gold-faint); }
.gx .gx-lt i { position: absolute; display: block; }
.gx .gx-lt-face { position: absolute; object-fit: cover; }
.gx .gx-lt--splash { background: linear-gradient(180deg, #2c5a43 0%, #0b241b 55%, #050907 70%); }
.gx .gx-lt--splash .gx-lt-face { left: 10px; top: 4px; width: 58px; height: 46px; border-radius: 6px; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.gx .gx-lt--splash .gx-lt-a { left: 6px; top: 50px; width: 46px; height: 8px; border-radius: 3px; background: #ffffff; }
.gx .gx-lt--splash .gx-lt-b { left: 6px; right: 6px; top: 64px; height: 14px; border-radius: 4px; background: rgba(124, 201, 164, 0.35); }
.gx .gx-lt--candy { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 6px, rgba(255, 255, 255, 0) 6px 12px), linear-gradient(162deg, #98f2c6, #3cc98f 42%, #138a60); }
.gx .gx-lt--candy .gx-lt-a { left: 5px; right: 5px; top: 5px; height: 12px; border-radius: 4px; background: #0b3d2b; box-shadow: 0 0 0 1.5px #ffffff; }
.gx .gx-lt--candy .gx-lt-face { left: 5px; top: 22px; width: 33px; height: 30px; border-radius: 5px; box-shadow: 0 0 0 1.5px #ffffff; background: #b9f6d8; }
.gx .gx-lt--candy .gx-lt-b { left: 41px; top: 22px; width: 32px; height: 30px; border-radius: 5px; background: #0b3d2b; box-shadow: 0 0 0 1.5px #ffffff; }
.gx .gx-lt--candy .gx-lt-c { left: 5px; right: 5px; top: 56px; height: 24px; border-radius: 5px; background: #0b3d2b; box-shadow: 0 0 0 1.5px #ffffff; }
.gx .gx-lt--gilded { background: #0a0b0f; }
.gx .gx-lt--gilded .gx-lt-a { inset: 4px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(240, 205, 126, 0.7); }
.gx .gx-lt--gilded .gx-lt-face { left: 24px; top: 14px; width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px #f0cd7e; background: #1c3a2c; }
.gx .gx-lt--gilded .gx-lt-b { left: 10px; right: 10px; top: 52px; height: 4px; border-radius: 2px; background: #f8f9fb; }
.gx .gx-lt--gilded .gx-lt-c { left: 10px; top: 62px; width: 58px; height: 16px; border-radius: 4px; background: linear-gradient(90deg, #14161d 0 48%, transparent 48% 52%, #fbefd6 52%); box-shadow: inset 0 0 0 1px rgba(240, 205, 126, 0.35); }
.gx .gx-lt--card { padding: 3px; background: linear-gradient(140deg, #b9fff4, #4fdcc9 25%, #f0cd7e 50%, #4fdcc9 75%, #b9fff4); }
.gx .gx-lt--card .gx-lt-a { inset: 3px; border-radius: 9px; background: #123b35; }
.gx .gx-lt--card .gx-lt-b { left: 7px; right: 7px; top: 7px; height: 9px; border-radius: 3px; background: #e9fffb; z-index: 1; }
.gx .gx-lt--card .gx-lt-face { left: 7px; top: 19px; width: 64px; height: 34px; border-radius: 3px; z-index: 1; }
.gx .gx-lt--card .gx-lt-c { left: 7px; right: 7px; top: 58px; height: 20px; border-radius: 3px; background: #e2f7f2; z-index: 1; }
.gx .gx-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.gx .gx-swatch { width: 32px; height: 32px; padding: 0; flex: none; border: 0; border-radius: 50%; background: linear-gradient(135deg, rgb(var(--gx-sw)), rgba(var(--gx-sw), 0.75)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.gx .gx-swatch.is-on { box-shadow: 0 0 0 2.5px var(--th-ground), 0 0 0 4.5px var(--th-ink); }
/* Colour: the game's elements, each wearing its icon, and a custom colour from
   the colour wheel (the native picker, laid invisibly over the swatch). */
.gx .gx-swatch--el { display: grid; place-items: center; }
.gx .gx-swatch--el img { width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); pointer-events: none; }
.gx .gx-swatch--custom { position: relative; display: grid; place-items: center; cursor: pointer; background: conic-gradient(#ff5a5a, #ffd24a, #63e08a, #4ac8ff, #8f6bff, #ff5ad2, #ff5a5a); }
.gx .gx-swatch--custom::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--th-surface-1); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); pointer-events: none; }
.gx .gx-swatch--custom.is-set::after { background: rgb(var(--gx-sw)); }
.gx .gx-swatch--custom input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 50%; opacity: 0; cursor: pointer; }
.gx .gx-swatch--custom:focus-within { outline: 3px solid var(--th-gold); outline-offset: 2px; }
/* Cookie art: size and position sliders. */
.gx .gx-art-ctl { display: grid; gap: 8px; margin-top: 8px; }
.gx .gx-range { display: grid; grid-template-columns: 92px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--th-ink-2); }
.gx .gx-range input[type="range"] { width: 100%; margin: 0; accent-color: var(--th-gold); }
.gx .gx-range output { text-align: right; font-variant-numeric: tabular-nums; color: var(--th-ink-3); }
.gx .gx-toggles { margin-top: 6px; }
.gx .gx-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; font-weight: 600; color: var(--th-ink-2); cursor: pointer; }
.gx .gx-toggle-row.is-static { cursor: default; }
.gx .gx-toggle-row em { font-style: normal; font-weight: 500; color: var(--th-ink-3); }
.gx .gx-switch { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 28px; flex: none; margin: 0; border-radius: 999px; background: var(--th-surface-3); cursor: pointer; transition: background-color 0.15s ease; }
.gx .gx-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--th-ink-3); transition: left 0.15s ease; }
.gx .gx-switch:checked { background: var(--th-sel-bg); }
.gx .gx-switch:checked::after { left: 21px; background: var(--th-sel-ink); }
.gx .gx-switch:disabled { opacity: 0.4; cursor: not-allowed; }
.gx .gx-switch:focus-visible { outline: 2px solid var(--th-focus-color); outline-offset: 2px; }

/* Share ----------------------------------------------------------------------------------- */
.gx .gx-share { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; }
.gx .gx-share-scrim { position: absolute; inset: 0; background: rgba(4, 5, 8, 0.62); }
.gx .gx-share-panel { position: relative; width: min(480px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; border-radius: 24px; border: 1px solid var(--th-line-2); background: var(--th-surface-1); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); outline: none; }
.gx .gx-grab { display: none; width: 40px; height: 5px; margin: 8px auto 6px; border-radius: 3px; background: var(--th-line-3); }
.gx .gx-share-head { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; }
.gx .gx-share-head h2 { font-size: 22px; }
.gx .gx-szs { display: flex; gap: 8px; margin-top: 12px; }
.gx .gx-sz { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 9px; border: 0; border-radius: 14px; background: var(--th-btn-bg); color: var(--th-ink-2); font-size: 12.5px; font-weight: 700; }
.gx .gx-sz small { font-size: 10.5px; font-weight: 500; color: var(--th-ink-3); }
.gx .gx-sz-box { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; }
.gx .gx-sz-shape { display: block; border-radius: 5px; border: 2px solid currentColor; opacity: 0.8; }
.gx .gx-sz.is-on { background: var(--th-sel-bg); color: var(--th-sel-ink); }
.gx .gx-sz.is-on small { color: inherit; opacity: 0.75; }
.gx .gx-share-preview { display: flex; justify-content: center; margin-top: 14px; }
.gx .gx-share-preview:empty { display: none; }
.gx .gx-share-fit { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8); }
.gx .gx-share-fit > .gl { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.gx .gx-share-fit[data-transparent] { box-shadow: none; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55)); }
.gx .gx-share-panel > .th-btn--gold { margin-top: 16px; }
.gx .gx-share-row { display: flex; gap: 8px; margin-top: 12px; }
.gx .gx-share-status { min-height: 18px; margin-top: 8px; font-size: 12.5px; text-align: center; color: var(--th-ink-2); }
.gx .gx-share-status[data-error="true"] { color: var(--th-down, #ff8f8f); }
.gx .gx-or { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-ink-3); }
.gx .gx-or::before, .gx .gx-or::after { content: ""; flex: 1; height: 1px; background: var(--th-line-2); }
.gx .gx-panel { margin-top: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--th-line); background: var(--th-surface-sunk); }
.gx .gx-post { height: 44px; margin-top: 12px; }
.gx .gx-save-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; font-size: 12.5px; color: var(--th-ink-3); }

/* Team card tools ------------------------------------------------------------------------ */
.gx .gx-members { display: flex; flex-direction: column; }
.gx .gx-member { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--th-line); }
.gx .gx-member:first-child { border-top: 0; padding-top: 4px; }
.gx .gx-member-txt { flex: 1; min-width: 0; }
.gx .gx-member-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 700; line-height: 1.2; color: var(--th-heading); }
.gx .gx-member-txt span { display: block; margin-top: 2px; font-size: 12px; color: var(--th-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-member-acts { display: flex; flex: none; gap: 2px; }
.gx .gx-member-acts .gx-ibtn--sm { width: 30px; height: 30px; }
.gx .gx-member-pick { display: flex; gap: 10px; margin: 4px 0 12px; padding: 4px 2px 6px; overflow-x: auto; scrollbar-width: none; }
.gx .gx-member-pick::-webkit-scrollbar { display: none; }
.gx .gx-member-tab { flex: none; padding: 4px; border: 0; border-radius: 14px; background: none; }
.gx .gx-member-tab:not(.is-on) .gx-face { opacity: 0.7; }
.gx .gx-member-tab:hover .gx-face { opacity: 1; }
.gx .gx-member-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.gx .gx-member-head b { font: 700 16px/1.2 "CookieRun KR", "Outfit", sans-serif; color: var(--th-heading); }
.gx .gx-member-head .gx-chip { height: 26px; padding: 0 10px; font-size: 12px; }
.gx .gx-sub { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--th-line); }
.gx .gx-sub-title { margin-bottom: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-ink-3); }
.gx .gx-sub .gx-sec-tools { margin-top: 0; }
.gx .gx-tres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.gx .gx-tre { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px 6px; border: 0; border-radius: 14px; background: transparent; color: var(--th-ink-2); font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; }
.gx .gx-tre:hover { background: var(--th-btn-bg); }
.gx .gx-tre img { width: 44px; height: 48px; object-fit: contain; }
.gx .gx-tre.is-on { background: var(--th-surface-3); color: var(--th-heading); box-shadow: inset 0 0 0 1.5px var(--th-gold-line); }
.gx .gx-tre[disabled] { opacity: 0.4; cursor: not-allowed; }
.gx .gx-tres .gx-empty { grid-column: 1 / -1; }
.gx .gx-step { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.gx .gx-step .gx-input { min-width: 0; }
.gx .gx-step .gx-step-label { flex: none; width: 92px; font-weight: 700; }

/* Choose the team */
.gx .gx-picker--team .gx-scroll--picker .gx-narrow { padding-bottom: 280px; }
.gx .gx-picker--team .gx-pf { position: relative; }
.gx .gx-picker--team .gx-face-check { display: none; }
.gx .gx-pf-order { position: absolute; left: calc(50% - 38px); top: 52px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--th-gold); color: #2b1b05; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px var(--th-ground); }
.gx .gx-tray { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 340px; }
.gx .gx-tray-slot { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; max-width: 56px; padding: 0; border: 0; border-radius: 14px; background: none; }
.gx .gx-tray-slot.is-empty { box-shadow: inset 0 0 0 1.5px var(--th-line-3); }
.gx .gx-tray-slot .gx-face { --gx-face: 100% !important; width: 100%; height: 100%; }
.gx .gx-tray-x { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--th-surface-sunk); color: var(--th-ink-2); box-shadow: 0 0 0 1px var(--th-line-2); }
.gx .gx-tray-x .gx-ico { width: 11px; height: 11px; stroke-width: 3; }
.gx .gx-teamlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gx .gx-teamrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--th-line); background: var(--th-surface-1); color: var(--th-ink); text-align: left; }
.gx .gx-teamrow:hover { background: var(--th-surface-2); }
.gx .gx-teamrow-faces { display: flex; flex: none; padding-left: 6px; }
.gx .gx-teamrow-faces .gx-face { margin-left: -6px; }
.gx .gx-teamrow-faces .gx-face-el { display: none; }
.gx .gx-teamrow-txt { flex: 1; min-width: 0; }
.gx .gx-teamrow-txt b { display: block; font-size: 14px; font-weight: 700; color: var(--th-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-teamrow-txt span { display: block; margin-top: 2px; font-size: 12px; color: var(--th-ink-3); }
.gx .gx-teamrow > .gx-ico { color: var(--th-ink-3); }

/* Tier list tools ------------------------------------------------------------------------ */
.gx .gx-tierchip { flex: none; display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px; background: linear-gradient(180deg, rgb(var(--t1)), rgb(var(--t2))); color: #fff; font: 700 18px/1 "CookieRun KR", "Outfit", sans-serif; -webkit-text-stroke: 3px rgba(40, 10, 20, 0.45); paint-order: stroke fill; }
.gx .gx-tierlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gx .gx-tierrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--th-line); background: var(--th-surface-1); color: var(--th-ink); text-align: left; }
.gx button.gx-tierrow:hover { background: var(--th-surface-2); }
.gx .gx-tierrow.is-open { align-items: flex-start; border-color: var(--th-gold-line); }
.gx .gx-tierrow-txt { flex: 1; min-width: 0; }
.gx .gx-tierrow-txt b { display: block; font-size: 14px; font-weight: 700; color: var(--th-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx .gx-tierrow-txt span { display: block; margin-top: 2px; font-size: 12px; color: var(--th-ink-3); }
.gx .gx-tierrow > .gx-ico { flex: none; color: var(--th-ink-3); }
.gx .gx-tier-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gx .gx-tier-inputs { display: flex; gap: 8px; }
.gx .gx-tier-inputs .gx-input { min-width: 0; }
.gx .gx-tier-inputs .gx-tier-label { flex: none; width: 66px; font-weight: 700; text-align: center; }
.gx .gx-swatches.gx-swatches--sm { gap: 6px; margin-top: 0; }
.gx .gx-swatch.gx-swatch--sm { width: 26px; height: 26px; }
.gx .gx-tier-acts { display: flex; align-items: center; gap: 6px; }
.gx .gx-tier-acts .gx-meta { margin-right: auto; white-space: nowrap; }
.gx .gx-tiertabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gx .gx-tiertab { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px 0 5px; border: 0; border-radius: 999px; background: var(--th-btn-bg); color: var(--th-ink-2); font-size: 12.5px; font-weight: 700; }
.gx .gx-tiertab:hover { background: var(--th-btn-hover); }
.gx .gx-tiertab b { display: grid; place-items: center; min-width: 28px; height: 24px; padding: 0 5px; border-radius: 999px; background: linear-gradient(180deg, rgb(var(--t1)), rgb(var(--t2))); color: #fff; font: 700 13px/1 "CookieRun KR", "Outfit", sans-serif; -webkit-text-stroke: 2px rgba(40, 10, 20, 0.4); paint-order: stroke fill; }
.gx .gx-tiertab.is-on { background: var(--th-sel-bg); color: var(--th-sel-ink); }
.gx .gx-placed-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gx .gx-placed { padding: 4px; border: 0; border-radius: 12px; background: none; }
.gx .gx-placed:hover { background: var(--th-btn-bg); }
.gx .gx-placed-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--th-gold-line); background: var(--th-surface-2); }
.gx .gx-placed-acts b { margin-right: auto; font-size: 13.5px; color: var(--th-heading); }
.gx .gx-placed-acts .gx-chip { height: 30px; }
.gx .gx-pgrid--tier { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.gx .gx-pgrid--tier .gx-pf { position: relative; }
.gx .gx-pf-tier { position: absolute; left: calc(50% - 36px); top: 0; display: grid; place-items: center; min-width: 24px; height: 20px; padding: 0 4px; border-radius: 999px; background: linear-gradient(180deg, rgb(var(--t1)), rgb(var(--t2))); color: #fff; font: 700 11px/1 "CookieRun KR", "Outfit", sans-serif; -webkit-text-stroke: 2px rgba(40, 10, 20, 0.4); paint-order: stroke fill; box-shadow: 0 0 0 2px var(--th-ground); }
/* A tier list's treasures in the tools, its notes on items, and dragging. */
.gx .gx-tface { position: relative; display: block; flex: none; }
.gx .gx-tface img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); }
.gx .gx-tface.is-on::after { content: ""; position: absolute; inset: -4px; border-radius: 30%; box-shadow: 0 0 0 2.5px var(--th-gold); pointer-events: none; }
.gx .gx-placed { position: relative; }
.gx .gx-placed.has-note::after { content: ""; position: absolute; left: 1px; top: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--th-gold); box-shadow: 0 0 0 2px var(--th-surface-1); pointer-events: none; }
.gx .gx-item-note { flex-basis: 100%; margin-top: 4px; }
.gx .gx-item-note .gx-label { margin-top: 0; }
.gx .gx-seg-gap { margin-top: 6px; }
.gx .gx-start-row--treasures img { object-fit: contain; background: none; border-radius: 0; }
.gx .gx-fit-box .gl.is-editing [data-item], .gx .gx-placed[data-id], .gx #gxTierGrid .gx-pf { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gx .gx-fit-box .gl.is-editing [data-item] { cursor: grab; }
.gx .gx-fit-box img, .gx .gx-placed img, .gx #gxTierGrid img { -webkit-user-drag: none; }
.th.gx.gx-dragging, .th.gx.gx-dragging * { cursor: grabbing !important; }
.gx .is-drag-source { opacity: 0.35; }
.gx .gx-drag-ghost { position: fixed; left: 0; top: 0; z-index: 20; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--th-surface-2); box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.7), 0 0 0 3px var(--th-gold); pointer-events: none; will-change: transform; }
.gx .gx-drag-ghost img { width: 100%; height: 100%; object-fit: cover; }
.gx .gx-drag-ghost img.is-treasure { padding: 4px; object-fit: contain; }
.gx .gx-drop-bar { position: fixed; z-index: 19; width: 5px; border-radius: 3px; background: var(--th-gold); box-shadow: 0 0 0 2px rgba(10, 11, 15, 0.55), 0 0 14px rgba(240, 205, 126, 0.8); pointer-events: none; }
.gx .gx-drop-bar[hidden] { display: none; }
.gx .gx-tiertab.is-drop { box-shadow: 0 0 0 2.5px var(--th-gold); }
/* A full list is far taller than the stage: it fits the width and scrolls. */
.gx .gx-fit.gx-fit--scroll { display: block; overflow-y: auto; overscroll-behavior: contain; padding: 28px 0; }
.gx .gx-fit.gx-fit--scroll .gx-fit-box { margin: 0 auto; }
.gx .gx-chip-dot--sky { background: linear-gradient(135deg, #ffd3e6 0%, #c9a8ff 45%, #3b4fd6 100%); }

/* Start a tier list */
.gx .gx-starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 8px; }
.gx .gx-start { display: flex; flex-direction: column; overflow: hidden; padding: 0; border-radius: 18px; border: 1px solid var(--th-line); background: var(--th-surface-1); color: var(--th-ink); text-align: left; }
.gx .gx-start:hover:not([disabled]) { border-color: var(--th-gold-line); background: var(--th-surface-2); }
.gx .gx-start[disabled] { cursor: progress; }
.gx .gx-start-art { position: relative; display: block; height: 120px; background: linear-gradient(170deg, #ffd3e6 0%, #c9a8ff 38%, #6f8cff 72%, #3b4fd6 100%); }
.gx .gx-start-row { position: absolute; left: 14px; right: 14px; height: 26px; display: flex; align-items: center; gap: 5px; }
.gx .gx-start-row i { display: grid; place-items: center; width: 32px; height: 24px; border-radius: 7px; background: linear-gradient(180deg, rgb(var(--t1)), rgb(var(--t2))); color: #fff; font: 700 11px/1 "CookieRun KR", "Outfit", sans-serif; font-style: normal; }
.gx .gx-start-row img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; background: rgba(255, 255, 255, 0.5); }
.gx .gx-start-row em { flex: 1; height: 20px; border-radius: 7px; background: rgba(255, 255, 255, 0.55); }
.gx .gx-start-txt { display: block; padding: 12px 14px 14px; }
.gx .gx-start-txt b { display: block; font: 700 16px/1.15 "CookieRun KR", "Outfit", sans-serif; color: var(--th-heading); }
.gx .gx-start-txt > span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--th-ink-3); }

/* Rotation tools ------------------------------------------------------------------------- */
.gx .gx-rstep { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--th-line); }
.gx .gx-rstep:first-of-type { border-top: 0; padding-top: 0; }
.gx .gx-rstep-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* The faces sit beside the time when the column has room for both, under it when it does not. */
.gx .gx-rstep-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gx .gx-rstep-top .gx-rstep-time { flex: none; width: 92px; font-weight: 700; }
.gx .gx-rstep-team { display: flex; flex-wrap: wrap; gap: 4px; }
.gx .gx-rstep-who { padding: 3px; border: 0; border-radius: 12px; background: none; }
.gx .gx-rstep-who:not(.is-on) .gx-face { opacity: 0.45; filter: grayscale(0.6); }
.gx .gx-rstep-who.is-on { box-shadow: inset 0 0 0 2px var(--th-gold-line); }
.gx .gx-rstep-who:hover .gx-face { opacity: 1; filter: none; }
/* A step's words take two lines to start and grow with what is typed, where the browser can. */
.gx .gx-rstep-text { min-height: 64px; max-height: 220px; field-sizing: content; }

/* Phones and narrow windows ----------------------------------------------------------------------- */
@container gx (max-width: 1180px) {
  .gx .gx-editor { grid-template-columns: 300px minmax(0, 1fr) 272px; }
  .gx .gx-editor > .gx-bar .th-btn[data-action="preview"] { padding: 0 12px; }
}
@container gx (max-width: 900px) {
  .gx .gx-only-desk { display: none; }
  .gx .gx-only-phone { display: inline-flex; }
  .gx .gx-editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto auto; grid-template-areas: "bar" "stage" "sheet" "toolbar"; }
  .gx .gx-editor > .gx-bar { height: 56px; padding: 0 8px 0 4px; gap: 4px; }
  .gx .gx-bar--editor .gx-bar-ttl { flex: 1 1 auto; }
  .gx .gx-share-btn { height: 34px; padding: 0 12px; font-size: 13px; }
  .gx .gx-fit.gx-fit--scroll { padding: 12px 0; }
  .gx .gx-left, .gx .gx-right { grid-area: sheet; max-height: 47cqh; border: 0; border-top: 1px solid var(--th-line-2); border-radius: 22px 22px 0 0; background: var(--th-surface-1); box-shadow: 0 -24px 48px -16px rgba(0, 0, 0, 0.6); overscroll-behavior: contain; }
  .gx .gx-editor[data-tool="look"] .gx-left, .gx .gx-editor:not([data-tool="look"]) .gx-right, .gx .gx-editor[data-tool=""] .gx-left { display: none; }
  .gx .gx-left-head { display: none; }
  .gx .gx-left .gx-sec { border: 0; }
  .gx .gx-left .gx-sec:not([data-open="true"]) { display: none; }
  .gx .gx-sec[data-open="true"] { background: none; }
  .gx .gx-sec-head { position: sticky; top: 0; z-index: 1; padding: 14px 16px 8px; background: var(--th-surface-1); cursor: default; }
  .gx .gx-sec-head .gx-st { display: none; }
  .gx .gx-sec-head b { font: 700 19px/1.2 "CookieRun KR", "Outfit", sans-serif; }
  .gx .gx-sec[data-open="true"] .gx-sec-body, .gx .gx-sec--look .gx-sec-body { padding: 4px 16px 18px; }
  .gx .gx-stage-hint { display: none; }
  .gx .gx-stage-meta { display: none; }
  .gx .gx-omitted { padding: 0 12px 6px; }
  .gx .gx-toolbar { grid-area: toolbar; display: flex; justify-content: space-around; align-items: flex-start; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--th-line); background: var(--th-surface-sunk); }
  .gx .gx-tool { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 60px; padding: 0; border: 0; background: none; color: var(--th-ink-3); font-size: 11px; font-weight: 600; }
  .gx .gx-tool-ic { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; border-radius: 999px; }
  .gx .gx-tool.is-on { color: var(--th-heading); }
  .gx .gx-tool.is-on .gx-tool-ic { background: var(--th-sel-bg); color: var(--th-sel-ink); }
  .gx .gx-tool-done { position: absolute; right: 5px; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--th-up); box-shadow: 0 0 0 2px var(--th-surface-sunk); }
  .gx .gx-looks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .gx .gx-lookopt .gx-lt { width: 100%; max-width: 78px; }
  .gx .gx-share { align-items: flex-end; }
  .gx .gx-share-panel { width: 100%; max-height: 92%; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; border-bottom: 0; }
  .gx .gx-grab { display: block; }
  .gx .gx-share-head { padding-top: 2px; }
  .gx .gx-tip { display: none; }
}
@container gx (max-width: 380px) {
  .gx .gx-tool { width: 52px; font-size: 10.5px; }
  .gx .gx-tool-ic { width: 40px; }
  .gx .gx-pick img { width: 34px; height: 38px; }
  .gx .gx-fmts { gap: 10px; }
  .gx .gx-fmt-art { height: 100px; }
}

/* Light theme: the chrome follows the tokens; the stage keeps a soft ground so
   every Look (several are dark) still sits on something. */
:root[data-theme="light"] .gx .gx-stage { background-image: radial-gradient(rgba(60, 30, 110, 0.12) 1px, transparent 1.2px); }
:root[data-theme="light"] .gx .gx-fit-box { box-shadow: 0 24px 50px -24px rgba(60, 30, 110, 0.55), 0 0 0 1px var(--th-line-2); }
:root[data-theme="light"] .gx .gx-fit-box[data-transparent] { box-shadow: none; filter: drop-shadow(0 18px 24px rgba(60, 30, 110, 0.35)); }
:root[data-theme="light"] .gx .gx-share-scrim { background: rgba(35, 23, 59, 0.45); }
:root[data-theme="light"] .gx .gx-slot-plus { color: var(--th-ink-3); }

/* The page toast sits above the studio toolbar on phones. */
html.gx-locked .gs-status { bottom: 92px; }

/* A build card in the library reader (graphicFigure in graphic-studio.js). */
.gx-figure { position: relative; width: 100%; max-width: 640px; margin: 0 auto; overflow: hidden; border-radius: 10px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8); }
.gx-figure > .gl { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.gx-figure[data-transparent] { box-shadow: none; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)); }
