/* Vertical 9:16 kiosk (1080×1920). Geometry uses container units of #stage (cqw / cqh),
   so the avatar can morph between full screen and a small window smoothly, in any orientation. */
:root {
  --bg: #f5faf6;
  --bg-2: #ffffff;
  --glass: rgba(255, 255, 255, .9);
  --panel: #ffffff;
  --panel-2: rgba(20, 110, 62, 0.07);
  --line: rgba(20, 110, 62, 0.16);
  --text: #0f2e1d;
  --muted: #5d7a69;
  --gold: #2a9d5c;
  --gold-2: #1c7a45;
  --rose: #0f5c34;
  --ok: #8fc4a3;
  --err: #c2453a;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.65, 0, .2, 1);
}
* { box-sizing: border-box; }
html { font-size: clamp(12px, 2vmin, 40px); }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Stage & orientation ---------- */
#stage {
  position: fixed; inset: 0; overflow: clip; container-type: size; /* clip: never scrolls, even when off-screen panels get focus */
  background: radial-gradient(120% 70% at 80% 0%, #dff2e6 0%, var(--bg) 60%);
  --top: 6cqh;                         /* top bar height */
  --pad: 3cqw;                         /* side padding in the work layout */
  --main: 61cqw;                       /* main column width */
  --side: calc(100cqw - var(--main) - 3 * var(--pad));
  --pip-h: calc(var(--side) * 4 / 3);  /* avatar window: 3:4 */
}

/* ---------- Avatar (hero: full screen → work: small window) ---------- */
.avatar {
  position: absolute; z-index: 1; overflow: hidden; background: #eaf4ee;
  top: 0; left: 0; width: 100cqw; height: 100cqh; border-radius: 0;
  transition: top .9s var(--ease), left .9s var(--ease), width .9s var(--ease), height .9s var(--ease), border-radius .9s var(--ease), box-shadow .9s;
}
body[data-mode="work"] .avatar {
  top: calc(var(--top) + 1.2cqh); left: calc(2 * var(--pad) + var(--main));
  width: var(--side); height: var(--pip-h); border-radius: 1.4rem;
  box-shadow: 0 1.6rem 3.4rem -1rem rgba(15, 46, 29, .22), 0 0 0 1px var(--line);
}
.avatar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.avatar.live video { opacity: 1; }
.avatar.live .avatar-fallback { opacity: 0; pointer-events: none; }
.avatar-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; padding: 2rem; text-align: center; transition: opacity .6s;
  background: radial-gradient(60% 40% at 50% 32%, rgba(42, 157, 92, .16), transparent 70%); }
