:root {
  --cobalt: #2147D9;      /* the garden hose */
  --cobalt-deep: #1736B0;
  --fur: #FFFFFF;
  --ink: #1a1a1a;
  --belly: #FFB3C7;       /* chosen piece */
  --pole: #3BB273;        /* confirmations */
  --tape: #FFE45C;        /* washi tape, marquee */
  --concrete: #EEF1F7;
  --display: 'DynaPuff', 'Trebuchet MS', system-ui, sans-serif;
  --ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--stage-h, 40svh) + 64px); scroll-padding-bottom: 90px; }
body {
  margin: 0;
  background-color: var(--cobalt);
  background-image: radial-gradient(rgba(255, 255, 255, .10) 1.2px, transparent 1.7px);
  background-size: 16px 16px;
  color: var(--ink);
  font: 500 16px/1.45 var(--ui);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; }
a { color: inherit; }

/* ---------- masthead ---------- */
.masthead { padding: 26px var(--gutter) 10px; text-align: center; color: var(--fur); }
.title {
  margin: 0;
  font: 700 clamp(50px, 14vw, 132px)/0.92 var(--display);
  letter-spacing: -0.01em;
}
.title .word { display: inline-block; white-space: nowrap; }
.title .l {
  display: inline-block;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
  transform-origin: 50% 90%;
}
.intro .title .l { animation: letter-drop .8s var(--spring) both; animation-delay: calc(var(--i) * 45ms); }
.title .l:hover { animation: jiggle .5s var(--spring); }
@keyframes letter-drop {
  from { opacity: 0; transform: translateY(-70%) rotate(-10deg) scale(.8); }
  to { opacity: 1; transform: none; }
}
@keyframes jiggle {
  30% { transform: translateY(-14%) rotate(-6deg) scaleY(1.06); }
  60% { transform: translateY(2%) rotate(3deg) scaleY(.96); }
}
.lede { margin: 14px auto 0; max-width: 40ch; text-wrap: balance; font-weight: 700; font-size: 17px; }

