/* crumbs: fog, ink and toasted-gold crumbs. */

:root {
  --fog: #edeff5;
  --paper: #ffffff;
  --ink: #161a33;
  --dusk: #5b6080;
  --line: rgb(22 26 51 / 0.12);
  --line-strong: rgb(22 26 51 / 0.24);
  --crumb: #db8a1f;
  --crumb-soft: #efb54f;
  --crumb-glow: rgb(239 160 52 / 0.5);
  --danger: #b4263a;
  --font: "Familjen Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fog: #0e1124;
    --paper: #171b33;
    --ink: #eceef7;
    --dusk: #9da3c4;
    --line: rgb(236 238 247 / 0.12);
    --line-strong: rgb(236 238 247 / 0.26);
    --danger: #ff7d8c;
    --crumb: #f2a93b;
    --crumb-soft: #f9cf7e;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 1.3125rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand .wordmark {
  display: block;
  width: auto;
  height: 1.05rem;
  margin-top: 0.12rem;
}

/* The mark: a porous crumb and two small ones that broke off. */
.mark {
  --size: 1.6rem;
  flex: none;
  width: var(--size);
  height: var(--size);
  overflow: visible;
}

.mark .c3 {
  fill: var(--crumb);
}

.mark .c1,
.mark .c2 {
  fill: var(--crumb-soft);
}

.mark .pl {
  fill: var(--dusk);
  opacity: 0.6;
}

.mark .sc {
  fill: none;
  stroke: var(--crumb-soft);
  stroke-width: 3.2;
  stroke-linecap: round;
}

.mark.big {
  --size: 4.5rem;
}

.mark path {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

/* While a build runs, the small crumbs hop and the big one rocks, like crumbs on a shaken plate. */
.is-building .mark .c1 {
  animation: hop 0.9s ease-in-out infinite;
}

.is-building .mark .c2 {
  animation: hop 0.9s ease-in-out 0.15s infinite;
}

.is-building .mark .c3 {
  animation: rock 1.8s ease-in-out infinite;
}

@keyframes hop {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-38%);
  }
}

@keyframes rock {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(4deg);
  }
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar nav a {
  color: var(--dusk);
  font-weight: 500;
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* The signed-in wallet: tier icon and short address. */
.topbar nav .wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 550;
  text-decoration: none;
}

.topbar nav .wallet-chip:hover {
  border-color: var(--ink);
  text-decoration: none;
}

.wallet-chip .tier-icon {
  --size: 1.2rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--ink);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn.primary:hover {
  background: color-mix(in srgb, var(--ink) 85%, var(--crumb));
}

.btn.big {
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn.small {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.btn.danger {
  color: var(--danger);
}

.btn.danger:hover {
  border-color: var(--danger);
}

/* ---------- Home ---------- */

.home {
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(2rem, 10vh, 7rem) 1.5rem 4rem;
}

.ask-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--dusk);
  font-size: 1.125rem;
}

/* The prompt is set like a headline: you write the page's first line yourself. */
.ask textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0 0 0.65rem;
  overflow: hidden;
  resize: none;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--crumb);
  font-size: clamp(1.625rem, 1.05rem + 2.4vw, 2.625rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.ask textarea::placeholder {
  color: color-mix(in srgb, var(--dusk) 60%, transparent);
}

.ask textarea:focus {
  outline: none;
  padding-bottom: calc(0.65rem - 1px);
  border-bottom-width: 3px;
  box-shadow: 0 16px 24px -18px var(--crumb-glow);
}

.ask-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}

.hint {
  margin: 0;
  color: var(--dusk);
  font-size: 0.875rem;
}

.quota {
  margin: 0.75rem 0 0;
  color: var(--dusk);
  font-size: 0.875rem;
}

.form-error {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-weight: 500;
}

.ideas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.25rem;
}

