/* you are a pumpkin — styles.css */

@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070504;
  --bg-2: #0d0806;
  --ink: #f5e9d6;
  --ink-2: #cdbba3;
  --muted: #86735f;
  --line: rgba(245, 233, 214, 0.09);
  --line-2: rgba(245, 233, 214, 0.17);
  --orange: #ff7518;
  --ember: #ffa94d;
  --flame: #ffd27a;
  --deep: #b8420c;
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

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

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--orange);
  color: #170800;
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 1.5px solid var(--ember);
  outline-offset: 3px;
  border-radius: 6px;
}
svg {
  display: block;
}
.mono {
  font-family: var(--mono);
}
em {
  font-style: italic;
}

[hidden] {
  display: none !important;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- film grain ---------- */
.grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .grain {
    animation: none;
  }
}

/* ---------- custom cursor ---------- */
.cursor,
.cursor-ring,
.hold-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  will-change: transform;
}
.has-cursor.cursor-moved .cursor,
.has-cursor.cursor-moved .cursor-ring {
  opacity: 1;
}
.has-cursor,
.has-cursor * {
  cursor: none !important;
}
.cursor {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
}
.cursor::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255, 117, 24, 0.9);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.cursor .knife {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 44px;
  height: 44px;
  opacity: 0;
  transform: scale(0.6) rotate(-10deg);
  transform-origin: 4px 4px;
  transition: opacity 0.3s, transform 0.4s var(--ease);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(180, 200, 255, 0.25));
}
.cursor.knife-on::before {
  opacity: 0;
  transform: scale(0);
}
.cursor.knife-on .knife {
  opacity: 1;
  transform: none;
}
.cursor.knife-on.sawing .knife {
  animation: saw 0.14s linear infinite alternate;
}
@keyframes saw {
  from { transform: translate(-2px, -2px); }
  to { transform: translate(2px, 2px); }
}
.cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 169, 77, 0.4);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.35s, border-color 0.35s, opacity 0.3s;
}
.cursor-ring.hover {
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  background: rgba(255, 117, 24, 0.07);
  border-color: rgba(255, 169, 77, 0.7);
}
.has-cursor.knife-mode .cursor-ring {
  opacity: 0;
}
.hold-ring {
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  transform-origin: center;
  transition: opacity 0.25s;
}
.hold-ring.on {
  opacity: 1;
}
.hold-ring circle {
  fill: none;
  stroke: rgba(245, 233, 214, 0.14);
  stroke-width: 2;
}
.hold-ring .prog {
  stroke: var(--flame);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 6px rgba(255, 190, 90, 0.8));
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 16px;
  transition: background 0.5s, border-color 0.5s, opacity 1s var(--ease), transform 1s var(--ease), -webkit-backdrop-filter 0.5s, backdrop-filter 0.5s;
  border-bottom: 1px solid transparent;
}
body.is-intro .topbar,
body.is-carve .topbar {
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-style: italic;
  font-size: 23px;
  letter-spacing: -0.01em;
  justify-self: start;
  white-space: nowrap;
}
.brand-mark {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 10px rgba(255, 117, 24, 0.45));
  transition: transform 0.6s var(--ease);
}
.brand:hover .brand-mark {
  transform: rotate(-12deg) scale(1.08);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 7, 5, 0.42);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.status .sep {
  color: var(--muted);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.35; }
}
.status.flip span:not(.status-dot):not(.sep) {
  animation: flip 0.6s var(--ease);
}
@keyframes flip {
  0% { opacity: 0; transform: translateY(-60%); filter: blur(4px); }
  100% { opacity: 1; transform: none; filter: none; }
}
.status span {
  display: inline-block;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  background: rgba(12, 8, 6, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, transform 0.3s var(--ease);
  white-space: nowrap;
}
.chip svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.chip:hover {
  border-color: rgba(255, 117, 24, 0.6);
  box-shadow: 0 0 26px rgba(255, 117, 24, 0.18);
}
.chip:active {
  transform: scale(0.97);
}
.chip-k {
  color: var(--orange);
  font-weight: 700;
}
.ca-short {
  color: var(--ink-2);
}
.chip-buy {
  background: var(--orange);
  border-color: transparent;
  color: #1a0900;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(255, 117, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.chip-buy:hover {
  background: #ff8a3a;
  box-shadow: 0 0 34px rgba(255, 117, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: inline-grid;
  place-items: center;
  background: rgba(12, 8, 6, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s;
}
.icon-btn:hover {
  border-color: rgba(255, 117, 24, 0.6);
}
.icon-btn svg {
  width: 15px;
  height: 15px;
}
.social {
  color: var(--ink-2);
  transition: border-color 0.3s, color 0.3s;
}
.social:hover {
  color: var(--ink);
}
.bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}
.bars i {
  width: 2px;
  height: 100%;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: center;
  animation: bars 1.1s ease-in-out infinite;
}
.bars i:nth-child(2) { animation-delay: -0.3s; }
.bars i:nth-child(3) { animation-delay: -0.6s; }
.bars i:nth-child(4) { animation-delay: -0.9s; }
@keyframes bars {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}
.icon-btn[aria-pressed='false'] .bars i {
  animation: none;
  transform: scaleY(0.18);
  background: var(--muted);
}

/* ---------- stage (the pumpkin) ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
body.is-carve .stage,
body.is-free .stage {
  touch-action: none;
}
body.is-free .stage {
  cursor: grab;
}
#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* no WebGL: you are a photograph of a pumpkin */
body.no-world .stage {
  background: #000 url('../assets/poster.jpg') center 60% / cover no-repeat;
}
body.no-world #world {
  display: none;
}
body.dragging,
body.dragging * {
  cursor: grabbing !important;
}
.cursor-ring::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--flame);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s;
}
.cursor-ring.labeled::after {
  opacity: 1;
}
.cursor-ring.grab {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-color: rgba(255, 236, 205, 0.32);
}
body.dragging .cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-color: rgba(255, 210, 122, 0.8);
  background: rgba(255, 117, 24, 0.08);
}
.stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 130px),
    linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 150px),
    radial-gradient(120% 95% at 50% 48%, transparent 58%, rgba(0, 0, 0, 0.55) 100%);
}
.stage::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 28vh;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(7, 5, 4, 0.0) 60%, var(--bg));
  opacity: 0;
  transition: opacity 1.2s;
}
body.is-free .stage::after {
  opacity: 0.35;
}

