/* Build your mini Giggy: a console-style character creator. Everything scoped under .g-giggy. */
.g-giggy {
  --gg-side: #22e4f2;
  --gg-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gg-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  container-type: inline-size;
  container-name: gg;
  display: grid;
  gap: 14px;
  color: #f4f7fc;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  text-align: left;
}
.g-giggy[data-side='work'] { --gg-side: #4be38a; }
.g-giggy[data-side='create'] { --gg-side: #ff4f8b; }
.g-giggy button { -webkit-tap-highlight-color: transparent; }
.g-giggy button:where(:not(.btn)) { font: inherit; color: inherit; }
.g-giggy button:focus-visible, .g-giggy a:focus-visible { outline: 3px solid #ffc94d; outline-offset: 3px; }
.g-giggy svg { display: block; }
.g-giggy .gg-cap { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(226, 234, 248, 0.55); }
.g-giggy [hidden] { display: none !important; }

/* ── side pick ── */
.g-giggy .gg-sides { display: grid; gap: 8px; }
.g-giggy .gg-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.g-giggy .gg-side { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 8px 6px; border-radius: 15px; border: 1px solid transparent; background: transparent; font-weight: 800; font-size: 14.5px; color: rgba(226, 234, 248, 0.72); cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s var(--gg-bounce); }
.g-giggy .gg-side svg { width: 19px; height: 19px; flex: none; }
.g-giggy .gg-side:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.g-giggy .gg-side:active { transform: scale(0.96); }
.g-giggy .gg-side[data-side='hire'] { --c: #22e4f2; }
.g-giggy .gg-side[data-side='work'] { --c: #4be38a; }
.g-giggy .gg-side[data-side='create'] { --c: #ff4f8b; }
.g-giggy .gg-side[aria-checked='true'] { color: var(--c); border-color: color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 28%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }

/* ── stage ── */
.g-giggy .gg-stage { position: relative; aspect-ratio: 5 / 4; border-radius: 22px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); background: #0a1228; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 50px -10px color-mix(in srgb, var(--gg-side) 35%, transparent); transition: box-shadow 0.5s; isolation: isolate; }
.g-giggy .gg-stage::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 -60px 60px -30px rgba(4, 6, 15, 0.55); z-index: 3; }
.g-giggy .gg-scenes, .g-giggy .gg-scene { position: absolute; inset: 0; }
.g-giggy .gg-scene { opacity: 0; transform: scale(1.04); transition: opacity 0.55s var(--gg-ease), transform 0.8s var(--gg-ease); }
.g-giggy .gg-scene.on { opacity: 1; transform: none; }
.g-giggy .gg-scene svg { width: 100%; height: 100%; }
.g-giggy .gg-char { position: absolute; left: 50%; bottom: 3%; height: 84%; aspect-ratio: 3 / 4; transform: translateX(-50%); z-index: 2; }
.g-giggy .gg-char-in { width: 100%; height: 100%; transform-origin: 50% 96%; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)); }
.g-giggy .gg-char-in svg { width: 100%; height: 100%; }
.g-giggy .gg-char.gg-pop .gg-char-in { animation: gg-pop 0.42s var(--gg-bounce); }
.g-giggy .gg-burst { position: absolute; left: 50%; top: 31%; width: 62%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(0.4); border: 3px solid var(--gg-side); opacity: 0; pointer-events: none; }
.g-giggy .gg-char.gg-pop .gg-burst { animation: gg-burst 0.55s var(--gg-ease); }
.g-giggy.is-shuffling .gg-char-in { animation: gg-flick 0.12s steps(2) infinite; }
@keyframes gg-pop { 0% { transform: scale(1); } 30% { transform: scale(1.08, 0.93); } 60% { transform: scale(0.97, 1.05); } 100% { transform: scale(1); } }
@keyframes gg-burst { 0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.45); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
@keyframes gg-flick { 0% { transform: translateY(0) rotate(-1.5deg); } 100% { transform: translateY(-3px) rotate(1.5deg); } }
.g-giggy .gg-badge, .g-giggy .gg-num { position: absolute; top: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.2px; background: rgba(5, 8, 18, 0.66); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.g-giggy .gg-badge { left: 12px; color: var(--gg-side); border-color: color-mix(in srgb, var(--gg-side) 50%, transparent); }
.g-giggy .gg-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--gg-side); box-shadow: 0 0 10px var(--gg-side); }
.g-giggy .gg-num { right: 12px; color: #ffc94d; border-color: rgba(255, 201, 77, 0.5); }

/* ── undo / surprise ── */
.g-giggy .gg-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.g-giggy .gg-bar svg { width: 18px; height: 18px; }
.g-giggy .gg-undo { gap: 7px; }
.g-giggy .gg-undo:disabled { opacity: 0.4; cursor: default; transform: none; }
.g-giggy .gg-shuffle { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 800; font-size: 14.5px; color: #fff; background: linear-gradient(135deg, #ff4f8b, #ff9a3d); box-shadow: 0 10px 26px rgba(255, 79, 139, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.15); transition: transform 0.2s var(--gg-bounce), box-shadow 0.2s; }
.g-giggy .gg-shuffle:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(255, 79, 139, 0.5); }
.g-giggy .gg-shuffle:active { transform: scale(0.96); }
.g-giggy .gg-shuffle:disabled { cursor: default; }
.g-giggy.is-shuffling .gg-shuffle svg { animation: gg-spin 0.5s linear infinite; }
@keyframes gg-spin { to { transform: rotate(360deg); } }

/* ── editor ── */
.g-giggy .gg-edit { padding: 12px; border-radius: 22px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: 12px; }
.g-giggy .gg-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.g-giggy .gg-tab { padding: 9px 4px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.03); font-weight: 750; font-size: 13.5px; color: rgba(226, 234, 248, 0.72); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-giggy .gg-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.g-giggy .gg-tab[aria-selected='true'] { color: #22e4f2; background: rgba(34, 228, 242, 0.13); border-color: rgba(34, 228, 242, 0.55); }
.g-giggy .gg-panel { min-height: 96px; display: grid; gap: 12px; align-content: start; }
.g-giggy .gg-panel.gg-in { animation: gg-in 0.3s var(--gg-ease); }
@keyframes gg-in { from { opacity: 0; transform: translateY(6px); } }
.g-giggy .gg-grid { display: grid; gap: 10px; }
.g-giggy .gg-sw { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.g-giggy .gg-tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.g-giggy .gg-swatch { position: relative; width: 100%; aspect-ratio: 1; min-height: 44px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.16); background: var(--c); cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.25); transition: transform 0.22s var(--gg-bounce), box-shadow 0.2s; }
.g-giggy .gg-swatch:hover { transform: scale(1.08); }
.g-giggy .gg-swatch:active { transform: scale(0.92); }
.g-giggy .gg-swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px #050812, 0 0 0 5.5px #22e4f2, 0 0 18px rgba(34, 228, 242, 0.55), inset 0 -4px 0 rgba(0, 0, 0, 0.2); transform: scale(1.04); }
.g-giggy .gg-swatch[aria-pressed='true']::after { content: '✓'; position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: #22e4f2; color: #03141c; font-size: 11px; font-weight: 900; line-height: 18px; text-align: center; animation: gg-check 0.3s var(--gg-bounce); }
@keyframes gg-check { from { transform: scale(0); } }
.g-giggy .gg-tile { display: grid; gap: 4px; justify-items: center; padding: 7px 6px 9px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); cursor: pointer; transition: transform 0.22s var(--gg-bounce), background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.g-giggy .gg-tile:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.g-giggy .gg-tile:active { transform: scale(0.95); }
.g-giggy .gg-thumb { width: 100%; aspect-ratio: 1.08; border-radius: 11px; background: radial-gradient(circle at 50% 40%, rgba(140, 124, 255, 0.28), rgba(10, 18, 40, 0.6) 70%); overflow: hidden; }
.g-giggy .gg-thumb svg { width: 100%; height: 100%; }
.g-giggy .gg-tl { font-size: 12.5px; font-weight: 750; color: rgba(226, 234, 248, 0.82); text-align: center; line-height: 1.2; }
.g-giggy .gg-tile[aria-pressed='true'] { border-color: #22e4f2; background: rgba(34, 228, 242, 0.12); box-shadow: 0 0 0 1px #22e4f2 inset, 0 0 22px rgba(34, 228, 242, 0.25); }
.g-giggy .gg-tile[aria-pressed='true'] .gg-tl { color: #22e4f2; }
.g-giggy .gg-sub { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
.g-giggy .gg-note { margin: 0; font-size: 13px; color: rgba(226, 234, 248, 0.6); }
.g-giggy .gg-link { border: 0; background: none; padding: 0; color: #22e4f2; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ── arcade outfits: locked, new, first wear ── */
.g-giggy .gg-tile { position: relative; }
.g-giggy .gg-tile.is-arcade .gg-thumb { background: radial-gradient(circle at 50% 40%, rgba(255, 201, 77, 0.3), rgba(10, 18, 40, 0.6) 70%); }
.g-giggy .gg-tile.is-locked { cursor: not-allowed; border-style: dashed; background: rgba(255, 255, 255, 0.02); }
.g-giggy .gg-tile.is-locked:hover { transform: none; background: rgba(255, 255, 255, 0.04); }
.g-giggy .gg-tile.is-locked .gg-thumb { filter: grayscale(1) brightness(0.45); }
.g-giggy .gg-tile.is-locked .gg-tl { color: rgba(226, 234, 248, 0.45); }
.g-giggy .gg-lock { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: rgba(5, 8, 18, 0.82); border: 1px solid rgba(255, 201, 77, 0.45); color: #ffc94d; font-size: 12px; font-weight: 850; white-space: nowrap; }
.g-giggy .gg-lock svg { width: 12px; height: 12px; }
.g-giggy .gg-new { position: absolute; top: -7px; right: -5px; padding: 3px 7px; border-radius: 999px; background: linear-gradient(135deg, #ff4f8b, #ff9a3d); color: #fff; font-size: 10.5px; font-weight: 900; letter-spacing: 0.3px; box-shadow: 0 4px 12px rgba(255, 79, 139, 0.45); animation: gg-newpulse 1.6s ease-in-out infinite; }
@keyframes gg-newpulse { 50% { transform: scale(1.1) rotate(-4deg); } }
.g-giggy .gg-tab { position: relative; }
.g-giggy .gg-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ff4f8b; box-shadow: 0 0 8px #ff4f8b; }
.g-giggy .gg-unote { display: flex; align-items: center; gap: 7px; }
.g-giggy .gg-unote svg { width: 14px; height: 14px; flex: none; color: #ffc94d; }
.g-giggy .gg-unote b { color: #ffc94d; }
.g-giggy .gg-char { cursor: pointer; }
.g-giggy .gg-char.gg-hop .gg-char-in { animation: gg-hop 0.55s var(--gg-ease); }
@keyframes gg-hop { 0% { transform: none; } 25% { transform: scale(1.06, 0.92); } 55% { transform: translateY(-9%) scale(0.96, 1.05); } 80% { transform: translateY(0) scale(1.04, 0.96); } 100% { transform: none; } }
.g-giggy .gg-char.gg-party .gg-char-in { animation: gg-party 1.1s var(--gg-bounce); }
.g-giggy .gg-char.gg-party .gg-burst { border-color: #ffc94d; animation: gg-burst 0.9s var(--gg-ease) 2; }
@keyframes gg-party { 0% { transform: none; } 20% { transform: scale(1.1, 0.9); } 45% { transform: translateY(-12%) rotate(-6deg); } 65% { transform: translateY(-4%) rotate(5deg); } 100% { transform: none; } }

/* ── arcade strip + run ── */
.g-giggy .gg-arc { display: grid; gap: 10px; padding: 12px; border-radius: 22px; background: linear-gradient(135deg, rgba(255, 201, 77, 0.08), rgba(34, 228, 242, 0.06)); border: 1px solid rgba(255, 201, 77, 0.22); }
.g-giggy .gg-arc-row { display: flex; align-items: center; gap: 12px; }
.g-giggy .gg-lv { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-content: center; text-align: center; line-height: 1; background: radial-gradient(circle at 35% 30%, #ffe39a, #ffc94d 55%, #d99a1a); color: #2a1a00; box-shadow: 0 6px 18px rgba(255, 201, 77, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.15); }
.g-giggy .gg-lv b { font-size: 21px; font-weight: 900; }
.g-giggy .gg-lv span { font-size: 9px; font-weight: 900; letter-spacing: 1.5px; margin-top: 1px; }
.g-giggy .gg-arc-txt { min-width: 0; flex: 1; display: grid; gap: 5px; }
.g-giggy .gg-arc-h { margin: 0; font-size: 14.5px; font-weight: 850; }
.g-giggy .gg-arc-h span { font-weight: 700; color: rgba(226, 234, 248, 0.65); }
.g-giggy .gg-xp { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.g-giggy .gg-xp i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffc94d, #ff9a3d); box-shadow: 0 0 10px rgba(255, 201, 77, 0.6); }
.g-giggy .gg-arc-s { margin: 0; font-size: 12.5px; color: rgba(226, 234, 248, 0.62); }
.g-giggy .gg-arc-s b { color: #ffc94d; }
.g-giggy .gg-run { width: 100%; padding: 14px 20px; font-size: 16px; gap: 8px; }
.g-giggy .gg-run svg { width: 20px; height: 20px; }
.g-giggy .gg-arc-run { margin: -2px 0 0; text-align: center; font-size: 12px; color: rgba(226, 234, 248, 0.5); }

/* ── card ── */
.g-giggy .gg-get { width: 100%; padding: 16px 22px; font-size: 16.5px; }
.g-giggy .gg-get svg, .g-giggy .gg-card-actions svg { width: 18px; height: 18px; }
.g-giggy .gg-card { display: grid; gap: 12px; justify-items: center; padding: 14px; border-radius: 22px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); animation: gg-in 0.4s var(--gg-ease); }
.g-giggy .gg-card-img { position: relative; width: min(100%, 380px); aspect-ratio: 1080 / 1350; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #0d1a3c, #04060f); box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.8), 0 0 40px -12px rgba(255, 201, 77, 0.35); }
.g-giggy .gg-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.g-giggy .gg-card-img img:not([src]) { opacity: 0; }
.g-giggy .gg-card-wait { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: rgba(226, 234, 248, 0.7); opacity: 0; pointer-events: none; transition: opacity 0.2s; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%) 0 0 / 200% 100%; }
.g-giggy .gg-card-img.is-loading img { opacity: 0.35; }
.g-giggy .gg-card-img.is-loading .gg-card-wait { opacity: 1; animation: gg-shimmer 1.2s linear infinite; }
@keyframes gg-shimmer { to { background-position: -200% 0; } }
.g-giggy .gg-card-status { margin: 0; text-align: center; font-size: 14px; color: rgba(226, 234, 248, 0.75); max-width: 400px; }
.g-giggy .gg-card-status b { color: #ffc94d; }
.g-giggy .gg-card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g-giggy .gg-dl[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.g-giggy .gg-fine { margin: 0; text-align: center; font-size: 12.5px; color: rgba(226, 234, 248, 0.45); }
.g-giggy .gg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* ── narrow hosts (phones) ── */
@container gg (max-width: 420px) {
  .g-giggy .gg-side { flex-direction: column; gap: 3px; font-size: 13px; min-height: 56px; }
  .g-giggy .gg-tab { font-size: 12.5px; padding: 9px 2px; }
  .g-giggy .gg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .g-giggy .gg-sw { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 9px; }
  .g-giggy .gg-swatch { min-height: 40px; }
  .g-giggy .gg-badge, .g-giggy .gg-num { top: 9px; font-size: 11.5px; padding: 5px 10px; }
  .g-giggy .gg-badge { left: 9px; }
  .g-giggy .gg-num { right: 9px; }
  .g-giggy .gg-shuffle { padding: 10px 15px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-giggy *, .g-giggy *::before, .g-giggy *::after { animation: none !important; transition: none !important; }
}

/* ── try-on preview, level chip, play-now link ── */
.g-giggy .gg-tile.is-locked { cursor: pointer; }
.g-giggy .gg-tile.is-locked:hover { transform: translateY(-2px); }
.g-giggy .gg-char:focus-visible { outline: 3px solid #22e4f2; outline-offset: -3px; border-radius: 18px; }
.g-giggy .gg-char.is-peek .gg-char-in { opacity: 0.82; filter: drop-shadow(0 0 14px rgba(255, 201, 77, 0.75)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)); }
.g-giggy .gg-peek { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 4; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 7px 12px; border-radius: 999px; background: rgba(5, 8, 18, 0.88); border: 1px solid rgba(255, 201, 77, 0.55); color: #e2eaf8; font-size: 12.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: gg-peekin 0.3s var(--gg-bounce); }
.g-giggy .gg-peek svg { width: 13px; height: 13px; flex: none; color: #ffc94d; }
.g-giggy .gg-peek b { color: #ffc94d; }
.g-giggy .gg-peek[hidden] { display: none; }
@keyframes gg-peekin { from { opacity: 0; transform: translate(-50%, 8px); } }
.g-giggy .gg-lvchip { position: absolute; left: 12px; bottom: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 7px; max-width: 46%; padding: 5px 11px 5px 5px; border-radius: 999px; background: rgba(5, 8, 18, 0.72); border: 1px solid rgba(255, 201, 77, 0.4); color: rgba(226, 234, 248, 0.85); font-size: 12px; font-weight: 750; text-decoration: none; backdrop-filter: blur(6px); }
.g-giggy .gg-lvchip b { flex: none; padding: 3px 8px; border-radius: 999px; background: linear-gradient(135deg, #ffc94d, #ff9a3d); color: #1a1205; font-weight: 900; }
.g-giggy .gg-lvchip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-giggy .gg-lvchip:hover { border-color: #ffc94d; }
.g-giggy .gg-lvchip[hidden], .g-giggy.has-peek .gg-lvchip { display: none; }
.g-giggy .gg-play { justify-self: start; max-width: 100%; gap: 6px; margin-top: -4px; }
.g-giggy .gg-play svg { width: 16px; height: 16px; flex: none; }
.g-giggy .gg-play span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container gg (max-width: 420px) {
  .g-giggy .gg-lvchip { left: 9px; bottom: 9px; font-size: 11px; max-width: 58%; }
  .g-giggy .gg-peek { font-size: 11.5px; bottom: 9px; }
}
