/* Maros "Get matched" chat (/enquire/): the page people reach from the Instagram bio.
   Palette "Rust & Bone" and the site's own fonts (styles.css has the same tokens). No build step. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Michroma"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/michroma-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans"); size-adjust: 112.8%; ascent-override: 93%; descent-override: 31%; line-gap-override: 9%; }

:root {
  --bone: #F3ECE2;
  --basalt: #14110F;
  --rust: #B4532A;
  --rust-deep: #984421;
  --clay: #D9B79A;
  --white: #FFFFFF;

  --panel: #201B18;
  --line: #2F2925;
  --edge: #5E554E;
  --muted: rgba(243, 236, 226, .74);
  --warn: #F2A57E;

  --font-sans: "Poppins", "Poppins Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-label: "Michroma", "Poppins", "Poppins Fallback", Arial, sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--basalt); color: var(--bone); }
body { font-family: var(--font-sans); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
picture { display: contents; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.logo { display: inline-flex; align-items: center; padding-block: 8px; color: inherit; text-decoration: none; }
.logo svg { width: auto; height: 17px; }

/* ---------- Intro: the promise, the room picture, Start ---------- */
.intro {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) max(20px, env(safe-area-inset-bottom));
  background: var(--bone); color: var(--basalt);
  transition: opacity .45s ease, transform .45s ease;
}
.intro.is-gone { opacity: 0; transform: scale(1.03); pointer-events: none; }
.intro__top, .intro__frame, .intro__bottom { flex: none; width: 100%; max-width: 520px; margin-inline: auto; }
.intro__frame { flex: 1 1 auto; min-height: 200px; overflow: hidden; border-radius: 16px; background: #CDB49C; }
.intro__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 92%; }
.intro .logo { color: var(--basalt); }
.intro .logo svg { height: 18px; }
.intro__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* The three languages (i18n/build.py writes this list, with the class names of the site's footer list). */
.footer-lang ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 14px; margin: 0; padding: 0; list-style: none; font-size: .8125rem; line-height: 1.2; }
.footer-lang__opt { display: inline-flex; align-items: center; min-height: 40px; color: inherit; text-decoration: none; white-space: nowrap; }
a.footer-lang__opt { color: #5F564E; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(20, 17, 15, .3); }
a.footer-lang__opt:hover { color: var(--basalt); }
.footer-lang__opt--current { font-weight: 600; }
.intro h1 { margin: 18px 0 10px; font-size: clamp(2rem, 8.6vw, 3rem); font-weight: 500; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.intro p { margin: 0; font-size: 1rem; line-height: 1.5; color: #4A423C; }
.start {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 16px;
  border: 0; border-radius: 12px; background: var(--basalt); color: var(--bone);
  font-family: var(--font-label); font-size: .875rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
.start:disabled { opacity: .55; cursor: default; }
.start:focus-visible { outline-color: var(--rust); }
.intro .intro__small { margin-top: 12px; text-align: center; font-family: var(--font-label); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--basalt); }
.intro .intro__noscript { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #E8DED1; font-size: .875rem; }
.intro .intro__disclaimer { margin-top: 12px; text-align: center; font-size: .75rem; line-height: 1.45; color: #5F564E; }

/* ---------- The chat ---------- */
.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: 560px; margin: 0 auto; }
.bar { position: sticky; top: 0; z-index: 5; padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px; background: var(--basalt); border-bottom: 1px solid var(--line); }
.bar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar__tag { font-family: var(--font-label); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bar__progress { height: 2px; margin-top: 8px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar__progress i { display: block; width: 0; height: 100%; background: var(--clay); transition: width .5s ease; }

.chat { flex: 1; padding: 24px var(--gutter) 28px; }
.log { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: flex-end; gap: 10px; animation: rise .35s ease both; }
.row--me { justify-content: flex-end; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--rust); box-shadow: inset -6px -4px 0 rgba(126, 53, 25, .65); }
.row--me .avatar { display: none; }
.bubble {
  max-width: 84%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px;
  background: var(--panel); font-size: 1rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
}
.row--me .bubble { border-color: var(--rust); border-radius: 18px 18px 6px 18px; background: var(--rust); color: var(--white); }
.bubble--lead { font-size: 1.25rem; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.bubble--note { border-style: dashed; background: transparent; font-size: .8125rem; color: var(--muted); }
.bubble--answer { border-color: rgba(217, 183, 154, .35); }
.typing { display: inline-flex; gap: 4px; padding: 16px 18px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- The dock: choices, cards, the text field, consent ---------- */
.dock { position: sticky; bottom: 0; z-index: 4; padding: 12px var(--gutter) max(16px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--basalt) 86%, rgba(20, 17, 15, 0)); }
.check { display: none; margin-bottom: 10px; }
.check.is-shown { display: block; }
.check-note { margin: 0 0 8px; font-size: .8125rem; color: var(--muted); }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 13px 16px;
  border: 1px solid var(--edge); border-radius: 12px; background: transparent; text-align: left; font-size: 1rem; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice:hover, .choice:focus-visible { border-color: var(--clay); background: rgba(217, 183, 154, .08); outline: none; }
.choice__key { flex: none; font-family: var(--font-label); font-size: .6875rem; color: var(--clay); }
.choice:disabled { opacity: .5; cursor: default; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.card {
  padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 14px; background: var(--bone); color: var(--basalt);
  text-align: left; cursor: pointer; transition: border-color .15s, transform .15s;
}
.card:hover, .card:focus-visible { border-color: var(--clay); outline: none; transform: translateY(-2px); }
.card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #ECE4D9; }
.card__name { display: block; padding: 10px 12px 2px; font-weight: 600; font-size: .9375rem; }
.card__text { display: block; padding: 0 12px 12px; font-size: .8125rem; line-height: 1.4; color: #5F564E; }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.field {
  flex: 1; min-width: 0; min-height: 52px; max-height: 148px; padding: 13px 15px; resize: none; outline: none;
  border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); font-size: 1rem; line-height: 1.45;
}
.field:focus { border-color: var(--clay); }
.field::placeholder { color: rgba(243, 236, 226, .55); }
.send {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 12px;
  background: var(--rust); color: var(--white); cursor: pointer;
}
.send:disabled { opacity: .45; cursor: default; }
.skip { margin-top: 6px; padding: 8px 2px; border: 0; background: none; font-size: .875rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.err { min-height: 0; margin: 6px 2px 0; font-size: .875rem; line-height: 1.45; color: var(--warn); }
.err:empty { display: none; }
.err a { color: var(--warn); }
.consent { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font-size: .8125rem; line-height: 1.55; color: var(--muted); }
.consent h2 { margin: 0 0 6px; font-size: .9375rem; font-weight: 600; color: var(--bone); }
.consent p { margin: 0; }
.tick { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; font-size: .9375rem; color: var(--bone); cursor: pointer; }
.tick input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rust); }
.primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 14px; padding: 15px;
  border: 0; border-radius: 12px; background: var(--rust); color: var(--white);
  font-family: var(--font-label); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.primary:disabled { opacity: .45; cursor: default; }
.done { display: flex; flex-direction: column; gap: 8px; }
.done a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 13px 16px;
  border: 1px solid var(--edge); border-radius: 12px; text-decoration: none;
}
.done a:hover, .done a:focus-visible { border-color: var(--clay); }
.disclaimer { margin: 0; padding: 4px var(--gutter) max(14px, env(safe-area-inset-bottom)); font-size: .75rem; line-height: 1.45; color: rgba(243, 236, 226, .6); text-align: center; }

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .intro p { font-size: 1.0625rem; }
}
/* ---------- Chinese pages ---------- */
/* As on the rest of the site: Poppins for Latin letters and figures, the visitor's own system face for Chinese. */
:root:lang(zh-HK) {
  --font-sans: "Poppins", "PingFang HK", "PingFang TC", "Noto Sans HK", "Noto Sans CJK HK", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --font-label: var(--font-sans);
}
:root:lang(zh-CN) {
  --font-sans: "Poppins", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-label: var(--font-sans);
}
:lang(zh) body { line-height: 1.7; }
:lang(zh) *, :lang(zh) *::before, :lang(zh) *::after { letter-spacing: 0 !important; }
:lang(zh) .intro h1 { line-height: 1.25; font-weight: 600; }
:lang(zh) .bubble--lead { line-height: 1.4; font-weight: 600; }
:lang(zh) .start, :lang(zh) .primary { font-size: 1rem; font-weight: 600; letter-spacing: .08em !important; text-transform: none; }
:lang(zh) .intro .intro__small, :lang(zh) .bar__tag { font-size: .8125rem; }

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