body[data-mode="hero"] .avatar-fallback { justify-content: flex-start; padding-top: 22cqh; }
.avatar-fallback p { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 30rem; line-height: 1.45; }
body[data-mode="work"] .avatar-fallback { gap: .8rem; }
body[data-mode="work"] .avatar-fallback p { display: none; } /* the tag already says the avatar is off; keeps the window clean for subtitles */
.orb { position: relative; width: 34cqw; aspect-ratio: 1; transition: width .9s var(--ease); }
body[data-mode="work"] .orb { width: 11cqw; }
.orb span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(42, 157, 92, .5); animation: breathe 4s ease-in-out infinite; }
.orb span:nth-child(2) { inset: 14%; animation-delay: -1.3s; border-color: rgba(15, 92, 52, .55); }
.orb span:nth-child(3) { inset: 30%; animation-delay: -2.6s; background: radial-gradient(circle, rgba(42, 157, 92, .35), transparent 70%); }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .55; } }
/* darken only the very top (slogan) and the very bottom (widgets + Start): the face stays clear */
.avatar-shade { position: absolute; inset: 0; pointer-events: none; transition: opacity .9s;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .35) 13%, transparent 22%, transparent 68%, rgba(255, 255, 255, .82) 84%, rgba(255, 255, 255, .96) 100%); }
body[data-screen="upload"] .avatar-shade { background: linear-gradient(to bottom, rgba(255, 255, 255, .55) 0%, transparent 14%, rgba(255, 255, 255, .55) 40%, rgba(255, 255, 255, .95) 60%); }
body[data-mode="work"] .avatar-shade { opacity: .0; }
.avatar-tag { position: absolute; left: 1rem; top: calc(var(--top) + 1rem); display: flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 99px; background: rgba(255, 255, 255, .6); backdrop-filter: blur(8px); font-size: .7rem; transition: top .9s var(--ease), left .9s; }
body[data-mode="work"] .avatar-tag { top: .6rem; left: .6rem; font-size: .58rem; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.dot.on { background: var(--ok); box-shadow: 0 0 .6rem var(--ok); }
.dot.wait { background: var(--gold); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 .35rem rgba(42, 157, 92, .15); } }
.mic-btn { position: absolute; right: 1rem; top: calc(var(--top) + 1rem); width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); cursor: pointer; display: grid; place-items: center; transition: top .9s var(--ease); }
body[data-mode="work"] .mic-btn { top: .5rem; right: .5rem; width: 2.2rem; height: 2.2rem; }
.mic-btn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; }
.mic-btn.on { background: var(--gold); }
.mic-btn.on svg { stroke: #ffffff; }
/* subtitles of what the consultant says */
.caption { position: absolute; left: 7cqw; right: 7cqw; top: 40cqh; text-align: center; font-size: 1.15rem; line-height: 1.45; color: var(--text);
  text-shadow: 0 2px 12px rgba(15, 46, 29, .2); animation: enter .4s; transition: all .9s var(--ease); }
body[data-screen="upload"] .caption { top: 22cqh; }
body[data-mode="work"] .caption { left: .6rem; right: .6rem; top: auto; bottom: .6rem; font-size: .62rem; text-align: left; padding: .5rem .7rem; border-radius: .8rem; background: rgba(255, 255, 255, .72);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.caption.user { color: var(--gold-2); }

/* ---------- Top bar ---------- */
.topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 3cqw;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .7), transparent); }
body[data-mode="work"] .topbar { background: rgba(255, 255, 255, .6); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: .3em; font-size: .85rem; }
.brand em { color: var(--gold); font-style: normal; }
.brand-mark { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1.5px solid var(--gold); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 28%; border-radius: 50%; background: var(--gold); opacity: .8; }
.demo-badge { margin-left: .4rem; padding: .2rem .6rem; border-radius: 99px; background: var(--rose); color: #ffffff; letter-spacing: .15em; font-size: .7rem; font-weight: 700; }
.controls { display: flex; align-items: center; gap: .4rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .45rem .75rem; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .35); cursor: pointer; font-size: .72rem; color: var(--muted); transition: all .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--gold); }
.icon-btn.off { color: var(--err); border-color: rgba(194, 69, 58, .45); }
.icon-btn.round { width: 2.4rem; height: 2.4rem; padding: 0; opacity: .7; }
.icon-btn.round:hover { opacity: 1; }
.icon-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.usage-chip { font-size: .66rem; color: var(--muted); padding: .25rem .6rem; border: 1px dashed var(--line); border-radius: 99px; }

/* ---------- Typography & buttons ---------- */
.eyebrow { margin: 0 0 .6rem; font-size: .75rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
h1, h2 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.02; }
h1 { font-size: 3.4rem; }
h2 { font-size: 2.4rem; }
h1 i, h2 i { color: var(--gold-2); }
.lead { font-size: 1.05rem; line-height: 1.5; color: #3c5a49; font-weight: 300; margin: .8rem auto 0; max-width: 34rem; }
.fine { font-size: .74rem; color: var(--muted); margin: .4rem 0 0; text-align: center; }
.error-text { color: var(--err); font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap; margin: 0; }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: .75rem 1.4rem; border-radius: 99px; cursor: pointer; font-weight: 500; font-size: 1rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; transition: transform .15s, border-color .2s, opacity .2s, box-shadow .2s; }
.btn:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #ffffff; border-color: transparent; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.sm { padding: .5rem 1rem; font-size: .8rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-size: .7rem; letter-spacing: .25em; cursor: pointer; text-decoration: underline; text-underline-offset: .3em; opacity: .7; }
.link-btn:hover { color: var(--gold); opacity: 1; }
.spinner { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: spin 1s linear infinite; flex: 0 0 auto; }
.spinner.sm { width: 1.1rem; height: 1.1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(1rem); } }

