@font-face {
  font-family: SpaceGrotesk;
  src: url("/static/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: block;
}

@font-face {
  font-family: "FA Brands";
  src: url("/static/vendor/fontawesome-free-7.3.1/fa-brands-400.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "FA Solid";
  src: url("/static/vendor/fontawesome-free-7.3.1/fa-solid-900.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}

:root {
  --bg: #0a0a0b;
  --card: #0e0e10;
  --raise: #161617;
  --glass: rgba(22, 22, 23, .5);
  --nav-h: 70px;
  --strip-h: 54px;
  --raise-hover: #1e1e1f;
  --fill: rgba(255, 255, 255, .03);
  --fill-hover: rgba(255, 255, 255, .05);
  --panel: rgba(255, 255, 255, .04);
  --panel-strong: rgba(255, 255, 255, .09);

  --fg: #f4f5f7;
  --muted: #919191;
  --faint: rgba(255, 255, 255, .42);

  --accent: #f4f5f7;
  --accent-fg: #0a0a0b;
  --ring: rgba(255, 255, 255, .08);
  --danger: #ff6b6b;

  --hairline: rgba(255, 255, 255, .07);
  --hairline-strong: rgba(255, 255, 255, .16);

  --bevel: inset 0 4px 4px rgba(255, 255, 255, .05), inset 0 -4px 4px rgba(255, 255, 255, .05);
  --bevel-lg: inset 8px 8px 8px rgba(255, 255, 255, .05), inset -8px -8px 8px rgba(255, 255, 255, .05);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --pad: clamp(12px, 4vw, 20px);
  --gap: clamp(12px, 3.5vw, 18px);
  --page: 520px;

  --font: SpaceGrotesk, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: clamp(38px, 12vw, 52px);
  --fs-title: clamp(24px, 6.6vw, 30px);
  --fs-note: 13px;
  --fs-label: 11.5px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: .15s;
  --base: .25s;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg);
  color: var(--fg);
  font: 500 16px/1.45 var(--font);
  font-synthesis: none;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  padding:
    calc(var(--pad) + env(safe-area-inset-top))
    calc(var(--pad) + env(safe-area-inset-right))
    calc(var(--pad) + env(safe-area-inset-bottom))
    calc(var(--pad) + env(safe-area-inset-left));
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.backdrop span {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 62%);
}
.backdrop .b-a { left: -30vmax; top: -34vmax; animation: drift-a 22s ease-in-out infinite; }
.backdrop .b-b { right: -34vmax; bottom: -30vmax; animation: drift-b 28s ease-in-out infinite; }
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(-7vw, -5vh) scale(.9); }
}

button, input, textarea, select { font: inherit; letter-spacing: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(255, 255, 255, .22); }

.screen {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  grid-area: 2 / 1;
  min-height: 0;
  display: grid;
  gap: var(--gap);
  align-content: start;
}

.screen[hidden] { display: none; }

#screen-closed,
#screen-connect,
.screen-center {
  align-content: center;
  align-content: safe center;
  justify-items: center;
  text-align: center;
}

#screen-app {
  position: relative;
  grid-template-rows: minmax(0, 1fr);
  touch-action: pan-y pinch-zoom;
}

h1 {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.muted {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
  font-size: clamp(14px, 3.8vw, 15px);
  line-height: 1.5;
}

.error {
  margin: 0;
  color: var(--danger);
  font-size: var(--fs-note);
  line-height: 1.3;
}

.hint {
  margin: 0;
  min-height: 1.2em;
  font-size: var(--fs-note);
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
}
.hint.error { color: var(--danger); }

.empty {
  margin: 0;
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  font-size: clamp(16px, 4.6vw, 19px);
  letter-spacing: -.02em;
}

.note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-note);
  line-height: 1.3;
}

.empty:empty,
.note:empty { display: none; }

