/* tokens: paper #FCDE58 (sampled off the approved avatar's own background)
   ink #1C1611, roof #AE481D, wood #7A3E1B, sun #FE9815
   type: Gochi Hand (handwritten label/caption) + Red Hat Mono (CA/readout, real case)
   radius 0, no shadows, no gradients beyond the procedural paper grain */

@font-face {
  font-family: "Gochi Hand";
  src: url("assets/fonts/gochi-hand-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Mono";
  src: url("assets/fonts/red-hat-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Mono";
  src: url("assets/fonts/red-hat-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #fcde58;
  --ink: #1c1611;
  --roof: #ae481d;
  --wood: #7a3e1b;
  --sun: #fe9815;
  --hand: "Gochi Hand", cursive;
  --mono: "Red Hat Mono", ui-monospace, monospace;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}

body {
  min-height: 100dvh;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.paper {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  cursor: crosshair;
}

/* procedural paper grain, uniform across the whole page so no seam ever shows
   around any pasted element */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.house-wrap {
  position: absolute;
  left: 6%;
  bottom: 5%;
  width: clamp(180px, 40vmin, 480px);
  z-index: 2;
  pointer-events: none;
  user-select: none;
}
.house-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

canvas#scribbles {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
}

.readout {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 6;
  font-family: var(--hand);
  font-size: clamp(15px, 2vw, 19px);
  color: var(--ink);
  opacity: 0.75;
  transform: rotate(-2deg);
  pointer-events: none;
  text-align: right;
  line-height: 1.3;
}

.sound-toggle {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 6;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 0;
}
.sound-toggle:active { transform: translateY(1px); }

.hint {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 6;
  font-family: var(--hand);
  font-size: clamp(16px, 2.4vw, 21px);
  color: var(--ink);
  opacity: 0.65;
  pointer-events: none;
  white-space: nowrap;
}
.hint.is-hidden { display: none; }

.bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-top: 2px dashed rgba(28, 22, 17, 0.35);
  background: var(--paper);
  flex-wrap: wrap;
}

.caption {
  font-family: var(--hand);
  font-size: clamp(16px, 2.6vw, 22px);
  color: var(--ink);
  flex: 1 1 220px;
  min-width: 0;
}

.record {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ticker {
  font-family: var(--hand);
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--roof);
}

.sep {
  opacity: 0.5;
  font-family: var(--mono);
  font-size: 12px;
}

.ca {
  appearance: none;
  border: 2px solid var(--ink);
  background: #fff6d8;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(11px, 1.6vw, 13px);
  letter-spacing: 0.01em;
  padding: 7px 10px;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
}
.ca:hover { background: #fff0b8; }
.ca:active { transform: translateY(1px); }

.credit {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}
.credit a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1px;
}
.credit a:hover { color: var(--roof); border-color: var(--roof); }

@media (max-width: 640px) {
  .bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .house-wrap { left: 50%; transform: translateX(-50%); }
  .readout { font-size: 12px; max-width: 40vw; }
  .hint { top: 64px; font-size: 14px; max-width: 84vw; white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}


/* сеть и площадка вместо Solana и pump.fun (07.09.2026), той же детской рукой */
.net {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  opacity: 0.6;
}