/* ---------- HERO ---------- */
/* one-line slogan at the top */
.hero-title { position: absolute; z-index: 3; left: 3cqw; right: 3cqw; top: calc(var(--top) + 5.2cqh); margin: 0; text-align: center; white-space: nowrap;
  font-size: 5.4cqw; line-height: 1.1; text-shadow: 0 2px 18px rgba(255, 255, 255, .9); transition: opacity .6s, transform .8s var(--ease); }
body[data-mode="work"] .hero-title { opacity: 0; transform: translateY(-3cqh); pointer-events: none; }
/* bottom: before/after widgets, then Start */
.hero-panel { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 5cqw 3.2cqh; display: flex; flex-direction: column; align-items: center; gap: 2.2cqh;
  transition: opacity .6s, transform .8s var(--ease); }
body:not([data-screen="hero"]) .hero-panel { opacity: 0; transform: translateY(6cqh); pointer-events: none; }
.start-btn { font-size: 1.1rem; padding: .85rem 2.6rem; box-shadow: 0 0 0 0 rgba(42, 157, 92, .5); animation: glow 2.6s ease-in-out infinite; }
.start-btn svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* language: small segmented switch in the top bar */
.lang-switch { display: inline-flex; padding: .18rem; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .35); }
.lang-switch button { border: 0; background: transparent; color: var(--muted); padding: .3rem .6rem; border-radius: 99px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; cursor: pointer; }
.lang-switch button.on { background: var(--gold-2); color: #ffffff; }
@keyframes glow { 50% { box-shadow: 0 0 0 1.2rem rgba(42, 157, 92, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(42, 157, 92, .35); } }

/* floating before/after widgets */
.ba-row { display: flex; justify-content: center; align-items: flex-end; gap: 2.4cqw; width: 100%; }
.ba { position: relative; width: 14cqw; aspect-ratio: 3 / 4; border-radius: .8rem; overflow: hidden; border: 1px solid rgba(42, 157, 92, .35);
  box-shadow: 0 1.4rem 3rem -1rem rgba(15, 46, 29, .22); background: #eaf4ee; animation: float 6s ease-in-out infinite; }
.ba:nth-child(2) { animation-delay: -2s; }
.ba:nth-child(3) { animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.2cqh; } }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.ba .after { clip-path: inset(0 0 0 50%); animation: wipe 7s ease-in-out infinite; }
.ba:nth-child(2) .after, .ba:nth-child(2) .ba-line { animation-delay: -2.3s; }
.ba:nth-child(3) .after, .ba:nth-child(3) .ba-line { animation-delay: -4.6s; }
.ba-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--gold-2); box-shadow: 0 0 10px rgba(42, 157, 92, .8); animation: line 7s ease-in-out infinite; }
@keyframes wipe { 0%, 8% { clip-path: inset(0 0 0 92%); } 46%, 58% { clip-path: inset(0 0 0 8%); } 96%, 100% { clip-path: inset(0 0 0 92%); } }
@keyframes line { 0%, 8% { left: 92%; } 46%, 58% { left: 8%; } 96%, 100% { left: 92%; } }
.ba-tag { position: absolute; top: .35rem; padding: .1rem .38rem; border-radius: 99px; background: rgba(255, 255, 255, .7); font-size: .42rem; letter-spacing: .16em; color: var(--muted); }
.ba-tag.l { left: .35rem; } .ba-tag.r { right: .35rem; color: var(--gold-2); }
.ba-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem .4rem .35rem; background: linear-gradient(to top, rgba(255, 255, 255, .92), transparent); font-family: var(--serif); font-size: .78rem; color: var(--gold-2); text-align: center; }

/* ---------- UPLOAD sheet ---------- */
.sheet { position: absolute; z-index: 4; left: 4cqw; right: 4cqw; bottom: 3cqh; height: 52cqh; display: flex; flex-direction: column; gap: 1.6cqh; padding: 2.4cqh 4cqw;
  border-radius: 2rem; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 2rem 5rem -1rem rgba(15, 46, 29, .2);
  transform: translateY(115%); opacity: 0; transition: transform .8s var(--ease), opacity .5s; }