.logo {
  width: clamp(76px, 23vw, 100px);
  aspect-ratio: 1;
  border-radius: 28%;
  display: grid;
  place-items: center;
  background: var(--raise);
  border: 1px solid var(--hairline);
  box-shadow: var(--bevel-lg), 0 0 60px -18px rgba(255, 255, 255, .22);
  color: var(--fg);
  font: 500 clamp(38px, 11.5vw, 50px)/1 var(--font);
}

#screen-connect .logo {
  font: 500 clamp(38px, 11.5vw, 50px)/1.47 var(--font);
}

.glyph {
  display: inline-block; min-width: 1.25em; text-align: center;
  font-style: normal; font-weight: 400; line-height: 1; letter-spacing: 0;
}
.glyph.brands { font-family: "FA Brands"; }
.glyph.solid { font-family: "FA Solid"; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--hairline);
  box-shadow: var(--bevel), 0 18px 40px -22px rgba(0, 0, 0, .9);
}

.tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: var(--nav-h);
  padding: 6px;
  border-radius: 26px;
}

.tab-pad {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--bevel);
  pointer-events: none;
}

.tab {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 9px 8px 8px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-label);
  letter-spacing: .02em;
  cursor: pointer;
  transition: color var(--base) var(--ease);
}
.tab .glyph { font-size: 18px; transition: transform var(--base) var(--ease); }
.tab.active { color: var(--fg); }
.tab.active .glyph { transform: translateY(-1px) scale(1.06); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#panel-mint {
  display: grid;
  gap: var(--gap);
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-inline: 6px;
  margin-inline: -6px;
  padding-bottom: calc(var(--nav-h) + var(--gap));
}

#panel-nfts {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}
#panel-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#panel-mint, #panel-nfts, #panel-card { grid-area: 1 / 1; }
#panel-mint[hidden],
#panel-nfts[hidden],
#panel-card[hidden] { display: none; }

.scroller {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar,
#panel-mint::-webkit-scrollbar { display: none; }
#panel-mint { scrollbar-width: none; }
#panel-card .scroller { padding-bottom: calc(var(--nav-h) + var(--gap)); }
#nfts-scroll { padding-bottom: calc(var(--nav-h) + var(--strip-h) + 2 * var(--gap)); }

.preview { position: relative; width: 100%; }

.preview canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: 0 14px 44px -20px rgba(0, 0, 0, .9);
}

.buy {
  display: grid;
  gap: 8px;
}

.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.price b {
  font: 500 var(--fs-display)/1 var(--font);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.price .unit {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.field { display: grid; gap: 8px; }

.label {
  color: var(--faint);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: .12em;
  transition: color var(--base) var(--ease);
}
.field:focus-within > .label,
.field:focus-within > .label-row > .label { color: var(--fg); }

.input-wrap,
.bio-form input[type="text"],
.bio-form input[type="url"],
.bio-form input[type="search"],
.bio-form textarea,
.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  outline: 0;
  border-radius: var(--radius);
  background: var(--fill);
  color: var(--fg);
  font: 500 16px/1.4 var(--font);
  transition: border-color var(--base) var(--ease), box-shadow var(--base) var(--ease),
              background-color var(--base) var(--ease);
}
.input-wrap:hover,
.bio-form input[type="text"]:hover,
.bio-form input[type="url"]:hover,
.bio-form input[type="search"]:hover,
.bio-form textarea:hover,
.search-input:hover { background: var(--fill-hover); }
.input-wrap:focus-within,
.bio-form input[type="text"]:focus,
.bio-form input[type="url"]:focus,
.bio-form input[type="search"]:focus,
.bio-form textarea:focus,
.search-input:focus {
  border-color: rgba(255, 255, 255, .5);
  background: var(--fill-hover);
  box-shadow: 0 0 0 4px var(--ring);
}
.bio-form input::placeholder,
.bio-form textarea::placeholder,
.search-input::placeholder { color: var(--muted); opacity: .55; }
.bio-form input:disabled { opacity: .35; }

.input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.at { color: var(--muted); font: 500 20px/1 var(--font); }

.input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: 500 clamp(17px, 5vw, 20px)/1.2 var(--font);
  letter-spacing: -.02em;
}
.input-wrap input::placeholder { color: var(--muted); opacity: .5; }
.input-wrap input:disabled { opacity: .5; }

