/* Round lp3, 2026-10-30: Contact us. After mochiboard.app/feedback.html: pick what it's about, then write.
   Mimo is the one warm focal point; the topic chips are form choices, so the blue-tint pill; Send is the solid
   blue primary. Light mode lifts the card with the hairline ring, dark mode with the surface step.
   Errors use the app's danger token: text 5.51:1 on white in light, 6.72:1 on surface in dark; the invalid
   field's border 4.66:1 and 6.11:1 on sunken. Field edges (line-control) are 3.06:1 and 4.22:1 on sunken. */
.contact-page { background: var(--color-canvas); }
.contact-page [hidden] { display: none !important; }
/* main stays full width: the footer reveals from under it. The column is 720px, set by the padding. The top
   padding is Mochiboard's gap under the header, as on the Help center: 91px, 84px from 900px, 54px on phones. */
.contact-main { box-sizing: border-box; min-height: 100vh; padding: 180px max(24px, calc((100% - 720px) / 2)) 96px; color: var(--color-ink); font-family: var(--font-sans); }
.contact-page :is(a, button, input, textarea):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.contact-hero { text-align: center; }
/* The live Mimo from Home (mimo-live.js): he blinks, breathes and follows the pointer with his eyes, and holds
   still under reduced motion. The still frame shows until the renderer is ready, or if WebGL isn't there. */
/* The frame has room around him for his outfits, so the box is larger than he looks and starts higher. */
.contact-mimo { position: relative; width: 160px; height: 160px; margin: -28px auto -8px; }
.contact-mimo img, .contact-mimo canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact-mimo canvas { opacity: 0; transition: opacity 0.3s var(--ease-out-soft); }
.contact-mimo.is-live canvas { opacity: 1; }
.contact-mimo.is-live img { visibility: hidden; }
.contact-hero h1 { margin: 0 0 14px; font: 600 clamp(38px, 5vw, 52px)/1.15 var(--font-serif); letter-spacing: 0; text-wrap: balance; }
.contact-lead { max-width: 560px; margin: 0 auto 40px; font-size: 18px; line-height: 1.6; color: var(--color-ink-2); text-wrap: balance; }

.contact-card { padding: 40px; border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-hairline); }
.contact-topics { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.contact-topics legend, .contact-field > label { display: block; margin: 0 0 12px; padding: 0; font: 600 16px/1.4 var(--font-sans); color: var(--color-ink); }
.contact-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-chip { position: relative; }
.contact-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.contact-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; box-sizing: border-box; border: 1px solid var(--color-line-control); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-ink); font: 500 15px/1.2 var(--font-sans); transition: background-color 0.15s var(--ease-out-soft); }
/* Each choice has an icon in the label's colour, so the picked one turns accent ink with it. */
.contact-chip svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.contact-chip:hover span { background: var(--color-surface-hover); }
.contact-chip input:checked + span { border-color: var(--color-accent-ink); background: var(--color-accent-soft); color: var(--color-accent-ink); }
.contact-chip input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.contact-field { margin-bottom: 24px; }
.contact-field > label { margin-bottom: 8px; }
.contact-hint { margin: -4px 0 8px; font-size: 14px; color: var(--color-ink-2); }
.contact-field textarea, .contact-field input { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--color-line-control); border-radius: 14px; background: var(--color-sunken); color: var(--color-ink); font: 400 16px/1.5 var(--font-sans); }
.contact-field textarea { min-height: 148px; padding: 14px 16px; resize: vertical; }
.contact-field input { height: 48px; padding: 0 16px; }
.contact-field :is(textarea, input)::placeholder { color: var(--color-ink-2); opacity: 1; }
.contact-field [aria-invalid="true"] { border-color: var(--color-danger); box-shadow: inset 0 0 0 1px var(--color-danger); }
.contact-error { margin: 8px 0 0; font-size: 14px; font-weight: 500; color: var(--color-danger); }
.contact-error:empty { display: none; }
.contact-actions { display: flex; justify-content: flex-end; }
.contact-send { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 26px; font-size: 16px; font-weight: 600; }
/* A paper plane doodle after the label (2026-11-01, in place of Mochiboard's ✦): the doodles' 48px grid,
   drawn at 20px with a 4 stroke (1.67px, near the label's 600 weight), in the label's colour. */