body[data-screen="upload"] .sheet { transform: none; opacity: 1; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dropzone { position: relative; flex: 1; min-height: 0; border-radius: 1.4rem; border: 2px dashed rgba(42, 157, 92, .35); background: rgba(20, 110, 62, .03); cursor: pointer; overflow: hidden; display: grid; place-items: center; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.over, .dropzone:focus-visible { border-color: var(--gold); background: rgba(42, 157, 92, .07); outline: none; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; padding: 1.5rem; }
.photo-empty b { font-size: 1.3rem; font-weight: 500; }
.photo-empty small { font-size: .82rem; color: var(--muted); }
.cam { width: 6.5rem; height: 6.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(42, 157, 92, .12); border: 1px solid rgba(42, 157, 92, .35); margin-bottom: .6rem; }
.cam svg { width: 3rem; height: 3rem; fill: none; stroke: var(--gold-2); stroke-width: 1.4; stroke-linejoin: round; }
/* photo preview: blurred fill behind the whole photo — never a half-cut image */
.preview { position: absolute; inset: 0; display: grid; place-items: center; }
.preview-bg { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(28px) brightness(1.05) saturate(.9) opacity(.6); }
.preview img { position: relative; max-width: 92%; max-height: 92%; object-fit: contain; border-radius: 1rem; box-shadow: 0 1.4rem 3rem -1rem rgba(15, 46, 29, .2); animation: pop .6s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.preview-badge { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem; border-radius: 99px; background: rgba(255, 255, 255, .78); font-size: .85rem; color: var(--gold-2); white-space: nowrap; }

/* ---------- WORK area (processing / result) ---------- */
.work { position: absolute; z-index: 2; top: var(--top); left: 0; right: 0; bottom: 0; padding: 1.2cqh var(--pad) 2cqh; opacity: 0; pointer-events: none; transition: opacity .6s .3s; }
body[data-mode="work"] .work { opacity: 1; pointer-events: auto; }
.view { position: absolute; inset: 1.2cqh var(--pad) 2cqh; display: none; gap: var(--pad); }
.view.active { display: flex; animation: enter .6s var(--ease); }
.main-col { width: var(--main); flex: 0 0 auto; display: flex; flex-direction: column; gap: 1.4cqh; min-height: 0; }
.side-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.2cqh; min-height: 0; padding-bottom: 6.5cqh; }
.avatar-space { flex: 0 0 auto; height: var(--pip-h); }

/* processing */
#view-processing .main-col, #view-result .main-col { justify-content: center; gap: 2.4cqh; }
.view-title { font-size: 2.6rem; }
.status-line { margin: 0; font-size: .9rem; color: var(--gold-2); min-height: 1.3em; }
.slots.final figcaption { font-size: .85rem; padding: .4rem 1rem; }
.slots.final .slot.max { border-color: rgba(42, 157, 92, .55); box-shadow: 0 0 0 1px rgba(42, 157, 92, .25), 0 1.4rem 3rem -1rem rgba(15, 46, 29, .22); }
.slots { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqh 2cqw; }
.slot { position: relative; margin: 0; min-height: 0; aspect-ratio: 3 / 4; border-radius: 1.2rem; overflow: hidden; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1rem 2.4rem -1rem rgba(15, 46, 29, .2); }
.slot img { width: 100%; height: 100%; object-fit: cover; object-position: center 26%; cursor: zoom-in; animation: reveal 1.1s ease; }
@keyframes reveal { from { opacity: 0; filter: blur(14px); transform: scale(1.03); } }
.slot-wait, .slot-err { position: absolute; inset: 0; display: grid; place-items: center; }
.slot-wait { background: linear-gradient(110deg, rgba(20,110,62,.03) 30%, rgba(20,110,62,.08) 50%, rgba(20,110,62,.03) 70%); background-size: 250% 100%; animation: shimmer 2.2s linear infinite; }
@keyframes shimmer { to { background-position: -250% 0; } }
.slot-wait.idle { animation: none; }
.slot-wait.idle .spinner { opacity: .25; animation: none; }
.slot-err { display: flex; flex-direction: column; justify-content: center; gap: .7rem; padding: 1rem; background: rgba(194, 69, 58, .07); font-size: .75rem; color: #b23d33; text-align: center; }
.slot figcaption { position: absolute; left: .7rem; bottom: .7rem; padding: .3rem .8rem; border-radius: 99px; background: rgba(255, 255, 255, .72); font-size: .72rem; letter-spacing: .22em; color: var(--gold-2); }
.orig-card { display: flex; flex-direction: column; gap: .7rem; padding: .7rem; border-radius: 1.2rem; background: var(--panel); border: 1px solid var(--line); }
.orig-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 26%; border-radius: .8rem; cursor: zoom-in; }
.orig-card b { display: block; font-size: .66rem; letter-spacing: .22em; color: var(--gold); }
.orig-card span { font-size: .74rem; color: var(--muted); }
.progress-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .8s ease; }
.progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.progress-list li { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--muted); }
.progress-list li::before { content: ''; width: .95rem; height: .95rem; border-radius: 50%; border: 1.5px solid var(--line); flex: 0 0 auto; }
.progress-list li.running { color: var(--text); }
.progress-list li.running::before { border-color: var(--gold); border-top-color: transparent; animation: spin 1s linear infinite; }
.progress-list li.done { color: var(--gold-2); }
.progress-list li.done::before { background: var(--gold); border-color: var(--gold); }
.progress-list li.error { color: var(--err); }
.progress-list li.error::before { background: var(--err); border-color: var(--err); }