.narration {
  position: absolute;
  left: 50%;
  top: var(--band-y, 50%);
  transform: translate(-50%, -50%);
  width: min(92vw, 1000px);
  text-align: center;
  display: grid;
  pointer-events: none;
  z-index: 5;
  transition: top 1.4s var(--ease-io);
}
.narration.snap {
  transition: none;
}
.narration .line {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 16px);
}
.narration .big {
  font-style: italic;
  font-size: max(20px, min(clamp(30px, 4.4vw, 66px), calc(var(--nar-h, 600px) * 0.37)));
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: #fbf1e2;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.95), 0 0 3px rgba(0, 0, 0, 0.9), 0 0 60px rgba(0, 0, 0, 0.6);
  text-wrap: balance;
}
.narration .sub {
  font-family: var(--mono);
  font-size: clamp(10.5px, 0.95vw, 12.5px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-shadow: 0 1px 14px #000, 0 0 2px #000;
  max-width: 56ch;
  line-height: 1.7;
  text-wrap: balance;
}
.narration .sub b {
  color: var(--flame);
  font-weight: 500;
}
.narration .w {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.3em);
  animation: wIn 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms);
}
.narration .sub.fade {
  opacity: 0;
  animation: subIn 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0.3s);
}
@keyframes wIn {
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes subIn {
  from { opacity: 0; transform: translateY(6px); letter-spacing: 0.3em; }
  to { opacity: 1; transform: none; }
}
.narration .line.out {
  animation: lineOut 0.55s var(--ease) forwards;
}
@keyframes lineOut {
  to { opacity: 0; filter: blur(10px); transform: translateY(-0.25em) scale(0.985); }
}
@media (prefers-reduced-motion: reduce) {
  .narration .w,
  .narration .sub.fade {
    animation-duration: 0.01s;
    animation-delay: 0s;
    filter: none;
  }
}

.carve-hint {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(48px, 12vh, 120px) + var(--badge));
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
}
.carve-hint.on {
  opacity: 1;
  transform: translateX(-50%);
}
.carve-ring {
  width: 26px;
  height: 26px;
  position: relative;
}
.carve-ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.carve-ring circle {
  fill: none;
  stroke: var(--flame);
  stroke-width: 2;
  stroke-dasharray: 107;
  stroke-dashoffset: 107;
  transform: rotate(-90deg);
  transform-origin: center;
  animation: ringFill 2.2s var(--ease-io) infinite;
}
.carve-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 14px var(--orange);
  animation: dotPress 2.2s var(--ease-io) infinite;
}
@keyframes ringFill {
  0% { stroke-dashoffset: 107; opacity: 1; }
  75% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes dotPress {
  0%, 100% { transform: scale(1); }
  10%, 75% { transform: scale(0.6); }
}

.skip {
  position: absolute;
  right: var(--gutter);
  bottom: calc(max(22px, env(safe-area-inset-bottom)) + var(--badge-corner));
  z-index: 7;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 4px;
  transition: color 0.3s, opacity 0.6s;
}
.skip:hover {
  color: var(--ink);
}
body:not(.is-intro):not(.is-carve) .skip {
  opacity: 0;
  pointer-events: none;
}

/* stay a minute and you get to see what it's really like */
.real-mode {
  position: absolute;
  left: 50%;
  bottom: calc(max(44px, calc(env(safe-area-inset-bottom) + 30px)) + var(--badge));
  transform: translate(-50%, 10px);
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 46px;
  padding: 0 8px 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 120, 0.42);
  background: rgba(14, 8, 5, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 0 0 rgba(255, 117, 24, 0.5);
}
.real-mode.on {
  opacity: 1;
  transform: translate(-50%, 0);
  animation: realPulse 2.4s var(--ease-io) 3;
}
.real-mode:hover {
  border-color: rgba(255, 190, 120, 0.8);
  box-shadow: 0 0 34px rgba(255, 117, 24, 0.35);
}
.real-mode svg {
  width: 16px;
  height: 16px;
  color: var(--flame);
}
.real-new {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--orange);
  color: #1a0900;
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.14em;
}
@keyframes realPulse {
  50% {
    box-shadow: 0 0 0 10px rgba(255, 117, 24, 0), 0 0 40px rgba(255, 117, 24, 0.45);
  }
}

