/* ONE — museum-quiet chrome around a living canvas. */

:root {
  --paper: #faf9f6;
  --ink: #211f1c;
  --ink-soft: #8b867d;
  --hairline: #e4e1da;
}

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

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  overflow: hidden;
}

#art {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#art.panning { cursor: grabbing; }

.hidden { display: none !important; }

/* ------------------------------------------------------------- chrome */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 36px;
  pointer-events: none;
}
header nav { pointer-events: auto; display: flex; gap: 10px; }

.wordmark h1 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .45em;
}
.tagline {
  margin-top: 6px;
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-soft);
  letter-spacing: .06em;
}

footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 22px 36px;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: .08em;
  pointer-events: none;
}

.empty {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}
.empty p { font-size: 19px; font-style: italic; }
.empty .sub { font-size: 13.5px; font-style: normal; color: var(--ink-soft); letter-spacing: .05em; }

/* ------------------------------------------------------------ buttons */
button {
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .12em;
  cursor: pointer;
  border-radius: 999px;
  transition: all .18s ease;
}
button.ghost {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 9px 20px;
}
button.ghost:hover { border-color: var(--ink); }
a.navlink {
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .12em;
  padding: 9px 20px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  transition: border-color .18s ease;
}
a.navlink:hover { border-color: var(--ink); }
button.solid {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper);
  padding: 12px 26px;
  width: 100%;
}
button.solid:hover { opacity: .85; }
button.solid.armed {
  background: #8c2f22;
  border-color: #8c2f22;
}
button.close { border: none; color: var(--ink-soft); margin-top: 4px; }
button.close:hover { color: var(--ink); }

/* ---------------------------------------------------------- overlays */
.veil {
  position: fixed;
  inset: 0;
  background: rgba(250, 249, 246, .82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.composer {
  position: fixed;
  inset: 0;
  background: rgba(250, 249, 246, .82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.card {
  width: min(400px, calc(100vw - 40px));
  background: var(--paper);
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 70px rgba(30, 25, 15, .13);
  padding: 34px 34px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card h2 {
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .14em;
}
.card .note {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  font-style: italic;
}

.card form { display: flex; flex-direction: column; gap: 12px; }

.providers { display: flex; flex-direction: column; gap: 9px; }
.provider {
  display: block;
  padding: 10px 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .1em;
  transition: border-color .18s ease;
}
.provider:hover { border-color: var(--ink); }
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-style: italic;
  letter-spacing: .08em;
  margin-top: 4px;
}
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--hairline); }
.card input {
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  outline: none;
  text-align: center;
  letter-spacing: .04em;
}
.card input:focus { border-color: var(--ink-soft); }

.error {
  font-size: 12.5px;
  color: #8c2f22;
  min-height: 1em;
  letter-spacing: .03em;
}

/* ------------------------------------------------------------- picker */
.picker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
#picker { cursor: crosshair; touch-action: none; max-width: 100%; height: auto; }
.composer .card { width: min(470px, calc(100vw - 40px)); }
.picker-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#swatch {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: #6a8fd0;
}
#hex {
  width: 84px;
  font-size: 13px !important;
  padding: 8px 6px !important;
}

footer .hint { opacity: .55; font-style: italic; }

/* -------------------------------------------------------------- about */
.about-card {
  width: min(560px, calc(100vw - 40px));
  text-align: left;
  max-height: min(80vh, 640px);
  overflow-y: auto;
}
.about-card h2 { text-align: center; }
.prose p {
  font-size: 14.5px;
  line-height: 1.85;
  margin-bottom: 4px;
  letter-spacing: .01em;
}
.prose .closing {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* -------------------------------------------------------------- toast */
.toast {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 34px rgba(30, 25, 15, .12);
  padding: 13px 26px;
  font-size: 13.5px;
  font-style: italic;
  letter-spacing: .05em;
  z-index: 15;
  white-space: nowrap;
}

@media (max-width: 520px) {
  header { padding: 20px; }
  footer { gap: 14px; font-size: 11px; flex-wrap: wrap; }
  .picker-row { flex-direction: column; }
}