.ca-chip {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 7px 8px 7px 14px;
  color: var(--ink); background: var(--fur); border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.ca-chip b { font: 700 16px/1 var(--display); }
.ca-chip code { font: 700 13px/1 ui-monospace, 'SFMono-Regular', Consolas, monospace; color: #555; }
.chip-action { padding: 6px 10px; font-size: 13px; font-weight: 800; background: var(--tape); border: 2px solid var(--ink); border-radius: 999px; }
.ca-chip.copied .chip-action { background: #3BD47A; }
.ca-chip:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.intro .ca-chip { animation: frame-pop .7s var(--spring) .45s both; }

/* ---------- live $george card (X cashtag-card style) ---------- */
.coin {
  max-width: 640px; margin: 0 auto; padding: 12px 14px 14px;
  background: var(--ink); color: var(--fur); text-align: left;
  border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  --trend: #3BD47A;
}
.coin[data-trend="down"] { --trend: #FF5C5C; }
.coin p { margin: 0; }
.coin-main { display: grid; grid-template-columns: 46px minmax(0, 1fr) 64px; gap: 10px; align-items: center; }
.coin-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #333; border: 2px solid var(--fur); }
.coin-top { display: flex; align-items: baseline; gap: 8px; }
.coin-top strong { font: 700 19px/1.1 var(--display); }
.coin-mc { font-size: 13px; font-weight: 800; color: #B8BCC6; }
.coin-line { font-size: 13px; color: #B8BCC6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-price { color: var(--fur); font-weight: 800; }
.coin-change { color: var(--trend); font-weight: 800; }
.coin-spark { width: 100%; height: 40px; color: var(--trend); overflow: visible; }
.coin.offline .coin-spark, .coin:not(.live) .coin-spark { opacity: .25; }
.coin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ca {
  flex: 1 1 140px; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; white-space: nowrap;
  background: #2A2A2A; color: var(--fur); border: 2px solid #444; border-radius: 14px; text-align: left;
}
.ca-tag { padding: 2px 6px; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--tape); border-radius: 6px; }
.ca code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px/1 ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.ca-action { margin-left: auto; font-weight: 800; }
.ca.copied { border-color: var(--pole); }
.ca.copied .ca-action { color: #3BD47A; }
.coin-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; white-space: nowrap;
  font-weight: 800; text-decoration: none; color: var(--ink); background: var(--fur);
  border: 2px solid var(--fur); border-radius: 14px;
}
.coin-btn-main { background: #3BD47A; border-color: #3BD47A; }
.coin-ref { display: flex; justify-content: flex-end; margin-top: 10px; }
.coin-ref-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 13px 0 10px;
  font: 800 12.5px/1 var(--ui); color: #E7E9EA; text-decoration: none;
  background: #2A2A2A; border: 2px solid #444; border-radius: 999px;
}
.coin-ref-btn img { width: 16px; height: 16px; }
.coin-ref-btn b { color: #3BD47A; }
@media (hover: hover) and (pointer: fine) { .coin-ref-btn:hover { border-color: #3BD47A; } }
.coin-btn { gap: 8px; }
.brand { width: 22px; height: 22px; flex: none; }
.brand-dex { border-radius: 6px; }
.coin-btn .long { display: none; }
.coin-actions .ca { flex-basis: 100%; }
.coin-actions .coin-btn { flex: 1 1 0; }
@media (hover: hover) and (pointer: fine) {
  .coin-btn:hover, .ca:hover { filter: brightness(1.08); }
}

/* ---------- builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 10px; }

.stage {
  position: sticky; top: 0; z-index: 6;
  padding: 12px var(--gutter) 10px;
  background-color: var(--cobalt);
  background-image: radial-gradient(rgba(255, 255, 255, .10) 1.2px, transparent 1.7px);
  background-size: 16px 16px;
}
.frame-wrap { position: relative; width: min(100%, 36svh); margin: 0 auto; }
.intro .frame-wrap { animation: frame-pop .7s var(--spring) .25s both; }
@keyframes frame-pop { from { opacity: 0; transform: scale(.86) rotate(-4deg); } to { opacity: 1; transform: none; } }
.backcard {
  position: absolute; inset: 0;
  background: var(--belly); border: 3px solid var(--ink); border-radius: 26px;
  transform: rotate(-4deg) translate(-8px, 6px);
}
.frame {
  position: relative; aspect-ratio: 1;
  background: var(--fur);
  border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}
.frame-wrap::before, .frame-wrap::after {
  content: ''; position: absolute; z-index: 2; top: -10px;
  width: 84px; height: 26px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 5px, transparent 5px 11px), var(--tape);
  opacity: .92; box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}
.frame-wrap::before { left: -22px; transform: rotate(-34deg); }
.frame-wrap::after { right: -22px; transform: rotate(34deg); }
#preview { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#preview.dragging { cursor: grabbing; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }

.tweak {
  display: flex; align-items: center; gap: 10px;
  max-width: 520px; margin: 14px auto 0; padding: 7px 8px 7px 14px;
  background: var(--fur); border: 3px solid var(--ink); border-radius: 999px;
}
.tweak[hidden] { display: none; }
.tweak-name { display: none; font: 700 15px/1 var(--display); white-space: nowrap; }
.slider { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 13px; font-weight: 800; }
.slider input { flex: 1; min-width: 0; accent-color: var(--cobalt); }
.chip {
  flex: none; padding: 6px 12px; font-size: 14px; font-weight: 800;
  background: var(--concrete); border: 2px solid var(--ink); border-radius: 999px;
}
.hint { display: none; margin: 12px 0 0; color: var(--fur); font-size: 14px; text-align: center; }

.actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--fur); border-top: 3px solid var(--ink);
}
.btn {
  min-height: 48px; padding: 0 8px;
  font-weight: 800; font-size: 15px; line-height: 1.1; color: var(--ink);
  background: var(--fur); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-main { background: var(--belly); }
.only-desktop { display: none; }

/* ---------- closet: tabs + grid ---------- */
.closet {
  margin: 0 var(--gutter);
  background: var(--fur); border: 3px solid var(--ink); border-radius: 30px;
  box-shadow: 6px 6px 0 var(--ink);
}
.tabs {
  position: sticky; top: var(--stage-h, 0); z-index: 5;
  display: flex; gap: 8px;
  padding: 12px 12px 10px;
  background: var(--fur); border-bottom: 3px solid var(--ink); border-radius: 27px 27px 0 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; min-height: 40px;
  font: 700 16px/1 var(--display); white-space: nowrap;
  background: var(--fur); border: 3px solid var(--ink); border-radius: 999px;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--fur); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--belly); border: 2px solid var(--ink); }
.tab[aria-selected="true"] .dot { border-color: var(--fur); }
.dot[hidden] { display: none; }

.panel { padding: 14px 12px 16px; }
.panel[hidden] { display: none; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px;
  margin: 0; padding: 0; list-style: none;
}
.tile {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 8px;
  background: var(--concrete); border: 3px solid var(--ink); border-radius: 18px;
  transition: transform .18s var(--spring), box-shadow .18s, background-color .18s;
}
.tile img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.tile img.inked {
  filter: drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink))
          drop-shadow(0 1.5px 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink));
}
.tile-outfit { padding: 0; overflow: hidden; }
.tile-outfit img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: 50% 40%; transform: scale(1.35); }
.tile svg { width: 34px; height: 34px; }
.tile:active { transform: scale(.92); }
.tile[aria-pressed="true"] { background: var(--belly); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }

/* ---------- post him on X: composer sheet ---------- */
.tweet {
  text-align: left; background: #000; color: #E7E9EA;
  border: 3px solid var(--ink); border-radius: 22px; padding: 14px 16px 16px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
}
.tweet-head { display: flex; align-items: center; gap: 10px; }
.tweet-avatar { width: 44px; height: 44px; border-radius: 50%; background: #333; }
.tweet-who { margin: 0; }
.tweet-who strong { color: #fff; font-weight: 800; }
.tweet-who span { margin-left: 6px; color: #71767B; }
.tweet-head .xlogo { margin-left: auto; width: 20px; height: 20px; color: #fff; }
.tweet-text {
  display: block; width: 100%; margin: 10px 0 12px; padding: 8px 10px; resize: none;
  font: 500 17px/1.35 var(--ui); color: #E7E9EA; background: transparent;
  border: 2px dashed #2F3336; border-radius: 12px;
}
.tweet-text:focus { outline: none; border-color: #1D9BF0; }
.tweet-image { display: block; margin: 0 auto; width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 16px; border: 1px solid #2F3336; background: #16181C; }
.btn-x { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; background: #000; text-decoration: none; }
.btn-x .xlogo { width: 17px; height: 17px; flex: none; }
.post-help { margin: 12px 0 0; font-size: 13px; color: #5B6170; text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.xdialog {
  width: min(92vw, 440px); max-height: 92svh; overflow: auto; padding: 22px 20px 18px;
  color: var(--ink); background: var(--fur);
  border: 3px solid var(--ink); border-radius: 24px; box-shadow: 6px 6px 0 var(--ink);
}
.xdialog::backdrop { background: rgba(10, 20, 60, .55); }
.xdialog[open] { animation: frame-pop .35s var(--spring); }
.xdialog h3 { margin: 0 0 12px; font: 700 24px/1.1 var(--display); }
.xdialog ol { margin: 0 0 18px; padding-left: 22px; line-height: 1.55; }
kbd { padding: 1px 7px; font: 700 13px/1.4 ui-monospace, Consolas, monospace; background: var(--concrete); border: 2px solid var(--ink); border-radius: 6px; }
.xtext { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 10px 12px; background: var(--concrete); border: 2px dashed #B9C0CC; border-radius: 12px; }
.xtext p { flex: 1; margin: 0; font-size: 14px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.xtext .chip { color: var(--ink); }
.xdialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.xdialog-actions .btn { padding: 0 18px; }
.xclose {
  position: absolute; top: 12px; right: 16px; width: 36px; height: 36px;
  font: 700 22px/1 var(--display); color: var(--ink); background: var(--concrete);
  border: 2px solid var(--ink); border-radius: 50%;
}
.xdialog .tweet { box-shadow: 4px 4px 0 var(--ink); margin-bottom: 14px; }
.xdialog .xdialog-actions .btn-x { flex: 1; }
.xstate[hidden] { display: none; }
.xstate { animation: frame-pop .3s var(--spring); }
.btn-post .xlogo { width: 16px; height: 16px; }
@media (max-width: 599px) {
  .xdialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 26px 26px 0 0; border-bottom: 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 0 var(--ink); }
  .xdialog[open] { animation: sheet-up .38s var(--spring); }
  .xdialog .tweet-image { max-width: 220px; }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------- marquee ---------- */
.marquee {
  margin: 56px 0 0; padding: 0;
  transform: rotate(-2.2deg) scale(1.04);
  background: var(--tape); border-block: 3px solid var(--ink);
  overflow: hidden;
}
.marquee-track { display: flex; align-items: center; gap: 22px; width: max-content; padding: 12px 0; animation: marquee 26s linear infinite; }
.marquee span { font: 700 clamp(24px, 4.4vw, 40px)/1 var(--display); white-space: nowrap; }
.marquee b { font-size: clamp(18px, 3vw, 28px); color: var(--cobalt); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- wall of ready-made Georges ---------- */
.wall { max-width: 1200px; margin: 64px auto 0; padding: 0 var(--gutter); color: var(--fur); }
.wall h2 {
  margin: 0; font: 700 clamp(38px, 8vw, 72px)/1 var(--display); text-align: center;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink);
}
.wall-sub { margin: 10px 0 26px; text-align: center; font-weight: 700; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.card {
  display: block; width: 100%; padding: 8px 8px 0; text-align: left;
  background: var(--fur); border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: 4px 5px 0 var(--ink);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .25s var(--spring), box-shadow .25s;
}
.card canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--concrete); }
.card span { display: block; padding: 9px 6px 11px; font: 700 17px/1.1 var(--display); color: var(--ink); }
.card:active { transform: scale(.96); }

/* ---------- $george section ---------- */
.coin-section { max-width: 720px; margin: 72px auto 0; padding: 0 var(--gutter); color: var(--fur); text-align: center; }
.coin-section h2 {
  margin: 0; font: 700 clamp(38px, 8vw, 72px)/1 var(--display);
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink);
}
.coin-sub { margin: 10px 0 22px; font-weight: 700; }

/* ---------- footer + toast ---------- */
.foot { margin: 80px 0 0; padding: 0 var(--gutter); color: var(--fur); text-align: center; font-size: 14px; overflow: hidden; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 12px; }
.links:empty { display: none; }
.links a { padding: 8px 18px; background: var(--fur); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; font-weight: 800; text-decoration: none; }
.credit { margin: 0 auto; max-width: 60ch; opacity: .9; }
.wordmark {
  margin: 28px 0 -0.2em;
  font: 700 clamp(110px, 31vw, 440px)/0.8 var(--display);
  color: transparent; -webkit-text-stroke: 3px rgba(255, 255, 255, .9);
  white-space: nowrap; user-select: none;
}

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 20;
  transform: translate(-50%, 14px) scale(.96); opacity: 0; pointer-events: none;
  padding: 10px 18px; background: var(--ink); color: var(--fur);
  border-radius: 999px; font-weight: 800; white-space: nowrap;
  transition: opacity .2s, transform .3s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.ok { background: var(--pole); color: var(--ink); border: 3px solid var(--ink); }

/* ---------- wider screens ---------- */
@media (min-width: 600px) {
  .tweak-name { display: inline; }
  .coin-main { grid-template-columns: 46px minmax(0, 1fr) minmax(90px, 150px); gap: 12px; }
  .coin-line { font-size: 14px; }
  .coin-btn .long { display: inline; }
  .coin-btn .short { display: none; }
  .coin-actions { flex-wrap: nowrap; }
  .coin-actions .ca { flex: 1 1 160px; }
  .coin-actions .coin-btn { flex: 0 0 auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); }
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover:not([aria-pressed="true"]) { transform: translateY(-3px) rotate(-3deg); box-shadow: 3px 4px 0 var(--ink); }
  .card:hover { transform: rotate(0deg) translateY(-8px) scale(1.03); box-shadow: 8px 12px 0 var(--ink); }
  .tab:hover:not([aria-selected="true"]) { background: var(--concrete); }
}
@media (min-width: 960px) {
  html { scroll-padding-top: 0; scroll-padding-bottom: 0; }
  body { padding-bottom: 0; }
  .masthead { padding: 40px 24px 22px; }
  .builder {
    grid-template-columns: minmax(400px, 520px) minmax(0, 1fr);
    align-items: start; gap: 40px;
    max-width: 1200px; margin: 10px auto 0; padding: 0 24px;
  }
  .stage { top: 24px; padding: 0; background: none; }
  .frame-wrap { width: 100%; }
  .hint { display: block; margin-top: 24px; }
  .tweak { margin-top: 24px; }
  .actions {
    position: static; margin-top: 18px; padding: 0;
    grid-template-columns: repeat(5, auto); justify-content: center;
    background: none; border: 0;
  }
  .btn { padding: 0 16px; }
  .only-desktop { display: block; }
  .closet { margin: 0; }
  .tabs { position: static; flex-wrap: wrap; overflow: visible; gap: 5px; padding: 16px 16px 14px; }
  .tab { padding: 6px 9px; font-size: 14px; gap: 5px; }
  .panel { padding: 18px 16px 20px; }
  .wall-grid { grid-template-columns: repeat(6, 1fr); gap: 26px 22px; }
  .toast { bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
