@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&display=swap');

/* Normies design system — matches Beeple Everydays / normies.art:
   ink / paper / steel, sharp corners, wide tracking. */
:root {
  color-scheme: dark;
  --ink: #1a1b1c;
  --paper: #e3e5e4;
  --steel: #48494b;
  --bg: var(--ink);
  --bg-2: rgba(227, 229, 228, 0.04);
  --line: rgba(227, 229, 228, 0.14);
  --text: var(--paper);
  --muted: rgba(227, 229, 228, 0.6);
  --normie-off: #e3e5e4;
  --normie-on: #48494b;
  --ana-red: #e23b3b;
  --ana-cyan: #3ec8c8;
}

* { box-sizing: border-box; }

body.coldie {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: 'Chakra Petch', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--paper); color: var(--ink); }

.ed-header {
  text-align: center;
  padding: 46px 24px 10px;
}
.ed-title {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 6px;
}
.byline {
  margin: 8px 0 0;
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
}
.byline span { color: var(--paper); font-weight: 700; }
.rainbow {
  height: 2px;
  width: min(520px, 70%);
  margin: 18px auto 0;
  background: linear-gradient(to right,
    transparent, #48494b, #9aa0a8, #e3e5e4, #9aa0a8, #48494b, transparent);
}
.ed-sub {
  margin: 20px auto 0;
  max-width: 700px;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: .5px;
  color: var(--muted);
}

.view-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 28px 24px 6px;
  flex-wrap: wrap;
}
.view-toggle button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 9px 16px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.view-toggle button:hover { color: var(--paper); border-color: var(--paper); }
.view-toggle button.active {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
  font-weight: 600;
}

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .4px;
  line-height: 1.55;
  min-height: 1.55em;
  max-width: 640px;
  margin: 10px auto 0;
  padding: 0 24px;
}
body[data-mode="anaglyph"] .hint .red { color: var(--ana-red); font-weight: 600; }
body[data-mode="anaglyph"] .hint .cyan { color: var(--ana-cyan); font-weight: 600; }

.stage { padding: 18px 24px 8px; }

.pair-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
.single-view {
  display: none;
  justify-content: center;
}
body[data-mode="wiggle"] .pair-view,
body[data-mode="anaglyph"] .pair-view { display: none; }
body[data-mode="wiggle"] .single-view,
body[data-mode="anaglyph"] .single-view { display: flex; }

.card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 460px;
  justify-self: center;
  aspect-ratio: 5 / 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--normie-off);
  color: var(--normie-on);
  padding: 5% 6%;
  text-align: center;
}
.card-single {
  max-width: 560px;
  width: min(560px, 92vw);
  aspect-ratio: 1 / 1.18;
}

.card .frame-wrap {
  width: 78%;
  margin: 0 auto 12px;
}
.card-single .frame-wrap { width: 86%; }
.card .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--normie-on);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
  background: var(--normie-off);
  overflow: hidden;
}
.card .grid-img,
.wiggle img,
.anaglyph-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}
.card .c-brand {
  display: block;
  text-align: left;
  margin: 0 0 6px 1px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--normie-on);
  opacity: 0.6;
  text-transform: uppercase;
}
.card .c-id { font-size: 21px; font-weight: 700; letter-spacing: 0.05em; }
.card .c-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 5px;
}
.card a {
  color: inherit;
  text-decoration: none;
}
.card a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card .c-title .dot {
  margin: 0 8px;
  opacity: 0.45;
}

.wiggle {
  position: relative;
  width: 100%;
  height: 100%;
}
.wiggle img {
  position: absolute;
  inset: 0;
}
.wiggle-b {
  animation: wiggle var(--wiggle-ms, 360ms) steps(1, end) infinite;
}
@keyframes wiggle {
  0%, 49.999% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
body.paused .wiggle-b { animation-play-state: paused; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .wiggle-b { animation: none; opacity: 0; }
}

.anaglyph-img { display: none; }
body[data-mode="anaglyph"] .wiggle { display: none; }
body[data-mode="anaglyph"] .anaglyph-img { display: block; }
body[data-mode="wiggle"] .anaglyph-img { display: none; }

.tools {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
  padding: 4px 24px 28px;
  min-height: 36px;
}
.speed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.yf-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.speed input[type="range"] {
  width: 220px;
  accent-color: var(--paper);
  cursor: pointer;
}
.speed[hidden] { display: none; }
.link {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { color: var(--paper); }

.lore {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  border-top: 1px solid var(--line);
}
.lore .identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 20px;
}
.lore .pfp-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  padding: 5px;
  background: var(--bg-2);
}
.lore .pfp {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.lore h2 {
  margin: 28px 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.lore .identity h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 4px;
}
.lore p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: .3px;
  color: var(--muted);
}
.lore i { color: var(--paper); font-style: normal; font-weight: 500; }
.lore .pending {
  color: rgba(227, 229, 228, 0.38);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ed-footer {
  text-align: center;
  padding: 24px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(227, 229, 228, 0.4);
  border-top: 1px solid var(--line);
}
.ed-footer a { color: var(--muted); text-decoration: none; }
.ed-footer a:hover { color: var(--paper); }
.ed-footer .dot { margin: 0 10px; color: rgba(227, 229, 228, 0.25); }

@media (max-width: 700px) {
  .ed-title { font-size: 30px; letter-spacing: 3px; }
  .ed-header { padding: 30px 18px 8px; }
  .pair-view { gap: 10px; padding: 0; }
  .card { padding: 6% 5%; }
  .card .frame-wrap { width: 82%; }
  .card .c-id { font-size: 13px; letter-spacing: 0.04em; }
  .card .c-title { font-size: 10px; }
  .card .c-brand { font-size: 8px; }
  .lore { padding: 20px 18px 48px; }
}