.contact-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.contact-mail { margin: 16px 0 0; font-size: 14px; font-weight: 500; color: var(--color-ink-2); text-align: center; }
.contact-mail a { color: var(--color-accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
#contact-form-note { margin: 0 0 24px; line-height: 1.6; }

/* Credit me: for ideas and bug reports. Mochiboard's panel is pale yellow; gold here is only for things you
   keep, so ours is a canvas panel with a hairline, and a note icon. */
.contact-credit { margin: 0 0 24px; padding: 20px; border: 1px dashed var(--color-line-control); border-radius: 16px; background: var(--color-canvas); min-width: 0; }
.contact-credit legend { float: left; display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 0; font: 600 16px/1.4 var(--font-sans); color: var(--color-ink); }
.contact-credit legend svg { width: 20px; height: 20px; fill: none; stroke: var(--color-ink-icon); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* The shooting star doodle (2026-11-01): 48px grid, 3.4 stroke, so it draws at the same weight as the 1.75
   icons; 24px because its open shape reads smaller than a box at 20. */
/* In the star loader's gold, as the stroke token (--color-star-stroke) since it's a line: 3.46:1 on the light
   canvas, 8.92:1 on the dark one. The loader's fill gold (#f2c94c) fails on light at 1.45:1. A user call
   (2026-11-01) past "gold is for keeping": the credit is a thank-you, the nearest thing here to a highlight. */
.contact-credit legend .contact-credit-star { width: 24px; height: 24px; stroke: var(--color-star-stroke); stroke-width: 3.4; }
/* It draws itself in each time the Credit box appears (the star 0.56s, then each trail line 0.15s, from the
   icon file), then keeps the hand-drawn boil: the line wobble steps every 143ms. Still and whole with reduced
   motion. */
@media (prefers-reduced-motion: no-preference) {
  .contact-credit-star g { filter: url(#contact-boil); }
  .contact-credit-star path { stroke-dasharray: 1; stroke-dashoffset: 1; animation-name: contact-draw; animation-timing-function: cubic-bezier(.65, .05, .36, 1); animation-fill-mode: forwards; }
}
@keyframes contact-draw { to { stroke-dashoffset: 0; } }
.contact-credit > p { clear: both; margin: 0; padding-top: 4px; font-size: 14px; line-height: 1.5; color: var(--color-ink-2); }
.contact-credit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.contact-credit .contact-field { margin: 0; }
.contact-credit .contact-field input { background: var(--color-surface); }
.contact-optional { font-weight: 400; color: var(--color-ink-2); }

.contact-sent { padding: 16px 0 8px; text-align: center; }
.contact-sent:focus { outline: none; }
.contact-sent svg { width: 40px; height: 40px; fill: none; stroke: var(--color-accent-ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.contact-sent h2 { margin: 12px 0 8px; font: 600 20px/1.35 var(--font-serif); letter-spacing: 0.01em; }
.contact-sent p { margin: 0 0 24px; font-size: 16px; line-height: 1.6; color: var(--color-ink-2); overflow-wrap: anywhere; }
.contact-sent strong { color: var(--color-ink); font-weight: 600; }
.contact-sent .button { min-height: 48px; padding: 0 24px; font-size: 16px; }
.contact-draft-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 24px; }
.contact-draft-label { display: block; margin-bottom: 8px; text-align: left; font-size: 15px; font-weight: 600; }
.contact-draft { width: 100%; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--color-line-control); border-radius: 14px; color: var(--color-ink); background: var(--color-sunken); font: 400 15px/1.6 var(--font-sans); resize: vertical; }
.contact-sent .contact-copy-status { margin: 12px 0 20px; font-size: 14px; }


@media (max-width: 900px) { .contact-main { padding-top: 164px; } }
@media (max-width: 700px) {
  .contact-main { padding: 134px 16px 64px; }
  .contact-mimo { width: 128px; height: 128px; margin: -22px auto -6px; }
  .contact-hero h1 { font-size: 36px; }
  .contact-lead { margin-bottom: 28px; font-size: 16px; }
  .contact-card { padding: 24px 20px; }
  .contact-chip { flex: 1 1 calc(50% - 4px); }
  .contact-chip span { justify-content: center; width: 100%; padding: 0 12px; text-align: center; }
  .contact-send { justify-content: center; width: 100%; }
  .contact-credit { padding: 16px; }
  .contact-credit-fields { grid-template-columns: 1fr; gap: 12px; }
}
