/* Clay your pet (/clay). Plain page on the site's tokens; the form is one column at every width. */
/* `hidden` has to win over the display rules below. */
.clay [hidden] { display: none !important; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.clay { max-width: 640px; margin: 0 auto; padding: 8px var(--gutter) 0; }
.clay-intro { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; }
.clay-intro img { width: 120px; border-radius: var(--r-card); }
.clay-intro h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.clay-intro p { margin-top: 10px; color: var(--soft); }

.clay-form { margin-top: 32px; display: grid; gap: 12px; }
.clay-photo {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--accent) 50%, transparent); border-radius: var(--r-card); background: var(--card);
}
.clay-photo:focus-within { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.clay-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.clay-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.clay-photo-ask { display: grid; gap: 4px; text-align: center; color: var(--soft); padding: 16px; pointer-events: none; }
.clay-photo-ask strong { font: 400 1.375rem/1.1 var(--display); color: var(--accent); }
.clay-photo.has-photo .clay-photo-ask {
  position: absolute; bottom: 12px; padding: 6px 14px; border-radius: 999px; background: var(--card); font-size: 1rem;
}
.clay-photo.has-photo .clay-photo-ask strong { font: 600 1rem/1.2 var(--body); color: var(--ink); }

.clay-label { margin-top: 8px; font-weight: 600; }
.clay-input {
  min-height: 56px; padding: 0 16px; border: 0; border-radius: var(--r-button); background: var(--card); color: var(--ink);
  font: 400 1.125rem/1 var(--body); box-shadow: inset 0 0 0 2px var(--ledge);
}
.clay-input[aria-invalid='true'], .clay-consent.is-invalid { box-shadow: inset 0 0 0 3px var(--accent); }
.clay-consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 12px; border-radius: 16px; font-size: 1rem; color: var(--soft); }
.clay-consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.clay-form .btn { justify-content: center; margin-top: 4px; }
.clay-form .btn[aria-busy='true'] { cursor: progress; opacity: 0.85; }
.clay-msg { min-height: 1.5em; font-size: 1.0625rem; }
.clay-msg.is-error { font-weight: 600; color: var(--ink); }

.clay-done, .clay-closed { margin-top: 32px; padding: 24px; border-radius: var(--r-card); background: var(--card); }
.clay-done p, .clay-closed p { margin-top: 8px; color: var(--soft); }
.clay-done:focus { outline: none; }
.clay-photo-note { margin-top: 40px; }
.clay-photo-note h2 { font-size: 1.25rem; }
.clay-photo-note p { margin-top: 10px; color: var(--soft); font-size: 1rem; }

/* The clip page (/clip): the story-shaped stage, short enough that it and the buttons under it share one phone screen. */
.clip h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.clip-lede { margin-top: 10px; color: var(--soft); }
.clip-stage {
  position: relative; width: min(100%, calc((100vh - 280px) * 9 / 16)); width: min(100%, calc((100svh - 280px) * 9 / 16));
  aspect-ratio: 9 / 16; margin: 24px auto 0; scroll-margin-top: 12px;
  overflow: hidden; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 2px var(--ledge);
}
.clip-stage canvas, .clip-stage video { display: block; width: 100%; height: 100%; }
.clip-bar { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 15%, transparent); overflow: hidden; }
.clip-bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
/* The buttons stay in reach under the stage, however tall the screen. */
.clip-actions {
  position: sticky; bottom: 0; display: grid; gap: 10px; max-width: 420px; margin: 0 auto;
  padding: 16px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--ground);
}
.clip-actions .btn { justify-content: center; }
.clip-pick { position: relative; overflow: hidden; }
.clip-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.clip-pick:focus-within { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.clip-pick.is-quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--ledge); font: 600 1.125rem/1 var(--body); }
.clip .clay-msg { text-align: center; }