.chip {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.recent {
  margin-top: clamp(3.5rem, 11vh, 6.5rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-head a {
  color: var(--dusk);
  font-size: 0.9375rem;
}

.empty {
  max-width: 36rem;
  color: var(--dusk);
}

/* ---------- Holder tiers ---------- */

.holders {
  margin-top: clamp(3.5rem, 11vh, 6.5rem);
}

.holders h2 {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.holders-lede {
  max-width: 40rem;
  margin: 0.4rem 0 0;
  color: var(--dusk);
}

/* Crumb, slice and loaf stand on one board line; your tier's stretch of the board turns gold. */
.tiers {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.tier-art {
  display: flex;
  align-items: flex-end;
  height: 7rem;
  border-bottom: 2px solid var(--ink);
}

.tier-art .tier-icon {
  --size: 6rem;
  width: auto;
  height: var(--size);
  /* The icons stand at y = 58 of 64; shift them down so that line meets the board. */
  margin-bottom: calc(var(--size) * -6 / 64);
}

.tier[aria-current="true"] .tier-art {
  border-bottom-color: var(--crumb);
  box-shadow: 0 2px 0 var(--crumb);
}

.tier-name,
.tier-min,
.tier-perks {
  padding-right: 1.25rem;
}

.tier-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 1rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.tier-you {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--crumb-soft);
  color: #161a33;
  font-size: 0.75rem;
  font-weight: 600;
}

.tier-min {
  margin: 0.1rem 0 0;
  font-weight: 500;
}

.tier-perks {
  margin: 0.45rem 0 0;
  padding-left: 0;
  list-style: none;
  color: var(--dusk);
  font-size: 0.9375rem;
}

.tier-perks li + li {
  margin-top: 0.15rem;
}

.wallet-box {
  margin-top: 2rem;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.wallet-note {
  margin: 0.75rem 0 0;
  color: var(--dusk);
  font-size: 0.875rem;
}

.wallet-line {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
}

.wallet-next {
  margin: -0.5rem 0 0.85rem;
  color: var(--dusk);
}

.wallet-line .addr {
  font-weight: 600;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.wallet-line .addr:hover {
  text-decoration-color: var(--ink);
}

.wallet-msg {
  max-width: 40rem;
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-weight: 500;
}

.wallet-msg.is-guide {
  color: var(--ink);
  font-weight: 400;
}

.wallet-msg a {
  color: var(--ink);
  font-weight: 600;
}

.contract {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.65rem;
  margin: 1.5rem 0 0;
  color: var(--dusk);
  font-size: 0.875rem;
}

.contract code {
  color: var(--ink);
  font: 400 0.8125rem/1.4 var(--mono);
  overflow-wrap: anywhere;
}

.contract .linkish {
  font-size: 0.875rem;
}

.contract a {
  color: var(--dusk);
}

.contract a:hover {
  color: var(--ink);
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 2rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  min-width: 0;
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper);
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.thumb:hover {
  outline-color: var(--ink);
}

/* Render the site at four times the size, then scale it down, so thumbnails show a desktop layout. */
.thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 400%;
  border: 0;
  background: #fff;
  transform: scale(0.25);
  transform-origin: 0 0;
  pointer-events: none;
}

.thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--dusk);
  font-size: 0.875rem;
  text-decoration: none;
}

.tile-title {
  display: block;
  margin-top: 0.7rem;
  overflow: hidden;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-title:hover {
  text-decoration: underline;
}

.tile-meta {
  margin: 0.15rem 0 0;
  color: var(--dusk);
  font-size: 0.875rem;
}

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

/* ---------- Simple pages ---------- */

.wide {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.wide.narrow {
  max-width: 40rem;
  padding-top: clamp(2rem, 10vh, 6rem);
}

.wide h1,
.page-head h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lede {
  max-width: 40rem;
  margin: 0.6rem 0 2rem;
  color: var(--dusk);
  font-size: 1.125rem;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding: 2rem 0;
  color: var(--dusk);
}

.empty-state p {
  margin: 0;
}

.name-form {
  display: grid;
  gap: 0.4rem;
  max-width: 30rem;
  margin: 1.5rem 0 2.5rem;
}

.name-form label {
  color: var(--dusk);
  font-size: 0.9375rem;
}

.inline {
  display: flex;
  gap: 0.5rem;
}

.inline input {
  flex: 1;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
}

.note {
  max-width: 40rem;
  margin-top: 3rem;
  color: var(--dusk);
  font-size: 0.875rem;
}

.pager {
  display: flex;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

/* ---------- Builder ---------- */

.page-builder {
  overflow: hidden;
}

.builder {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.quiet {
  color: var(--dusk);
  font-size: 0.9375rem;
  text-decoration: none;
}

.quiet:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-title {
  margin: 0.4rem 1.25rem 0;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.1rem;
  margin: 0;
  padding: 1.1rem 1.25rem;
  overflow: auto;
  list-style: none;
}

.turn {
  padding: 0.1rem 0 0.1rem 0.85rem;
  border-left: 2px solid var(--line-strong);
}

.turn.is-selected {
  border-left-color: var(--ink);
}

.turn.is-live {
  border-left-color: var(--crumb);
}

.turn.is-failed {
  border-left-color: var(--danger);
}

.turn-text {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.turn-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  margin-top: 0.35rem;
  color: var(--dusk);
  font-size: 0.8125rem;
}

.turn-status {
  margin: 0.35rem 0 0;
  color: var(--dusk);
  font-size: 0.875rem;
}

.is-failed .turn-status {
  color: var(--danger);
}

.turn-empty {
  color: var(--dusk);
  font-size: 0.9375rem;
}

.ver,
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

.ver[aria-pressed="true"],
.ver:hover,
.linkish:hover {
  text-decoration-color: var(--ink);
}

.warn {
  color: var(--danger);
}

.change {
  padding: 0.9rem 1.25rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.change textarea {
  display: block;
  width: 100%;
  min-height: 4.75rem;
  max-height: 14rem;
  padding: 0.7rem 0.85rem;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--fog);
  line-height: 1.4;
}

.change textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crumb) 40%, transparent);
}

.change-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.change-row .quota {
  margin: 0 auto 0 0;
}

.upsell {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.grow {
  flex: 1;
}

.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
}

.seg button {
  padding: 0.38rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--dusk);
  font-size: 0.8125rem;
  font-weight: 550;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 550;
  cursor: pointer;
}

.switch input {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 1.3rem;
  margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  appearance: none;
  transition: background 0.15s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.3rem - 4px);
  height: calc(1.3rem - 4px);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 0.15s;
}

.switch input:checked {
  background: var(--ink);
}

.switch input:checked::after {
  transform: translateX(0.95rem);
}

.switch input:disabled {
  cursor: not-allowed;
}

.switch:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.canvas {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 0 1rem 1rem;
}

.frame-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper);
  outline: 1px solid var(--line);
}

