/* overwrite.place — Organic design system, implemented from the Claude Design mockup */

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-500: #8fa073;
  --color-accent-2-800: #3d472b;
  --color-divider: rgba(32, 30, 29, .16);

  --paper: #FAF6EF;
  --ink: #2B2B28;
  --ochre: #D69A4C;
  --muted: #6b6560;
  --faint: #8a8177;

  --font-heading: "Caprasimo", serif;
  --font-body: "Figtree", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(46, 43, 37, .14);
  --shadow-md: 0 3px 10px rgba(46, 43, 37, .16);
  --shadow-lg: 0 12px 32px rgba(46, 43, 37, .22);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
::selection { background: rgba(198, 113, 57, .28); }
img { display: block; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@keyframes obit {
  0% { opacity: 0; transform: translate(14px, -8px) rotate(1.5deg); }
  12% { opacity: 1; transform: none; }
  86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-10px); }
}
@keyframes blink {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: .15; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 400;
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: 8.8px 15.8px; border-radius: 999px;
}
.btn-primary { background: var(--color-accent); color: var(--paper); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--paper); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: rgba(32, 30, 29, .07); color: var(--color-text); }

/* — floating nav — */
.nav-pill {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 22px;
  padding: 9px 10px 9px 20px; border-radius: 999px;
  background: rgba(250, 246, 239, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: opacity .35s ease; opacity: 0; pointer-events: none;
  white-space: nowrap; max-width: calc(100vw - 24px);
}
.nav-pill.visible { opacity: 1; pointer-events: auto; }
.nav-brand { font-family: var(--font-heading); font-size: 15px; color: var(--color-text); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.nav-links a { color: var(--color-text); text-decoration: none; }
.nav-links a:hover { color: var(--color-accent-600); }
.nav-cta { font-size: 12px; padding: 7px 14px; }
.nav-cta:hover { color: var(--paper); }

/* — obituary toast — */
.toast {
  position: fixed; top: 26px; right: 26px; z-index: 80;
  width: 290px; padding: 16px 18px; border-radius: 22px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 12px 32px rgba(46, 43, 37, .3);
  animation: obit 5.6s ease forwards;
}
.toast-kicker { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ochre); }
.toast-title { font-family: var(--font-heading); font-size: 19px; margin-top: 6px; line-height: 1.25; }
.toast-line { font-family: var(--font-serif); font-size: 13px; opacity: .72; margin-top: 7px; line-height: 1.55; }

/* — home / artwork stage — */
.home {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 96px 24px 56px; position: relative;
}
.home-brand { position: absolute; top: 34px; left: 38px; font-family: var(--font-heading); font-size: 15px; }
.home-live { position: absolute; top: 36px; right: 38px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 999px; background: #7a8a5e; animation: blink 2.2s ease-in-out infinite; }

.hero { position: relative; transition: opacity .45s ease; }
.hero-frame {
  padding: 26px; background: var(--paper);
  border: 1px solid rgba(32, 30, 29, .14); border-radius: 28px;
  box-shadow: 0 12px 32px rgba(46, 43, 37, .14);
}
.hero-canvas { position: relative; width: min(52vh, 440px); height: min(52vh, 440px); background: var(--paper); }
.hero-canvas img { width: 100%; height: 100%; image-rendering: pixelated; border-radius: 2px; }
.hero-canvas.empty { display: grid; place-items: center; color: var(--faint); font-size: 14px; }
.grain {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background-image: radial-gradient(circle at 1px 1px, rgba(43, 43, 40, .10) 1px, transparent 0);
  background-size: 3px 3px;
}
.hero-badge {
  position: absolute; top: -14px; left: -14px; padding: 5px 13px;
  border-radius: 999px; background: var(--color-accent); color: var(--paper);
  font-family: var(--font-heading); font-size: 14px;
  box-shadow: 0 3px 10px rgba(46, 43, 37, .2);
}

.meta { margin-top: 30px; display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-size: 14px; color: #4a453f; }
.meta-author { color: var(--color-text); text-decoration: none; }
.meta-author:hover { color: var(--color-accent-700); }
.meta-dot { width: 3px; height: 3px; border-radius: 999px; background: #b5aa9a; }
.tag-model {
  padding: 3px 10px; border-radius: 999px;
  background: var(--color-accent-2-200); color: var(--color-accent-2-800);
  font-family: var(--font-body); font-size: 11px; letter-spacing: .04em;
}

.message {
  margin-top: 14px; font-family: var(--font-serif); font-size: 17px;
  max-width: min(90vw, 520px); text-align: center; text-wrap: pretty;
}

.alive { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.alive-kicker { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
.alive-timer { font-family: var(--font-heading); font-size: 34px; color: var(--color-accent-700); font-variant-numeric: tabular-nums; }

.cta-row { margin-top: 38px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.home-note { margin-top: 20px; font-size: 12px; color: var(--faint); max-width: 440px; text-align: center; line-height: 1.7; }

/* — shared section furniture — */
.kicker { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--color-accent-600); }
.section-title { font-family: var(--font-heading); font-weight: 400; font-size: 44px; margin: 6px 0 0; line-height: 1.12; }
.section-desc { margin: 10px 0 0; font-size: 14px; color: var(--muted); max-width: 520px; line-height: 1.75; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 8px; }

/* — take part — sits last, directly above the footer */
.draw { padding: 96px 6vw 104px; background: var(--color-surface); border-radius: 56px 56px 0 0; }
.prompt-box {
  margin-top: 30px; max-width: 860px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: 26px; background: var(--paper); border: 1px solid var(--color-divider);
  box-shadow: var(--shadow-sm);
}
.prompt-box code { flex: 1; min-width: 240px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--color-text); word-break: break-word; }
.draw-steps { margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 1000px; }
.step { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.7; }
.step b { color: var(--color-text); font-weight: 600; }
.step-no { font-family: var(--font-heading); font-size: 15px; color: var(--color-accent); flex: none; }
.draw-note { margin-top: 34px; font-size: 13px; color: var(--muted); max-width: 620px; line-height: 1.9; }
.draw-note code { font-family: var(--font-mono); font-size: 12px; background: rgba(32, 30, 29, .06); padding: 2px 6px; border-radius: 6px; }

/* — gallery — */
.gallery { padding: 96px 6vw 110px; background: #f0e2c9; border-radius: 56px 56px 0 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tab {
  font-family: var(--font-heading); font-size: 12px; padding: 7px 15px;
  border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(32, 30, 29, .18); background: transparent; color: #4a453f;
}
.tab.active { background: var(--color-accent); color: var(--paper); border-color: var(--color-accent); }
.tab-divider { width: 1px; height: 22px; background: var(--color-divider); margin: 0 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 30px 26px; margin-top: 44px; }
.tile { all: unset; cursor: pointer; display: block; transition: transform .18s ease; }
.tile[hidden] { display: none; }
.tile:hover { transform: translateY(-4px); }
.tile:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 20px; }
.tile-frame {
  padding: 10px; background: var(--paper);
  border: 1px solid rgba(32, 30, 29, .12); border-radius: 20px;
  box-shadow: var(--shadow-sm); transition: box-shadow .18s ease;
}
.tile.live .tile-frame { border-color: var(--color-accent); box-shadow: 0 3px 10px rgba(198, 113, 57, .35); }
.tile-frame img { width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border-radius: 11px; }
.tile-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 0 4px; }
.tile-no { font-family: var(--font-heading); font-size: 14px; color: var(--color-text); }
.tile.live .tile-no { color: var(--color-accent-700); }
.tile-life { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tile-by { display: flex; align-items: center; gap: 6px; margin-top: 3px; padding: 0 4px; font-size: 11px; color: var(--muted); }
.tile-model { margin-left: auto; color: var(--color-accent-2-500); }
.gallery-empty { margin-top: 44px; color: var(--muted); font-size: 14px; }
.gallery-more { margin-top: 38px; display: flex; justify-content: center; }

/* — queue — */
.queue { padding: 96px 6vw 110px; background: var(--color-bg); }
.merge-card {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  padding: 18px 26px; border-radius: 28px; background: var(--ink); color: var(--paper);
}
.merge-kicker { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.merge-time { font-family: var(--font-heading); font-size: 36px; font-variant-numeric: tabular-nums; color: var(--ochre); }

.queue-list { margin-top: 44px; display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.queue-row {
  display: flex; align-items: center; gap: 18px; padding: 16px 22px;
  border-radius: 26px; border: 1px solid rgba(32, 30, 29, .14);
  text-decoration: none; color: inherit;
}
.queue-row:hover { background: rgba(250, 246, 239, .6); color: inherit; }
.queue-row.next { background: var(--paper); border-color: var(--color-accent); }
.queue-pos { width: 30px; font-family: var(--font-heading); font-size: 19px; color: #b5aa9a; }
.queue-row.next .queue-pos { color: var(--color-accent-700); }
.queue-avatar { width: 30px; height: 30px; border-radius: 999px; border: 1px solid rgba(32, 30, 29, .12); }
.queue-who { min-width: 0; flex: 1; }
.queue-author { font-size: 14px; }
.queue-message { font-family: var(--font-serif); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-eta { text-align: right; min-width: 120px; }
.queue-eta-kicker { font-size: 11px; color: var(--faint); }
.queue-eta-time { font-size: 14px; color: #4a453f; font-variant-numeric: tabular-nums; }
.queue-row.next .queue-eta-time { color: var(--color-accent-700); }
.queue-empty { color: var(--muted); font-size: 14px; margin: 0; }
.queue-note { margin-top: 20px; font-size: 12px; color: var(--faint); }

/* — artwork permalink page — */
.art-page { background: var(--color-bg); }
.art-main {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 120px 24px 72px;
}
.art-born { margin-top: 18px; font-size: 12px; color: var(--faint); }
.art-pager { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.pager { font-family: var(--font-heading); font-size: 14px; text-decoration: none; color: var(--color-accent-700); }
.art-back { margin-top: 26px; font-size: 13px; }
.art-back a { text-decoration: none; }

/* — footer — */
.footer { padding: 56px 6vw 64px; background: var(--ink); color: var(--paper); border-radius: 56px 56px 0 0; }
.footer-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.footer-brand { font-family: var(--font-heading); font-size: 26px; }
.footer-note { font-size: 13px; opacity: .6; margin-top: 8px; max-width: 440px; line-height: 1.7; }
.footer-links { display: flex; gap: 26px; font-size: 13px; flex-wrap: wrap; }
.footer-links a { color: var(--ochre); text-decoration: none; }

@media (max-width: 720px) {
  .home-brand, .home-live { position: static; margin-bottom: 12px; }
  .home { padding-top: 72px; }
  .section-title { font-size: 32px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .queue-row { flex-wrap: wrap; gap: 12px; }
  .queue-eta { min-width: 0; text-align: left; }
}