.bio-form textarea { display: block; min-height: 96px; resize: vertical; }
.bio-form .paragraph { display: grid; gap: 6px; }
.bio-form .paragraph .count {
  justify-self: end; color: var(--muted);
  font-size: var(--fs-note); font-variant-numeric: tabular-nums;
}

.check {
  display: flex; align-items: center; gap: 12px;
  color: var(--fg); font-size: 15px; cursor: pointer;
}
.check input {
  -webkit-appearance: none; appearance: none;
  position: relative; flex: 0 0 auto;
  width: 42px; height: 26px; margin: 0;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--fill);
  cursor: pointer;
  transition: background-color var(--base) var(--ease), border-color var(--base) var(--ease),
              box-shadow var(--base) var(--ease);
}
.check input::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted);
  transition: transform .35s var(--ease), background-color var(--base) var(--ease);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: translateX(16px); background: var(--accent-fg); }
.check input:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ring); }
.check input:disabled { opacity: .35; cursor: default; }

.bio-form .range,
.bio-form .colour { display: flex; align-items: center; gap: 12px; }
.bio-form input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; min-width: 0; height: 22px; margin: 0; padding: 0;
  background: none; cursor: pointer;
}
.bio-form input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--level, 50%),
                              var(--hairline-strong) var(--level, 50%));
}
.bio-form input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -7px;
  border: 0; border-radius: 50%; background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  transition: transform var(--base) var(--ease);
}
.bio-form input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 2px; background: var(--hairline-strong);
}
.bio-form input[type="range"]::-moz-range-progress {
  height: 4px; border-radius: 2px; background: var(--accent);
}
.bio-form input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.bio-form input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
.bio-form input[type="range"]:focus-visible { outline: 0; }
.bio-form input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px var(--ring), 0 2px 8px rgba(0, 0, 0, .5);
}
.bio-form .range > span,
.bio-form .colour > span {
  min-width: 4ch; text-align: right; color: var(--muted);
  font-size: var(--fs-note); font-variant-numeric: tabular-nums;
}

.bio-form, .bio-fields { display: grid; gap: var(--gap); }

.bio-form .colour { flex-wrap: wrap; }
.swatch {
  flex: 0 0 auto;
  width: 56px; height: 40px; padding: 0;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--swatch, #000);
  box-shadow: inset 0 0 0 3px var(--bg);
  cursor: pointer;
  transition: transform var(--fast) var(--ease), border-color var(--base) var(--ease);
}
.swatch:hover:not(:disabled) { border-color: var(--fg); }
.swatch:active:not(:disabled) { transform: scale(.95); }
.swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch[aria-expanded="true"] { border-color: var(--fg); }
.swatch:disabled { opacity: .35; cursor: default; }

.colour-panel {
  flex: 1 0 100%;
  display: grid; gap: 12px;
  padding: 12px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--bevel);
}
.cp-area {
  position: relative; height: 150px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--hue, 0) 100% 50%));
  cursor: crosshair;
  touch-action: none;
}
.cp-dot {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.bio-form input.cp-hue { flex: none; width: 100%; }
.bio-form input.cp-hue::-webkit-slider-runnable-track {
  height: 10px; border-radius: 5px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.bio-form input.cp-hue::-webkit-slider-thumb { margin-top: -4px; }
.bio-form input.cp-hue::-moz-range-track {
  height: 10px; border-radius: 5px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.bio-form input.cp-hue::-moz-range-progress { background: none; }
.bio-form input.cp-hex { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-choice {
  padding: 9px 14px;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--fill); color: var(--muted);
  font-size: 14px; cursor: pointer;
  transition: transform var(--fast) var(--ease), background-color var(--base) var(--ease),
              color var(--base) var(--ease), border-color var(--base) var(--ease);
}
.chip-choice:hover { background: var(--fill-hover); color: var(--fg); }
.chip-choice:active { transform: scale(.95); }
.chip-choice[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-fg);
}
.chip-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bio-group {
  margin: 10px 0 -4px; padding-top: 16px;
  border-top: 1px solid var(--hairline);
  color: var(--fg); font-size: 15px; letter-spacing: -.02em; text-transform: none;
}
.bio-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.bio-frame {
  width: 100%; height: 480px; flex: 0 0 auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); background: var(--bg);
}

.handles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.handle-row {
  min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--bevel);
  transition: background-color var(--base) var(--ease);
}
.handle-row .name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.handle-row .state { color: var(--muted); font-size: var(--fs-note); }
.handle-row a { color: var(--fg); font-size: var(--fs-note); }