.canvas[data-width="phone"] .frame-wrap,
.canvas[data-width="phone"] .code {
  max-width: 24.375rem;
  margin: 0 auto;
}

.frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  visibility: hidden;
}

.frame-wrap iframe.front {
  visibility: visible;
}

.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
  padding: 2rem;
  background: var(--paper);
  text-align: center;
}

.veil p {
  max-width: 32rem;
  margin: 0;
}

.veil .mark {
  margin-bottom: 0.75rem;
}

.veil-text {
  font-size: 1.3125rem;
  font-weight: 600;
}

.veil-sub {
  color: var(--dusk);
}

.progress {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  height: 3px;
  overflow: hidden;
}

.progress::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  background: var(--crumb);
  animation: sweep 1.4s ease-in-out infinite;
}

@keyframes sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(340%);
  }
}

.code {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 1rem 1.15rem;
  overflow: auto;
  border-radius: 10px;
  background: var(--paper);
  outline: 1px solid var(--line);
  color: var(--ink);
  font: 400 0.78rem/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code code:empty::before {
  content: "The code shows up here as it’s written.";
  color: var(--dusk);
  font-family: var(--font);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 50;
  max-width: calc(100vw - 2rem);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.18s, transform 0.18s;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Banner on public pages (set in the admin console) ---------- */

.site-banner {
  padding: 0.6rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 550;
  text-align: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .page-builder {
    overflow: auto;
  }

  .builder {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }

  /* Let the panel's parts sit around the preview: header, preview, thread, then the change box. */
  .panel {
    display: contents;
  }

  .panel-head {
    order: 1;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .stage {
    order: 2;
    height: 72vh;
    height: 72dvh;
  }

  .toolbar {
    gap: 0.4rem;
    padding: 0.75rem;
  }

  /* The preview is already phone-sized here. */
  .seg[aria-label="Screen size"] {
    display: none;
  }

  .toolbar .btn {
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
  }

  .page-builder .toast {
    top: 1rem;
    bottom: auto;
    transform: translate(-50%, -0.75rem);
  }

  .page-builder .toast.is-on {
    transform: translate(-50%, 0);
  }

  .canvas {
    padding: 0 0.75rem 0.75rem;
  }

  .site-title {
    order: 3;
    margin-top: 1rem;
  }

  .thread {
    order: 4;
    flex: none;
    overflow: visible;
  }

  .change {
    position: sticky;
    bottom: 0;
    z-index: 5;
    order: 5;
  }
}

@media (max-width: 640px) {
  /* One tier per row, each with its own stretch of board. */
  .tiers {
    grid-auto-flow: row;
    row-gap: 1.25rem;
  }

  .tier {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 1rem;
  }

  .tier-art {
    grid-row: 1 / 4;
    align-self: start;
    height: 5rem;
  }

  .tier-art .tier-icon {
    --size: 4.25rem;
  }

  .tier-name {
    margin-top: 0.1rem;
  }
}

@media (max-width: 560px) {
  .topbar,
  .home,
  .wide {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .topbar nav {
    gap: 0.9rem;
  }

  /* Phones connect from the home page's holder section; the chip keeps just its icon. */
  .topbar .wallet-connect {
    display: none;
  }

  .topbar nav .wallet-chip {
    padding-right: 0.5rem;
  }

  .topbar nav .wallet-chip span {
    display: none;
  }

  .ask-row {
    align-items: stretch;
  }

  .ask-row .btn {
    width: 100%;
  }

  .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-building .mark .c1,
  .is-building .mark .c2,
  .is-building .mark .c3,
  .progress::before {
    animation: none;
  }

  .progress::before {
    width: 100%;
    opacity: 0.6;
  }

  .toast,
  .switch input,
  .switch input::after {
    transition: none;
  }
}