/* result */
#view-result .main-col { justify-content: center; }
/* the frame is exactly 9:16, so the slide fills it with no empty bands */
.slides { position: relative; flex: 0 1 auto; min-height: 0; width: 100%; aspect-ratio: 9 / 16; max-height: 100%; margin: 0 auto; border-radius: 1.4rem; overflow: hidden; background: #eaf4ee; border: 1px solid var(--line); box-shadow: 0 1.6rem 3.4rem -1.4rem rgba(15, 46, 29, .22); }
.slide-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.slide-stage img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; animation: pop .6s var(--ease); }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.slide-nav.prev { left: .7rem; } .slide-nav.next { right: .7rem; }
.slide-nav:disabled { opacity: 0; pointer-events: none; }
.slide-dots { display: flex; justify-content: center; gap: .5rem; }
.dot-btn { padding: .5rem 1.1rem; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: .8rem; }
.dot-btn.on { color: var(--text); border-color: var(--gold); background: var(--panel); }
.result-thumbs { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: .55rem; }
.rthumb { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: center; padding: .4rem; border-radius: .9rem; background: var(--panel); border: 1px solid var(--line); min-height: 0; }
.rthumb img, .rthumb .placeholder { height: 100%; max-height: 6.5rem; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 26%; border-radius: .55rem; cursor: zoom-in; }
.rthumb .placeholder { display: grid; place-items: center; font-size: .6rem; color: var(--muted); background: var(--panel-2); }
.rthumb b { display: block; font-size: .62rem; letter-spacing: .2em; color: var(--gold); }
.rthumb span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .66rem; line-height: 1.3; color: #3c5a49; margin-top: .15rem; }
.result-actions { display: flex; flex-direction: column; gap: .6rem; }
.result-actions .btn { width: 100%; }
.next-btn { font-size: 1.05rem; padding: .9rem 1.2rem; }
#view-result .side-col { padding-bottom: 6.5cqh; }

/* ask the consultant (work mode, under the right column) */
.ask { position: absolute; right: var(--pad); bottom: 2cqh; width: var(--side); display: flex; gap: .4rem; }
.ask input { flex: 1; min-width: 0; padding: .6rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); outline: none; font-size: .82rem; }
.ask input:focus { border-color: var(--gold); }
.ask .btn { padding: .6rem 1rem; }

