/* Palette lifted from the app's Theme.swift so the page a client opens looks
   like the app the post was written in, rather than an approximation of it. */
:root {
  --paper:    #FAF7EE;
  --card:     #FFFDF9;
  --ink:      #181009;
  --ink-soft: #726A5E;
  --accent:   #F75F4C;
  --muted:    #F0EDE5;
  --border:   #E4DECF;

  --accent-token: #F75F4C;
  --sky:   #6E8BA8;
  --sage:  #4F9A6E;
  --plum:  #8A6E9A;
  --gold:  #C9962F;
  --tan:   #EDDCC8;

  --card-radius:  22px;
  --field-radius: 12px;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", Menlo, ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px 16px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.shell { width: 100%; max-width: 560px; margin: auto; }

.card {
  background: var(--card);
  border: 1.25px solid var(--border);
  border-radius: var(--card-radius);
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(24,16,9,.04), 0 12px 32px -20px rgba(24,16,9,.28);
}

/* The accent stripe carries the post's own palette token, the same one the
   tile uses in the app. */
.card.accented { border-top: 4px solid var(--post-accent, var(--accent)); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.15;
  margin: 14px 0 0;
  letter-spacing: -.01em;
}

.caption {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 18px 0 0;
  color: var(--ink);
}

.meta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.muted { color: var(--ink-soft); margin: 0; }
.stack > * + * { margin-top: 10px; }

button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--field-radius);
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  width: 100%;
  transition: filter .15s ease, opacity .15s ease;
}
button:hover:not(:disabled) { filter: brightness(1.05); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pins { display: flex; gap: 8px; justify-content: center; margin: 22px 0 0; }
.pins input {
  width: 100%;
  max-width: 52px;
  aspect-ratio: 3 / 4;
  text-align: center;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink);
  background: var(--paper);
  border: 1.25px solid var(--border);
  border-radius: var(--field-radius);
}
.pins input:focus { border-color: var(--accent); }

.error   { color: var(--accent); font-weight: 500; margin: 16px 0 0; min-height: 1.5em; }
.center  { text-align: center; }
.spacer  { margin-top: 24px; }

.approved {
  display: flex; align-items: center; gap: 10px;
  margin-top: 24px; padding: 14px 16px;
  background: var(--muted);
  border-radius: var(--field-radius);
  color: var(--ink);
  font-weight: 600;
}
.approved .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sage); color: #fff;
  display: grid; place-items: center; font-size: 13px;
}

.footer { font-size: 13px; color: var(--ink-soft); }
.wordmark { font-family: var(--display); font-weight: 600; letter-spacing: .01em; }
.wordmark .hl { color: var(--accent); }

/* Gallery (KAN-82) — the post's own photos and videos, the thing a client is
   really being asked to approve. */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.tile {
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--muted);
  border: 1px solid var(--border);
}

.tile img,
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile.zoomable { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 16, 9, .82);
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
}