.link-row > .glyph, .badge-row > .glyph { font-size: 18px; color: var(--fg); }
.badge-row .check { flex: 0 0 auto; font-size: var(--fs-note); color: var(--muted); }
.link-tools { display: flex; gap: 2px; flex: 0 0 auto; }
#card-link-add { margin-top: 2px; }

.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-note { color: var(--muted); font-size: var(--fs-note); text-align: right; }
.handle-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.handle-text .name, .handle-text .state {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.primary,
.secondary {
  width: 100%;
  min-height: 52px;
  padding: 14px var(--pad);
  border-radius: var(--radius);
  font: 500 clamp(16px, 4.4vw, 17px)/1.2 var(--font);
  letter-spacing: -.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--fast) var(--ease), filter var(--base) var(--ease),
              background-color var(--base) var(--ease), opacity var(--base) var(--ease);
}
.primary:active:not(:disabled),
.secondary:active:not(:disabled),
.row-action:active:not(:disabled),
.icon-button:active:not(:disabled) { transform: scale(.97); }
.primary:focus-visible,
.secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.primary {
  position: relative;
  overflow: hidden;
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
}
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.primary:disabled { opacity: .3; cursor: default; }
a.primary { display: grid; place-items: center; }
.primary::after {
  content: "";
  position: absolute; inset: 0 auto 0 -40%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-12deg);
  opacity: 0;
  pointer-events: none;
}
.primary:hover:not(:disabled)::after { animation: sheen .9s var(--ease); }
@keyframes sheen {
  0% { transform: translateX(0) skewX(-12deg); opacity: 1; }
  100% { transform: translateX(520%) skewX(-12deg); opacity: 0; }
}

#screen-connect .primary,
#screen-closed .primary,
.screen-center .primary,
.screen-center .secondary { max-width: 280px; }

.secondary {
  flex: 0 0 auto;
  border: 1px solid var(--hairline);
  background: var(--raise);
  box-shadow: var(--bevel);
  color: var(--fg);
}
.secondary:hover:not(:disabled) { background: var(--raise-hover); }
.secondary:disabled { opacity: .35; cursor: default; }
.secondary[hidden] { display: none; }
a.secondary { display: grid; place-items: center; }

.link-button {
  padding: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color var(--base) var(--ease);
}
.link-button:hover { color: var(--fg); }
.link-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.row-action {
  flex: 0 0 auto; padding: 8px 14px;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--fg);
  font-size: 14px; cursor: pointer;
  transition: transform var(--fast) var(--ease), background-color var(--base) var(--ease);
}
.row-action:hover:not(:disabled) { background: var(--panel-strong); }
.row-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row-action:disabled { opacity: .35; cursor: default; }

.icon-button {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--muted); font-size: 15px; cursor: pointer;
  transition: transform var(--fast) var(--ease), background-color var(--base) var(--ease),
              color var(--base) var(--ease);
}
.icon-button:hover:not(:disabled) { background: var(--panel-strong); color: var(--fg); }
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-button:disabled { opacity: .3; cursor: default; }

