/* Shared styles for the fun generators (/name, /dream). Phone-first. */
:root {
  --bg: #f6f2f1; --panel: #fffcfb; --ink: #2b2230; --muted: #6c6170; --line: #e7dfdf;
  --accent: #a3456a; --accent-soft: #f6e3ea; --gold: #c99a4a;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); }
body { min-height: 100dvh; background:
  radial-gradient(900px 500px at 110% -10%, #f3d9e3 0%, transparent 60%),
  radial-gradient(700px 500px at -20% 10%, #efe4d6 0%, transparent 55%), var(--bg); }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; max-width: 560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 17px; min-height: 44px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top .other { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; min-height: 44px; display: flex; align-items: center; }
main { max-width: 560px; margin: 0 auto; padding: 4px 18px calc(28px + env(safe-area-inset-bottom)); }
.view[hidden] { display: none !important; }
.kicker { margin: 6px 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
h1 { font-family: var(--display); font-size: clamp(32px, 9vw, 44px); line-height: 1.02; letter-spacing: -0.025em; margin: 0 0 10px; text-wrap: balance; }
.sub { margin: 0 0 20px; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.card { background: var(--panel); border-radius: 22px; padding: 18px; box-shadow: 0 18px 50px rgba(43,34,48,.10); display: flex; flex-direction: column; gap: 14px; }
label.lbl { font-weight: 600; font-size: 15px; display: block; margin-bottom: 6px; }
input.big { width: 100%; font: 600 24px/1.2 var(--display); letter-spacing: -0.01em; padding: 14px 16px; min-height: 58px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s; }
input.big:focus { border-color: var(--accent); }
input.big::placeholder { color: #c4b8bd; font-weight: 500; }
.linkbtn { background: none; border: 0; color: var(--accent); font: 600 15px var(--body); padding: 10px 0; min-height: 44px; cursor: pointer; text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 600 15px var(--body); padding: 10px 16px; min-height: 44px; border-radius: 99px; cursor: pointer; transition: all .15s; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.03); }
.cta { appearance: none; border: 0; width: 100%; background: linear-gradient(135deg, #b44f78, #8f3a5c); color: #fff; font: 700 18px var(--body); padding: 17px 20px; min-height: 58px; border-radius: 99px; cursor: pointer; box-shadow: 0 12px 28px rgba(163,69,106,.35); transition: transform .12s; }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .55; }
.btn2 { appearance: none; width: 100%; background: #fff; color: var(--ink); border: 1.5px solid var(--line); font: 600 16px var(--body); padding: 14px 18px; min-height: 52px; border-radius: 99px; cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; }
.fine { color: var(--muted); font-size: 13px; text-align: center; margin: 2px 0 0; }
.err { background: #fbe8da; color: #8a4116; border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 15px; }
.err[hidden] { display: none; }
/* progress */
.loading { text-align: center; padding: 40px 10px 20px; }
.orb { width: 132px; height: 132px; margin: 10px auto 26px; border-radius: 50%; position: relative;
  background: conic-gradient(from 0deg, #f3c6d6, #f7e3c0, #cfe0f1, #e5d4f3, #f3c6d6); animation: spin 3.2s linear infinite; filter: blur(.3px); box-shadow: 0 20px 60px rgba(163,69,106,.25); }
.orb::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg); }
.orb span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; z-index: 1; animation: spin 3.2s linear infinite reverse, bob 1.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { translate: 0 -6px; } }
.loading h2 { font-family: var(--display); font-size: 26px; margin: 0 0 8px; letter-spacing: -0.015em; }
.msg { color: var(--muted); font-size: 17px; min-height: 26px; transition: opacity .3s; }
.bar { height: 8px; background: #eadfe2; border-radius: 99px; overflow: hidden; margin: 22px auto 0; max-width: 300px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d97aa0, #a3456a); border-radius: 99px; transition: width .6s ease-out; }
/* results */
.result { display: flex; flex-direction: column; gap: 14px; animation: rise .5s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.preview { width: 100%; border-radius: 22px; box-shadow: 0 22px 60px rgba(43,34,48,.22); display: block; background: #eadfe2; aspect-ratio: 9 / 16; object-fit: cover; }
.actions { display: grid; gap: 10px; }
.share { display: flex; align-items: center; justify-content: center; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 99px; font-weight: 600; font-size: 15px; z-index: 9; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast[hidden] { display: none; }
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.examples a { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 9/14; position: relative; box-shadow: 0 8px 20px rgba(43,34,48,.12); }
.examples img { width: 100%; height: 100%; object-fit: cover; display: block; }
.examples b { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; color: #fff; font: 700 15px var(--display); background: linear-gradient(transparent, rgba(30,20,28,.7)); }
.exhead { margin: 26px 0 0; font: 700 13px var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.more { margin-top: 26px; text-align: center; }
.more a { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
