/* Your look: the dressing room in the world (/world/look) and the same panel on the hub (/hub/look).
   docs/WORLD-V4.md §10.2, design-avatar.md §4. Pink is the one action (Step inside); everything else is quiet.
   Targets: chips 36 px, buttons 44 px, swatches 32 px. No horizontal page scroll; only the tab row scrolls. */

.gcl, .gcl-hub {
  --gcl-bg: var(--sc-canvas, #090b0e); --gcl-raised: var(--gc-raised, #141922); --gcl-ink: var(--sc-ink, #eceef1); --gcl-soft: var(--sc-ink-soft, #96a0ae);
  --gcl-line: var(--gc-line, rgb(236 238 241 / 0.11)); --gcl-line-2: var(--gc-line-2, rgb(236 238 241 / 0.2)); --gcl-pink: var(--gc-neon, #ff4fa3);
  font-family: var(--sc-font-text, system-ui, sans-serif); color: var(--gcl-ink);
}
.gcl *, .gcl-hub * { box-sizing: border-box; }

/* ------------------------------------------------------------ the dressing room -- */
.gcl--world { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto 1fr; background: var(--gcl-bg); }
.gcl-top { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--gcl-line); min-width: 0; }
.gcl-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; white-space: nowrap; }
.gcl-top__t { display: grid; min-width: 0; }
.gcl-top__t h1 { margin: 0; font-size: 1.05rem; font-family: var(--sc-font-display, inherit); }
.gcl-top__t span { font-size: 0.82rem; color: var(--gcl-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcl-top__end { margin-left: auto; display: flex; gap: 0.5rem; }
.gcl-main { display: grid; grid-template-columns: minmax(0, 1fr) 460px; min-height: 0; }
.gcl-stagewrap { position: relative; min-height: 0; display: grid; grid-template-rows: 1fr auto; }
.gcl-stage { position: relative; min-height: 0; overflow: hidden; outline: none; touch-action: none; cursor: grab; }
.gcl-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--gcl-pink); }
.gcl-gl { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.gcl-tools { position: absolute; top: 0.75rem; left: 0.75rem; right: 0.75rem; display: flex; justify-content: space-between; gap: 0.5rem; z-index: 2; pointer-events: none; }
.gcl-tools > * { pointer-events: auto; }
.gcl-seg { display: inline-flex; background: rgb(9 11 14 / 0.72); border: 1px solid var(--gcl-line-2); border-radius: 10px; padding: 3px; backdrop-filter: blur(6px); }
.gcl-seg button { appearance: none; border: 0; background: none; color: var(--gcl-soft); font: inherit; font-size: 0.85rem; padding: 0.45rem 0.7rem; border-radius: 7px; min-height: 36px; cursor: pointer; }
.gcl-seg button.is-on { background: var(--gcl-raised); color: var(--gcl-ink); }
.gcl-more { display: none; position: relative; }
.gcl-more summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: rgb(9 11 14 / 0.72); border: 1px solid var(--gcl-line-2); }
.gcl-more summary::-webkit-details-marker { display: none; }
.gcl-more .gcl-seg { position: absolute; right: 0; top: 48px; flex-direction: column; }
.gcl-hint { position: absolute; bottom: 0.6rem; left: 0; right: 0; text-align: center; margin: 0; font-size: 0.78rem; color: var(--gcl-soft); pointer-events: none; }
.gcl-desc { margin: 0; padding: 0.55rem 1rem 0.7rem; font-size: 0.85rem; color: var(--gcl-soft); border-top: 1px solid var(--gcl-line); }
.gcl.is-flat .gcl-stage { cursor: default; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #1a1622, var(--gcl-bg)); }
.gcl-flat { width: min(46vh, 60%); }
.gcl-sil { width: 100%; height: auto; display: block; }
.gcl-sil > :not(ellipse:last-child) { stroke: rgb(255 255 255 / 0.22); stroke-width: 0.6; } /* dark clothes still read on the dark card */

/* the panel: the tabs, the footer (second in the DOM for the two-key path), then the options */
.gcl-side { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "tabs" "offer" "body" "foot"; border-left: 1px solid var(--gcl-line); min-height: 0; background: var(--gcl-bg); }
.gcl-side > .gcl-tabs { grid-area: tabs; }
.gcl-side > .gcl-offer { grid-area: offer; }
.gcl-side > .gcl-body { grid-area: body; }
.gcl-side > .gcl-foot { grid-area: foot; }
.gcl-tabs { display: flex; gap: 0.15rem; padding: 0.5rem 0.75rem 0; border-bottom: 1px solid var(--gcl-line); overflow-x: auto; scrollbar-width: none; }
.gcl-tabs::-webkit-scrollbar { display: none; }
.gcl-tab { appearance: none; border: 0; background: none; color: var(--gcl-soft); font: inherit; font-weight: 600; font-size: 0.95rem; padding: 0.7rem 0.65rem; min-height: 44px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.gcl-tab.is-on { color: var(--gcl-ink); border-bottom-color: var(--gcl-pink); }
.gcl-tab:focus-visible, .gcl-chip:focus-visible, .gcl-swatch:focus-visible, .gcl-btn:focus-visible, .gcl-preset:focus-visible, .gcl-emblem:focus-visible, .gcl-up:focus-visible { outline: 2px solid var(--gcl-pink); outline-offset: 2px; }
.gcl-body { overflow-y: auto; padding: 0.9rem 1rem 1.2rem; min-height: 0; }
.gcl-panel .gcl-body { overflow: visible; }
.gcl-side .gcl-body { overflow-y: auto; }
.gcl-lede { margin: 0 0 0.8rem; color: var(--gcl-soft); }
.gcl-lock { margin: 0 0 0.8rem; padding: 0.55rem 0.7rem; border: 1px solid var(--gcl-line-2); border-radius: 8px; font-size: 0.88rem; }
.gcl-grp { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.gcl-grp[disabled] { opacity: 0.55; }
.gcl-grp__h { display: flex; justify-content: space-between; width: 100%; padding: 0; margin-bottom: 0.5rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gcl-soft); }
.gcl-grp__v { letter-spacing: 0; text-transform: none; color: var(--gcl-ink); font-size: 0.85rem; }
.gcl-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gcl-chip { appearance: none; font: inherit; font-size: 0.92rem; color: var(--gcl-ink); background: var(--gcl-raised); border: 1px solid var(--gcl-line-2); border-radius: 999px; padding: 0.4rem 0.85rem; min-height: 36px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; }
.gcl-chip.is-on { border-color: var(--gcl-pink); box-shadow: 0 0 0 1px var(--gcl-pink) inset; }
.gcl-tick { font-size: 0.85em; color: var(--gcl-pink); font-weight: 800; }
.gcl-sw { display: grid; grid-template-columns: repeat(auto-fill, 32px); gap: 0.55rem; }
.gcl-swatch { appearance: none; position: relative; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.25); background: var(--c); cursor: pointer; padding: 0; display: grid; place-items: center; }
.gcl-swatch.is-on { outline: 2px solid var(--gcl-ink); outline-offset: 2px; }
.gcl-swatch .gcl-tick { color: #fff; text-shadow: 0 0 2px #000, 0 0 4px #000; }
.gcl-swatch.is-locked { background: linear-gradient(var(--c), var(--c)) center / 55% 55% no-repeat, var(--gcl-raised); cursor: not-allowed; }
.gcl-lockico { position: absolute; right: -6px; bottom: -6px; font-size: 0.7rem; }
.gcl-custom { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--gcl-soft); }
.gcl-custom label { display: inline-flex; align-items: center; gap: 0.5rem; }
.gcl-custom input[type="color"] { width: 44px; height: 32px; border: 1px solid var(--gcl-line-2); border-radius: 6px; background: none; padding: 2px; }
.gcl-hex { width: 6.5rem; font: inherit; font-family: var(--sc-font-mono, monospace); color: var(--gcl-ink); background: var(--gcl-raised); border: 1px solid var(--gcl-line-2); border-radius: 6px; padding: 0.35rem 0.5rem; min-height: 36px; }
.gcl-note { margin: 0.55rem 0 0; font-size: 0.85rem; color: var(--gcl-soft); }
.gcl-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 0.55rem; margin-bottom: 0.9rem; }
.gcl-preset { appearance: none; font: inherit; color: var(--gcl-ink); background: var(--gcl-raised); border: 1px solid var(--gcl-line-2); border-radius: 10px; padding: 0.55rem; text-align: left; cursor: pointer; display: grid; gap: 0.35rem; }
.gcl-preset.is-on { border-color: var(--gcl-pink); box-shadow: 0 0 0 1px var(--gcl-pink) inset; }
.gcl-preset__img { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 18px 18px 8px; gap: 2px; border-radius: 6px; overflow: hidden; }
.gcl-preset__img i:nth-child(1) { grid-column: 1; grid-row: 1; } .gcl-preset__img i:nth-child(2) { grid-column: 2; grid-row: 1; }
.gcl-preset__img i:nth-child(3) { grid-column: 1 / 3; grid-row: 2; } .gcl-preset__img i:nth-child(4) { grid-column: 1 / 3; grid-row: 3; }
.gcl-preset__n { font-weight: 650; font-size: 0.9rem; display: inline-flex; gap: 0.3rem; align-items: center; }
.gcl-preset__d { font-size: 0.76rem; color: var(--gcl-soft); }
.gcl-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.gcl-row--end { justify-content: flex-start; flex-direction: row-reverse; }
.gcl-row--src { margin: 0.6rem 0 0.9rem; }
.gcl-btn { appearance: none; font: inherit; font-weight: 650; font-size: 0.95rem; color: var(--gcl-ink); background: var(--gcl-raised); border: 1px solid var(--gcl-line-2); border-radius: 10px; padding: 0.6rem 1rem; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; text-decoration: none; }
.gcl-btn--ghost { background: transparent; }
.gcl-btn--sm { min-height: 36px; padding: 0.35rem 0.75rem; font-size: 0.86rem; }
.gcl-btn--neon { background: var(--gcl-pink); border-color: var(--gcl-pink); color: #1a0510; }
.gcl-btn[disabled], .gcl-btn.is-off { opacity: 0.5; cursor: not-allowed; }
.gcl-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
label.gcl-btn { position: relative; }
.gcl-foot { border-top: 1px solid var(--gcl-line); padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px)); display: grid; gap: 0.55rem; background: var(--gcl-bg); }
.gcl-ai { margin: 0; display: flex; gap: 0.55rem; align-items: center; font-size: 0.8rem; color: var(--gcl-soft); }
.gcl-ai__fig { flex: none; width: 14px; height: 22px; border-radius: 7px 7px 4px 4px; border: 1.5px solid #3de3ff; box-shadow: 0 0 6px #3de3ff; }
.gcl-msg { margin: 0; font-size: 0.85rem; color: var(--gcl-soft); }
.gcl-msg:empty { display: none; }
.gcl-offer { margin: 0.75rem 1rem 0; padding: 0.7rem 0.8rem; border: 1px solid var(--gcl-pink); border-radius: 10px; display: grid; gap: 0.5rem; }
.gcl-offer p { margin: 0; font-weight: 600; }
.gcl-logo { display: grid; grid-template-columns: 132px 1fr; gap: 0.9rem; align-items: center; }
.gcl-logo__prev { width: 132px; height: 132px; border-radius: 10px; border: 1px solid var(--gcl-line-2); display: grid; place-items: center; padding: 14px;
  background: linear-gradient(var(--shirt), var(--shirt)) center / 70% 70% no-repeat, repeating-conic-gradient(#2a2d35 0 25%, #1c1f26 0 50%) 0 0 / 16px 16px; }
.gcl-logo__prev canvas, .gcl-logo__prev img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.gcl-logo__none { font-size: 0.8rem; color: var(--gcl-soft); }
.gcl-logo__h { margin: 0; font-weight: 650; }
.gcl-emblems { display: grid; grid-template-columns: repeat(8, minmax(36px, 1fr)); gap: 0.4rem; }
.gcl-emblem { appearance: none; aspect-ratio: 1; min-height: 36px; border-radius: 8px; border: 1px solid var(--gcl-line-2); background: var(--gcl-raised); padding: 6px; cursor: pointer; display: grid; place-items: center; }
.gcl-emblem.is-on { border-color: var(--gcl-pink); box-shadow: 0 0 0 1px var(--gcl-pink) inset; }
.gcl-emblem canvas { width: 100%; height: auto; display: block; }
.gcl-uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.4rem; margin-bottom: 0.9rem; }
.gcl-up { appearance: none; padding: 0; border: 1px solid var(--gcl-line-2); border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #000; cursor: pointer; }
.gcl-up img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gcl-check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.4rem 0 0.9rem; font-size: 0.92rem; cursor: pointer; }
.gcl-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--gcl-pink); }
.gcl-check--must { padding: 0.6rem 0.7rem; border: 1px solid var(--gcl-line-2); border-radius: 8px; }

