/* The Famonym app (sign-up and the editor), in Famonym Amethyst: Fraunces Soft for headings, Nunito for everything else. */
:root {
  --amethyst: #5b2a86; --amethyst-deep: #47206a; --amber: #e0a23a; --amber-deep: #8a5a0b; --ink: #1c1326; --ink-soft: #4a3f57;
  --paper: #f7f4fa; --soft: #ece4f3; --white: #ffffff; --line: #ddd5e6; --bad: #a3261b;
  --display: "Fraunces", Georgia, serif; --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; --softx: "SOFT" 100, "WONK" 0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); }
a { color: var(--amethyst); }
h1, h2, h3 { font-family: var(--display); font-variation-settings: var(--softx); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); background: var(--white); border-bottom: 1px solid var(--line); }
.mark { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); font-variation-settings: var(--softx); color: var(--ink); text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--amethyst); background: var(--amethyst); color: var(--white); font: 700 15px var(--body); cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--amethyst); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--amethyst); outline-offset: 2px; }
label { display: block; font-weight: 700; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=url], input[inputmode=numeric], select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 2px solid #85779a; border-radius: 10px; background: var(--white); color: var(--ink); font: 400 16px/1.4 var(--body); }
textarea { min-height: 140px; resize: vertical; }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.err { color: var(--bad); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--amethyst); flex: none; }

/* Sign-up */
.start { max-width: 460px; margin: 0 auto; padding: 48px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.start h1 { font-size: clamp(34px, 7vw, 48px); }
.start h1 span { color: var(--amethyst); }
.start .lead { color: var(--ink-soft); margin: 12px 0 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 16px; }
.small-print { font-size: 13px; color: var(--ink-soft); margin: 16px 0 0; }

/* Editor */
.ed { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); min-height: calc(100vh - 69px); }
.ed-form { background: var(--white); border-right: 1px solid var(--line); padding: 20px max(16px, env(safe-area-inset-left, 0px)) 40px 20px; display: grid; gap: 14px; align-content: start; overflow: auto; max-height: calc(100vh - 69px); }
.ed details { border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.ed details[open] { padding-bottom: 16px; }
.ed summary { cursor: pointer; padding: 14px 0; font: 800 19px/1.2 var(--display); font-variation-settings: var(--softx); }
.ed .field { margin-top: 12px; }
.ed .row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: end; margin-top: 8px; }
.ed .row button { min-height: 44px; }
.ed .photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ed .photos figure { margin: 0; display: grid; gap: 6px; }
.ed .photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 3px solid transparent; }
.ed .photos .main img { border-color: var(--amethyst); }
.ed .photos button { font: 700 12px var(--body); background: none; border: 0; color: var(--amethyst); cursor: pointer; text-align: left; padding: 0; }
.addr { display: flex; gap: 8px; align-items: center; }
.addr input { flex: 1; min-width: 0; }
.addr span { font-weight: 700; white-space: nowrap; }
.pubbar { position: sticky; bottom: 0; z-index: 2; background: var(--white); border-top: 1px solid var(--line); padding: 14px 0 16px; display: grid; gap: 8px; box-shadow: 0 -12px 16px -12px rgba(28, 19, 38, .18); }
.status { font-size: 14px; color: var(--ink-soft); min-height: 1.4em; }
.live a { font-weight: 700; overflow-wrap: anywhere; }
.ed-prev { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 40px 20px; min-width: 0; }
.prev-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.frame { background: var(--white); border-radius: 16px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 24px 50px -30px rgba(42, 16, 66, .45); margin: 0 auto; transition: max-width .2s ease; }
.frame.phone { max-width: 400px; }
@media (max-width: 900px) {
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-form { max-height: none; border-right: 0; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.pg { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; display: grid; gap: 10px; }
.pg-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
#prev-page { width: auto; min-height: 36px; padding: 4px 8px; }