/* ---------- Before / after (result cards + full-screen comparison) ---------- */
.cmp-card { cursor: pointer; }
.cmp-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.cmp-card .after { clip-path: inset(0 0 0 50%); animation: wipe 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cmp-card .ba-line { animation-delay: var(--d, 0s); }
.cmp-card .ba-tag { top: .6rem; font-size: .6rem; padding: .18rem .55rem; z-index: 2; }
.cmp-card figcaption { z-index: 2; }
.compare { position: absolute; inset: 0; z-index: 25; background: rgba(245, 250, 246, .98); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4cqh; padding: 4cqh 5cqw; animation: enter .3s; }
.cmp-close { position: absolute; top: 2.4cqh; right: 4cqw; }
.cmp-title { font-size: 3rem; text-align: center; }
.cmp-caption { margin: 0; color: #3c5a49; font-size: 1.05rem; text-align: center; max-width: 40rem; min-height: 1.4em; }
.cmp-box { --pos: 50%; position: relative; width: min(86cqw, 60cqh * 3 / 4); aspect-ratio: 3 / 4; border-radius: 1.4rem; overflow: hidden; border: 1px solid rgba(42, 157, 92, .4); touch-action: none; cursor: ew-resize; box-shadow: 0 2rem 4rem -1rem rgba(15, 46, 29, .22); user-select: none; }
.cmp-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; pointer-events: none; }
.cmp-box .after { clip-path: inset(0 0 0 var(--pos)); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--gold-2); box-shadow: 0 0 12px rgba(42, 157, 92, .9); transform: translateX(-1px); pointer-events: none; }
.cmp-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--gold-2); color: #ffffff; font-weight: 700; font-size: 1rem; box-shadow: 0 .6rem 1.6rem rgba(15, 46, 29, .2); }
.cmp-box .ba-tag { top: 1rem; font-size: .75rem; padding: .3rem .8rem; z-index: 2; }
.cmp-box .ba-tag.l { left: 1rem; } .cmp-box .ba-tag.r { right: 1rem; }
.cmp-hint { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---------- Overlays ---------- */
.lightbox { position: absolute; inset: 0; z-index: 20; background: rgba(245, 250, 246, .97); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.6rem; animation: enter .3s; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 88%; border-radius: 1rem; }
.lightbox-bar { display: flex; align-items: center; gap: 1rem; }
.lightbox p { color: var(--muted); font-size: .95rem; margin: 0; }
.toast { position: absolute; z-index: 30; left: 50%; bottom: 3cqh; transform: translateX(-50%); padding: .85rem 1.4rem; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); font-size: .9rem; box-shadow: 0 1rem 3rem rgba(15,46,29,.15); animation: enter .3s; max-width: 86%; text-align: center; }

/* ---------- Grow & Glow additions ---------- */
.brand { color: var(--rose); letter-spacing: .22em; }
.brand small { font-size: .62rem; letter-spacing: .3em; color: var(--muted); font-weight: 600; margin-left: .2rem; }
.hero-title { color: var(--rose); }
.any-lang { margin: 0; display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 1.1rem; border-radius: 99px; background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line); color: var(--gold-2); font-size: .9rem; font-weight: 600; box-shadow: 0 .6rem 1.6rem -0.6rem rgba(15, 46, 29, .25); }
.any-lang svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sample-btn { align-self: center; color: var(--gold-2); border-color: rgba(42, 157, 92, .45); }
.btn.primary { box-shadow: 0 .8rem 2rem -0.6rem rgba(28, 122, 69, .55); }
.start-btn { animation-name: glowG; }
@keyframes glowG { 50% { box-shadow: 0 0 0 1.2rem rgba(42, 157, 92, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(42, 157, 92, .35); } }
body[data-mode="work"] #stage, body[data-mode="work"] { background: var(--bg); }
/* QUICK mode: a single result card */
.slots { grid-template-columns: 1fr; }
.slot figcaption { font-size: .9rem; letter-spacing: .12em; }
/* floating before/after cards on the home screen */
.ba { width: 26cqw; border: 2px solid #fff; box-shadow: 0 1.4rem 2.6rem -0.8rem rgba(15, 46, 29, .35); }
.ba-name { left: 50%; right: auto; bottom: .45rem; transform: translateX(-50%); padding: .2rem .6rem; border-radius: 99px; background: rgba(255, 255, 255, .92);
  font-family: var(--sans); font-size: .5rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--gold-2); }
.ba-tag { font-size: .55rem; font-weight: 600; background: rgba(255, 255, 255, .85); }
.ba-name { font-size: .62rem; }