/* phones: the stage on the top 40%, the panel as a bottom sheet, the footer always in reach */
@media (max-width: 760px) {
  .gcl-top { padding: 0.5rem 1rem; }
  .gcl-top__t span, .gcl-brand span { display: none; }
  .gcl-top__end .gcl-btn:first-child { display: none; }
  .gcl-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: 40% minmax(0, 1fr); }
  .gcl-desc { display: none; }
  .gcl-stagewrap { grid-template-rows: 1fr; }
  .gcl-side { border-left: 0; border-top: 1px solid var(--gcl-line-2); border-radius: 16px 16px 0 0; margin-top: -12px; position: relative; z-index: 3; box-shadow: 0 -10px 30px rgb(0 0 0 / 0.45); }
  .gcl-lights { display: none; }
  .gcl-more { display: block; }
  .gcl-hint { bottom: 1.1rem; }
  .gcl-logo { grid-template-columns: 104px 1fr; }
  .gcl-logo__prev { width: 104px; height: 104px; }
  .gcl-emblems { grid-template-columns: repeat(4, minmax(36px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .gcl * { transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------ the hub's form -- */
.gcl-hub h1 { margin: 0 0 0.25rem; }
.gcl-hub__grid { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 1rem; }
.gcl-hub__stage { position: sticky; top: 1rem; display: grid; gap: 0.75rem; justify-items: center; padding: 1rem; border: 1px solid var(--gcl-line); border-radius: 12px; background: radial-gradient(circle at 50% 75%, #1a1622, transparent 70%); }
.gcl-hub__fig { width: 100%; max-width: 200px; }
.gcl-hub .gcl-desc { border-top: 0; padding: 0; text-align: center; }
.gcl-hub__panel { border: 1px solid var(--gcl-line); border-radius: 12px; overflow: hidden; min-width: 0; }
.gcl-hub__panel .gcl-body { padding: 1rem; }
.gcl-hub__panel .gcl-foot { position: sticky; bottom: 0; }
@media (max-width: 760px) {
  .gcl-hub__grid { grid-template-columns: minmax(0, 1fr); }
  .gcl-hub__stage { position: static; }
  .gcl-hub__fig { max-width: 150px; }
}
