@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..700;1,6..96,400..700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0708; --surface: #141012; --raised: #1b1518; --line: #2b2126; --line2: #3d2e36;
  --text: #f6eff2; --muted: #a5939b; --pink: #ff3d8f; --pink2: #ff7ab3; --blush: #ffd3e4;
  --ok: #6fd7a0; --warn: #f0c067; --bad: #f0687f;
  --serif: "Bodoni Moda", "Didot", Georgia, serif; --sans: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 16px; --shadow: 0 24px 60px -20px #000c;
  /* older names still used in markup */
  --hot: var(--pink); --rose: var(--pink2); --cream: var(--text); --pix: var(--sans); --glow: 0 0 0 1px #ff3d8f40, 0 10px 34px -8px #ff3d8f55;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--sans); scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(1100px 620px at 82% -12%, #ff3d8f1f, transparent 62%), radial-gradient(900px 600px at -8% 108%, #ff3d8f12, transparent 60%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--pink2); text-underline-offset: 3px; }
::selection { background: var(--pink); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 9px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; line-height: 1.08; margin: 0; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--pink2); }
.neon { color: var(--text); }
.pinktext { color: var(--pink2); }
.pix, .eyebrow { font: 600 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; } .hide { display: none !important; }

/* card */
.win { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.win > .bar { padding: 14px 20px; border-bottom: 1px solid var(--line); font: 600 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.win > .bar i { display: none; }
.pad { padding: 20px; }

.btn {
  font: 600 14px/1 var(--sans); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 12px 22px; background: var(--pink); transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: #ff5a9f; box-shadow: 0 10px 30px -10px #ff3d8faa; transform: translateY(-1px); }
.btn:active { transform: none; } .btn:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--pink2); outline-offset: 2px; }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--text); } .btn.ghost:hover { border-color: var(--pink2); background: #ff3d8f12; box-shadow: none; }
.btn.sm { font-size: 13px; padding: 8px 14px; }
.btn.ok { background: #6fd7a01f; border-color: #6fd7a066; color: var(--ok); } .btn.ok:hover { background: #6fd7a033; box-shadow: none; }
.btn.no { background: transparent; border-color: var(--line2); color: var(--muted); } .btn.no:hover { color: var(--bad); border-color: #f0687f88; background: transparent; box-shadow: none; }

input, select, textarea {
  width: 100%; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: 400 14px/1.4 var(--sans); outline: none; transition: border-color .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line2); }
input:focus, select:focus, textarea:focus { border-color: var(--pink2); }
input::placeholder, textarea::placeholder { color: #6f6067; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; padding: 0; accent-color: var(--pink); vertical-align: -3px; }
label { font: 600 11px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin: 16px 0 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .row > * { flex: 1; min-width: 0; } .row > .fit { flex: 0 0 auto; }

.tag { font: 600 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; border: 1px solid currentColor; display: inline-block; }
.tag.pending { color: var(--warn); } .tag.confirmed { color: var(--ok); } .tag.declined, .tag.cancelled, .tag.blocked { color: var(--bad); } .tag.block { color: var(--muted); } .tag.ai { color: var(--pink2); } .tag.human { color: var(--warn); }

/* chat bubbles */
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 18px; overflow-y: auto; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; position: relative; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
.msg.them { align-self: flex-start; background: var(--raised); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--pink); color: #fff; border-bottom-right-radius: 6px; }
.msg.her { align-self: flex-start; background: #f0c06714; border: 1px solid #f0c06744; border-bottom-left-radius: 6px; }
.msg small { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
.msg .say { position: absolute; right: -34px; bottom: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); background: var(--surface); color: var(--pink2); cursor: pointer; font-size: 12px; padding: 0; }
.msg .say:hover { border-color: var(--pink2); }
.typing { align-self: flex-start; font-size: 13px; color: var(--muted); padding: 2px 6px; } .typing b { animation: blink 1s infinite; } .typing b:nth-child(2) { animation-delay: .2s; } .typing b:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .15; } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; padding: 11px 18px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 14px; animation: rise .2s ease-out; }

.gate { position: fixed; inset: 0; z-index: 200; background: #050304e6; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(10px); overflow-y: auto; }
.gate .win { max-width: 420px; width: 100%; text-align: center; }
.chk { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; color: var(--muted); text-align: left; } .chk input { flex: 0 0 17px; margin-top: 2px; }

/* live call */
.callwin { max-width: 420px !important; text-align: left !important; overflow: hidden; }
.stage { position: relative; aspect-ratio: 2/3; max-height: 62dvh; margin: 0 auto; background: #000; overflow: hidden; }
.stage img, .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage img { filter: brightness(.55); animation: breathe 2.6s ease-in-out infinite; }
.call.on .stage img { display: none; }
@keyframes breathe { 50% { filter: brightness(.8); } }
.cstat { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #fff; font-size: 12px; }
.callbtn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }

/* character picker */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.char { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; aspect-ratio: 2/3; background: var(--raised); padding: 0; transition: border-color .15s, transform .15s; color: var(--text); }
.char:hover { transform: translateY(-2px); border-color: var(--line2); }
.char.on { border-color: var(--pink); box-shadow: 0 0 0 2px #ff3d8f55; }
.char img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char span { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 4px 6px; text-align: center; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(transparent, #000c); }
.char.add { display: grid; place-items: center; text-align: center; border-style: dashed; border-color: var(--line2); color: var(--muted); font: 500 12px/1.4 var(--sans); padding: 8px; }
.char.add:hover { color: var(--pink2); border-color: var(--pink2); }

/* either/or cards */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 560px) { .opts { grid-template-columns: 1fr; } }
.opt { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--raised); cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s; }
.opt:hover { border-color: var(--line2); } .opt.on { border-color: var(--pink); box-shadow: 0 0 0 2px #ff3d8f40; }
.opt b { display: block; font: 500 18px/1.2 var(--serif); margin-bottom: 4px; } .opt span { font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- motion & atmosphere ---------- */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none;
  background: radial-gradient(circle, #ff3d8f33, transparent 65%); animation: drift 26s ease-in-out infinite alternate;
}
body::before { top: -30vmax; right: -20vmax; }
body::after { bottom: -34vmax; left: -22vmax; animation-duration: 34s; animation-direction: alternate-reverse; background: radial-gradient(circle, #b0126022, transparent 65%); }
@keyframes drift { to { transform: translate(-9vmax, 7vmax) scale(1.15); } }

/* things rise into place as they appear */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.enter { animation: enter .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }

/* themed loading: a button that is working shows three pulsing beads instead of its label */
.btn { position: relative; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after, .beads {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: -12px 0 0 currentColor, 12px 0 0 currentColor; animation: beads 1s ease-in-out infinite;
}
.btn.loading::after { position: absolute; left: 50%; top: 50%; margin: -3px 0 0 -3px; color: #fff; }
.btn.ghost.loading::after, .btn.no.loading::after { color: var(--pink2); } .btn.ok.loading::after { color: var(--ok); }
.beads { display: inline-block; color: var(--pink2); margin: 0 14px; vertical-align: middle; }
@keyframes beads {
  0%, 100% { box-shadow: -12px 0 0 0 currentColor, 12px 0 0 -2px currentColor; opacity: .55; }
  50% { box-shadow: -12px 0 0 -2px currentColor, 12px 0 0 0 currentColor; opacity: 1; }
}

/* the heart that draws itself: used wherever something bigger is loading */
.heart { display: grid; place-items: center; gap: 14px; padding: 28px; color: var(--muted); font-size: 13px; text-align: center; }
.heart svg { width: 46px; height: 46px; overflow: visible; }
.heart path { fill: none; stroke: var(--pink); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 64; animation: draw 1.8s ease-in-out infinite; filter: drop-shadow(0 0 6px #ff3d8f88); }
@keyframes draw { 0% { stroke-dashoffset: 64; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -64; } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 150; transition: opacity .4s; } .boot.gone { opacity: 0; pointer-events: none; }

/* a thin pink line across the top whenever the app is talking to the server */
#net { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 400; pointer-events: none; opacity: 0; transition: opacity .3s; overflow: hidden; }
#net::before { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--pink), var(--blush), transparent); animation: sweep 1.1s ease-in-out infinite; }
body.busy #net { opacity: 1; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.skel { border-radius: 14px; height: 84px; margin-bottom: 10px; background: linear-gradient(100deg, var(--surface) 30%, #241a1f 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* switch */
.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 14px 0 0; text-transform: none; letter-spacing: 0; font: 400 14px/1.45 var(--sans); color: var(--text); }
.switch input { appearance: none; flex: 0 0 38px; width: 38px; height: 22px; border-radius: 99px; background: var(--line2); border: 0; padding: 0; position: relative; cursor: pointer; transition: background .2s; margin-top: 1px; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked { background: var(--pink); } .switch input:checked::after { transform: translateX(16px); }
.switch small { display: block; color: var(--muted); font-size: 12.5px; }

.card, .win, .char, .opt, .citem, .ev { transition: border-color .2s, transform .2s, box-shadow .2s, background .2s; }
.msg { animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
.toast { animation: toast .35s cubic-bezier(.2, 1.2, .3, 1); } @keyframes toast { from { transform: translate(-50%, 16px); opacity: 0; } }
.gate { animation: fade .25s; } .gate .win { animation: enter .35s cubic-bezier(.2, .8, .2, 1) both; } @keyframes fade { from { opacity: 0; } }
.btn:active { transform: scale(.97); }

.cstat { position: absolute; inset: 0; display: grid; place-items: center; bottom: auto; } .cstat .heart { color: #fff; }
/* six-digit code boxes */
.code { display: flex; gap: 8px; justify-content: center; margin: 18px 0 6px; direction: ltr; }
.code input { width: 46px; height: 56px; text-align: center; font: 500 26px var(--serif); padding: 0; border-radius: 12px; }
.code input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px #ff3d8f33; }

/* language bar */
.lang { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px 0 10px; height: 34px; border: 1px solid var(--line2); border-radius: 99px; color: var(--muted); cursor: pointer; transition: border-color .2s, color .2s; text-transform: none; letter-spacing: 0; background: #0a070899; backdrop-filter: blur(8px); }
.lang:hover { border-color: var(--pink2); color: var(--text); }
.lang svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.500; flex: 0 0 15px; }
.lang select { width: auto; border: 0; background: transparent; padding: 0 4px; font: 500 13px var(--sans); color: inherit; cursor: pointer; max-width: 124px; }
.lang select option { background: var(--raised); color: var(--text); }
.lang.float { position: fixed; left: 16px; bottom: 16px; z-index: 120; }
[dir=rtl] .logo { margin-right: 0; margin-left: auto; } [dir=rtl] .step.on, [dir=rtl] .citem.on { box-shadow: inset -2px 0 0 var(--pink); }
[dir=rtl] .msg .say { right: auto; left: -34px; } [dir=rtl] .bubble { left: auto; right: -28px; }