/* realistic mode: exactly what a pumpkin sees */
.coconut {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  background: #000;
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  cursor: pointer;
}
.coconut.on {
  opacity: 1;
}
.coconut p {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(8px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.coconut.on p {
  opacity: 1;
  transform: none;
  filter: none;
}
.coco-big {
  font-style: italic;
  font-size: clamp(34px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #f4eadb;
}
.coconut.on .coco-big {
  transition-delay: 0.9s;
}
.coco-sub {
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.coconut.on .coco-sub {
  transition-delay: 2.3s;
}
.coco-back {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  translate: -50% 0;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.coconut.on .coco-back {
  transition-delay: 4.5s;
}
body.realistic .topbar,
body.realistic .cursor,
body.realistic .cursor-ring {
  opacity: 0 !important;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .real-mode.on {
    animation: none;
  }
  .coconut p {
    filter: none;
    transform: none;
  }
}

/* the one thing you can do */
.look-hint {
  position: absolute;
  left: 50%;
  bottom: calc(max(44px, calc(env(safe-area-inset-bottom) + 30px)) + var(--badge));
  transform: translate(-50%, 8px);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(10, 7, 5, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.look-hint.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.look-arrows {
  width: 34px;
  color: var(--flame);
}
.look-arrows svg {
  width: 100%;
  height: auto;
  animation: sway 2.6s var(--ease-io) infinite;
}
@keyframes sway {
  0%, 100% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .look-arrows svg {
    animation: none;
  }
}

.fine {
  position: absolute;
  left: 50%;
  bottom: calc(max(9px, env(safe-area-inset-bottom)) + var(--badge));
  transform: translateX(-50%);
  z-index: 6;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 233, 214, 0.42);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s 1s;
}
body.is-free .fine {
  opacity: 1;
}

.noscript {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: italic;
  font-size: 28px;
  padding: 24px;
  text-align: center;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(max(16px, env(safe-area-inset-top)) + 64px);
  z-index: 95;
  transform: translate(-50%, -14px);
  padding: 13px 20px;
  border-radius: 999px;
  background: rgba(20, 11, 6, 0.86);
  border: 1px solid rgba(255, 140, 50, 0.4);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 117, 24, 0.15);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* the whole contract address, when it couldn't be copied: tap to select */
.toast.pick {
  pointer-events: auto;
  -webkit-user-select: all;
  user-select: all;
  white-space: normal;
  word-break: break-all;
  border-radius: 16px;
  font-family: var(--mono);
  font-size: 11px;
}
.toast::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  vertical-align: 1px;
}

/* free hosting can put its own badge in the bottom-right corner (main.js
   spots it): on narrow screens everything at the bottom moves up out of its
   way; on wide ones only what sits in that corner does */
:root {
  --badge: 0px;
  --badge-corner: 0px;
}
html.host-badge {
  --badge-corner: 52px;
}
@media (max-width: 820px) {
  html.host-badge {
    --badge: 52px;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }
  /* where you are: its own line under the bar */
  .status {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    height: 30px;
    padding: 0 13px 0 11px;
    font-size: 9.5px;
    letter-spacing: 0.14em;
  }
}

@media (max-width: 820px) {
  .fine {
    font-size: 8px;
    letter-spacing: 0.1em;
    white-space: normal;
    width: calc(100vw - 32px);
    text-align: center;
  }
  .look-hint {
    bottom: calc(max(48px, calc(env(safe-area-inset-bottom) + 36px)) + var(--badge));
  }
}

@media (max-width: 640px) {
  .brand span {
    display: none;
  }
  .chip {
    height: 36px;
    padding: 0 12px;
    font-size: 11.5px;
  }
  .ca-chip .ca-short {
    display: none;
  }
  .skip {
    bottom: auto;
    top: max(18px, env(safe-area-inset-top));
  }
  .carve-hint {
    bottom: max(60px, 14vh);
  }
}

@media (max-width: 440px) {
  /* everything in the bar has to fit across a phone */
  .top-actions {
    gap: 6px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .chip {
    height: 34px;
    padding: 0 10px;
  }
}
@media (max-width: 360px) {
  .top-actions [data-chart-url] {
    display: none;
  }
}
@media (max-width: 340px) {
  .top-actions {
    gap: 4px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .chip {
    padding: 0 8px;
  }
}

/* phones turned sideways */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .narration .sub {
    font-size: 10px;
    line-height: 1.5;
  }
  .carve-hint {
    bottom: calc(28px + var(--badge));
  }
  .look-hint {
    bottom: calc(max(30px, env(safe-area-inset-bottom)) + var(--badge));
  }
}