.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sheet-panel {
  width: 100%; max-width: var(--page); max-height: 92vh; overflow-y: auto;
  padding: 20px var(--pad) calc(var(--pad) + env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--card);
  border: 1px solid var(--hairline); border-bottom: 0;
  box-shadow: var(--bevel-lg);
  scrollbar-width: none;
}
.sheet-panel::-webkit-scrollbar { display: none; }
.sheet-panel > h2 { margin: 0; color: var(--fg); font-size: 20px; letter-spacing: -.03em; text-transform: none; }

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; border-radius: var(--radius);
  background: var(--fill); border: 1px solid var(--hairline);
}
.segmented button {
  padding: 10px 8px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--muted); font-size: 15px; cursor: pointer;
  transition: background-color var(--base) var(--ease), color var(--base) var(--ease);
}
.segmented button[aria-pressed="true"] {
  background: var(--panel-strong); color: var(--fg); box-shadow: var(--bevel);
}
.segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.icon-picked {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg); font-size: 15px;
}
.icon-picked .glyph { font-size: 22px; }
.icon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px;
}
.icon-choice {
  height: 44px; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--fill); color: var(--fg); font-size: 18px; cursor: pointer;
  transition: transform var(--fast) var(--ease), background-color var(--base) var(--ease),
              border-color var(--base) var(--ease);
}
.icon-choice:hover { background: var(--panel-strong); }
.icon-choice:active { transform: scale(.94); }
.icon-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--panel-strong); }
.icon-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.status {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 22px var(--pad);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--bevel-lg);
}
.status p { margin: 0; font-size: clamp(15px, 4.2vw, 16px); }
#order-stage {
  font-size: clamp(20px, 5.6vw, 24px) !important;
  letter-spacing: -.03em;
  line-height: 1.15;
}
#order-countdown {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-note) !important;
}
.status .primary,
.status .secondary { max-width: 280px; }

#order-message {
  color: var(--muted);
  font-size: var(--fs-note);
  line-height: 1.4;
  max-width: 34ch;
}
#order-message[hidden] { display: none; }

#order-error {
  color: var(--danger);
  font-size: var(--fs-note);
  line-height: 1.4;
}
#order-error[hidden] { display: none; }

.spinner {
  width: 24px;
  aspect-ratio: 1;
  border: 2px solid var(--hairline-strong);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  gap: var(--gap);
  flex: 0 0 auto;
}
#nfts-grid:empty { display: none; }

.card {
  display: grid;
  gap: 10px;
  padding: 10px 10px 12px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--bevel);
  color: var(--fg);
  text-decoration: none;
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease),
              background-color var(--base) var(--ease);
}
.card:hover { border-color: var(--hairline-strong); background: var(--raise); }
.card:active { transform: scale(.98); }
.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--raise);
}
.card span {
  padding-inline: 4px;
  font-size: 15px;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + var(--gap));
  z-index: 1;
  min-height: var(--strip-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius);
}

.chip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font: 500 13px/1.2 var(--font);
  letter-spacing: .02em;
}

@media (min-width: 700px) {
  :root { --page: 560px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .preview canvas { max-height: 46dvh; width: auto; margin-inline: auto; }
}

.attention {
  grid-area: 1 / 1;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 4px 12px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--danger) 38%, transparent);
  box-shadow: var(--bevel);
  font-size: var(--fs-note);
  line-height: 1.4;
}
.attention[hidden] { display: none; }
.attention p { margin: 0; }
.attention b { font-weight: 500; color: var(--fg); }
.attention .link-button {
  justify-self: end;
  padding: 0;
  font-size: var(--fs-note);
}

.screen.landing {
  max-width: none;
  padding-inline: max(0px, calc((100% - 1040px) / 2));
  gap: clamp(56px, 12vw, 104px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding-bottom: 24px;
}
.screen.landing::-webkit-scrollbar { display: none; }

.l-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.l-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 20px; letter-spacing: -.03em;
}
.l-brand .logo {
  width: 40px; border-radius: 30%;
  font: 500 20px/1.47 var(--font);
  box-shadow: var(--bevel);
}
.l-top .secondary { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }

.l-hero {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 6vw, 56px);
}
.l-pitch { display: grid; gap: 18px; justify-items: start; }
.l-pitch h1 {
  font-size: clamp(40px, 11vw, 68px); letter-spacing: -.045em; line-height: 1.02;
  min-height: 2.04em;
}
.l-pitch .muted { max-width: 46ch; font-size: clamp(16px, 4.2vw, 19px); }
.l-actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.l-actions .primary, .l-actions .secondary { width: auto; flex: 1 1 200px; }
.l-demo {
  display: grid; gap: var(--gap); width: 100%; max-width: 440px; justify-self: center;
}

.l-section { display: grid; gap: 14px; }
.l-section h2 {
  margin: 0;
  font-size: clamp(28px, 7.4vw, 42px); font-weight: 500;
  letter-spacing: -.04em; line-height: 1.08;
}
.l-grid {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}
.l-card {
  display: grid; gap: 10px; align-content: start;
  padding: 22px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--bevel-lg);
  transition: border-color var(--base) var(--ease), background-color var(--base) var(--ease),
              transform var(--base) var(--ease);
}
.l-card:hover { border-color: var(--hairline-strong); background: var(--raise); transform: translateY(-2px); }
.l-card h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -.03em; }
.l-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.l-card .glyph { justify-self: start; min-width: 0; font-size: 22px; color: var(--fg); }
.l-num { color: var(--faint); font-size: 13px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }

.l-final {
  justify-items: center; text-align: center; gap: 16px;
  padding: clamp(32px, 8vw, 56px) var(--pad);
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--bevel-lg), 0 0 80px -30px rgba(255, 255, 255, .25);
}
.l-final .primary { max-width: 280px; }
.l-foot { text-align: center; color: var(--faint); font-size: var(--fs-note); }

.motion .l-reveal:not(.seen) { opacity: 0; }
.motion .l-reveal.seen { animation: arrive .6s var(--ease) backwards; }

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 1.5px solid var(--fg);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  transition: width var(--base) var(--ease), height var(--base) var(--ease),
              margin var(--base) var(--ease), opacity var(--base) var(--ease);
}
.cursor.over { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.cursor.away { opacity: 0; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

@media (min-width: 860px) {
  .l-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .l-demo { justify-self: end; }
}

.breathing { animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe {
  from { opacity: 1; }
  to { opacity: .4; }
}

.bones { pointer-events: none; }
.bones:not(.grid) { display: grid; gap: var(--gap); }
.bones:not([hidden]) ~ .empty,
.bones:not([hidden]) ~ .note {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--fill);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--fill-hover) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 1.5s linear infinite;
}
.skeleton.tile { aspect-ratio: 1; }
.skeleton.line { height: 14px; width: 45%; border-radius: 7px; }
.skeleton.row { height: 56px; }
@keyframes shimmer { to { transform: translateX(100%); } }

.word { display: inline-block; white-space: pre; }
.letter { display: inline-block; white-space: pre; transform-origin: 50% 100%; }
#landing-title, #order-stage {
  font-kerning: none;
  font-variant-ligatures: none;
}

[data-leaving] { pointer-events: none; }

.screen-center > * { animation: arrive .6s var(--ease) both; }
.screen-center > h1 { animation-name: arrive-text; }
.screen-center > :nth-child(2) { animation-delay: .07s; }
.screen-center > :nth-child(3) { animation-delay: .14s; }
.screen-center > :nth-child(4) { animation-delay: .21s; }
.screen-center > :nth-child(5) { animation-delay: .28s; }
.screen-center > :nth-child(n + 6) { animation-delay: .35s; }
@keyframes arrive {
  from { opacity: 0; transform: translateY(16px); }
}
@keyframes arrive-text {
  from { opacity: 0; transform: translateY(16px); filter: blur(8px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .backdrop span, .skeleton::after { animation: none; }
}
