/* ============================================================
   SHLOK — The Shlok Deck
   A tactile card-deck business scan · black silver premium
   ============================================================ */

:root {
  --bg-0: #000000;
  --bg-1: #030303;
  --bg-2: #0a0a0a;

  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.065);
  --glass-3: rgba(255, 255, 255, 0.105);
  --border: rgba(238, 235, 226, 0.105);
  --border-2: rgba(246, 242, 232, 0.24);

  --card-bg:
    linear-gradient(168deg, rgba(21,21,21,0.96), rgba(4,4,4,0.985) 58%, rgba(12,12,12,0.98)),
    radial-gradient(110% 90% at 50% -16%, rgba(255,255,255,0.13), transparent 48%);

  --text: #f3f0ea;
  --muted: #aca69b;
  --faint: #747067;

  --a1: #f7f4ec;
  --a2: #a79f92;
  --a1-bright: #ffffff;
  --a2-bright: #d8d1c4;
  --grad: linear-gradient(118deg, #69645d 0%, #fffaf0 48%, #8f877a 100%);
  --grad-bright: linear-gradient(118deg, #8d877e 0%, #fffdf6 42%, #b9b0a1 72%, #6f675d 100%);

  --radius: 20px;
  --radius-lg: 30px;
  --radius-sm: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --silk: cubic-bezier(0.18, 0.86, 0.2, 1);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --card-w: 460px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  overflow: hidden;
}
#root { height: 100%; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid rgba(255,255,255,0.82); outline-offset: 3px; border-radius: 8px; }

/* ============================================================
   BACKGROUND
   ============================================================ */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(55% 45% at 50% 40%, rgba(255,255,255,0.07), transparent 62%),
    radial-gradient(90% 55% at 50% 108%, rgba(255,255,255,0.045), transparent 60%),
    linear-gradient(180deg, #020202 0%, #000 68%);
}
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.045) 50%, transparent 100%);
  opacity: 0.32;
  mask-image: radial-gradient(60% 48% at 50% 44%, #000, transparent 72%);
}
.bg::after {
  content: "+";
  position: absolute;
  right: clamp(28px, 8vw, 92px);
  bottom: clamp(34px, 9vh, 90px);
  color: rgba(255,255,255,0.78);
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 300;
  line-height: 1;
  transform: rotate(45deg) scaleX(0.74);
  text-shadow: 0 0 22px rgba(255,255,255,0.38);
}
.blob { display: none; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.42; will-change: transform; }
.blob.b1 { width: 46vmax; height: 46vmax; left: -14vmax; top: -10vmax;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.12), transparent 65%);
  animation: drift1 26s var(--ease) infinite alternate; }
.blob.b2 { width: 42vmax; height: 42vmax; right: -16vmax; top: 8vmax;
  background: radial-gradient(circle at 60% 40%, rgba(242,237,225,0.10), transparent 65%);
  animation: drift2 30s var(--ease) infinite alternate; }
.blob.b3 { width: 38vmax; height: 38vmax; left: 30%; bottom: -22vmax;
  background: radial-gradient(circle at 50% 50%, rgba(95,184,224,0.30), transparent 65%);
  animation: drift3 34s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(8vmax, 6vmax) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-7vmax, 5vmax) scale(1.08); } }
@keyframes drift3 { to { transform: translate(4vmax, -6vmax) scale(1.15); } }
.bg-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; }
.chrome,
.deck-viewport,
.debug-hintbar {
  position: relative;
  z-index: 3;
}

/* top chrome */
.chrome {
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--card-w);
  display: flex; align-items: center; gap: 14px;
  padding: max(16px, env(safe-area-inset-top)) 20px 6px;
}
.chrome .back {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018));
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.25s var(--ease);
  backdrop-filter: blur(12px);
}
.chrome .back:hover { background: var(--glass-3); color: var(--text); transform: translateX(-2px); }
.chrome .back:disabled { opacity: 0; pointer-events: none; }

.seg-wrap { flex: 1 1 auto; }
.seg-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.seg-meta .label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: transparent;
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(255,255,255,0.08);
}
.seg-meta .count { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.seg-meta .count b { color: var(--text); }
.seg-meta .count em { font-style: normal; color: rgba(243,240,234,0.72); font-size: 10.5px; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.08); }
.segs { display: flex; gap: 5px; }
.segs .s { flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,0.075); overflow: hidden; position: relative; }
.segs .s > i { position: absolute; inset: 0; border-radius: 99px; background: var(--grad-bright);
  transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.segs .s.done > i { transform: scaleX(1); }
.segs .s.cur > i { transform: scaleX(1); box-shadow: 0 0 12px rgba(255,255,255,0.42); animation: activeSeg 1.2s var(--ease) infinite alternate; }
@keyframes activeSeg {
  from { filter: brightness(0.92); box-shadow: 0 0 0 rgba(255,255,255,0); }
  to { filter: brightness(1.18); box-shadow: 0 0 16px rgba(255,255,255,0.34); }
}

.brand-dot {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; position: relative; cursor: pointer;
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,0.95), rgba(207,199,185,0.38) 40%, rgba(255,255,255,0.03) 70%),
    #090909;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 20px rgba(255,255,255,0.13), inset 0 0 16px rgba(255,255,255,0.12);
  animation: breathe 5s ease-in-out infinite;
}
.brand-dot::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.52);
}
@keyframes breathe { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.07);} }

/* ============================================================
   DECK
   ============================================================ */
.deck-viewport {
  flex: 1 1 auto; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 16px max(18px, env(safe-area-inset-bottom));
  perspective: 1600px;
  min-height: 0;
}
.deck {
  position: relative;
  width: min(var(--card-w), 100%);
  height: 100%;
  max-height: 720px;
  transform-style: preserve-3d;
}

/* ghost depth cards */
.ghost {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px -36px rgba(0,0,0,0.95);
}
.ghost.g1 { transform: translateY(16px) scale(0.955); opacity: 0.7; z-index: 1; animation: deckBreathe 4.8s var(--ease) infinite alternate; }
.ghost.g2 { transform: translateY(30px) scale(0.91); opacity: 0.4; z-index: 0; animation: deckBreathe2 5.4s var(--ease) infinite alternate; }
@keyframes deckBreathe { to { transform: translateY(19px) scale(0.948); opacity: 0.58; } }
@keyframes deckBreathe2 { to { transform: translateY(34px) scale(0.902); opacity: 0.32; } }

/* the active card */
.card {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-2);
  box-shadow:
    0 42px 100px -44px rgba(0,0,0,0.98),
    0 0 0 1px rgba(255,255,255,0.045) inset,
    0 -1px 0 rgba(255,255,255,0.08) inset;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: transform 0.55s var(--ease-out);
  will-change: transform, opacity;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(105deg, transparent 0%, transparent 35%, rgba(255,255,255,0.10) 48%, transparent 62%, transparent 100%),
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.07), transparent 54%);
  opacity: 0;
  transform: translateX(-46%);
}
.card.enter-f::before,
.card.enter-b::before { animation: cardGlint 1.15s var(--ease-out) 0.08s both; }
@keyframes cardGlint {
  0% { opacity: 0; transform: translateX(-42%); }
  34% { opacity: 0.2; }
  100% { opacity: 0; transform: translateX(42%); }
}
.card.grab { cursor: grab; }
.card.grabbing { cursor: grabbing; transition: none !important; }

/* enter / exit transitions — calm depth glide, no blur or 3D tilt */
.card.enter-f { animation: cardEnterF 0.62s var(--ease-out) both; }
.card.enter-b { animation: cardEnterB 0.62s var(--ease-out) both; }
.card.leave-f { animation: cardLeaveF 0.5s var(--ease-out) both; }
.card.leave-b { animation: cardLeaveB 0.5s var(--ease-out) both; }
@keyframes cardEnterF {
  0%   { transform: translate3d(0, 28px, 0) scale(0.965); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes cardEnterB {
  0%   { transform: translate3d(0, -24px, 0) scale(0.968); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes cardLeaveF {
  from { transform: none; opacity: 1; }
  to   { transform: translate3d(0, -22px, 0) scale(0.975); opacity: 0; }
}
@keyframes cardLeaveB {
  from { transform: none; opacity: 1; }
  to   { transform: translate3d(0, 26px, 0) scale(0.965); opacity: 0; }
}
.leaving { position: absolute; inset: 0; z-index: 6; pointer-events: none; }

.card.enter-f .card-illo,
.card.enter-f .step-head,
.card.enter-f .grid,
.card.enter-f .chips,
.card.enter-f .sliders,
.card.enter-f .msg-list,
.card.enter-f .inlinefield,
.card.enter-f .card-foot,
.card.enter-b .card-illo,
.card.enter-b .step-head,
.card.enter-b .grid,
.card.enter-b .chips,
.card.enter-b .sliders,
.card.enter-b .msg-list,
.card.enter-b .inlinefield,
.card.enter-b .card-foot {
  animation: contentLift 0.55s var(--ease-out) both;
}
.card.enter-f .step-head,
.card.enter-b .step-head { animation-delay: 0.05s; }
.card.enter-f .grid,
.card.enter-f .chips,
.card.enter-f .sliders,
.card.enter-f .msg-list,
.card.enter-b .grid,
.card.enter-b .chips,
.card.enter-b .sliders,
.card.enter-b .msg-list { animation-delay: 0.1s; }
.card.enter-f .card-foot,
.card.enter-b .card-foot { animation-delay: 0.16s; }
@keyframes contentLift {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card.enter-f .opt,
.card.enter-f .chip,
.card.enter-f .msg,
.card.enter-f .slider-card { animation: optionPop 0.5s var(--ease-out) both; }
.card.enter-f .opt:nth-child(2),
.card.enter-f .chip:nth-child(2),
.card.enter-f .msg:nth-child(2),
.card.enter-f .slider-card:nth-child(2) { animation-delay: 0.04s; }
.card.enter-f .opt:nth-child(3),
.card.enter-f .chip:nth-child(3),
.card.enter-f .msg:nth-child(3),
.card.enter-f .slider-card:nth-child(3) { animation-delay: 0.075s; }
.card.enter-f .opt:nth-child(4),
.card.enter-f .chip:nth-child(4),
.card.enter-f .msg:nth-child(4),
.card.enter-f .slider-card:nth-child(4) { animation-delay: 0.11s; }
.card.enter-f .opt:nth-child(n+5),
.card.enter-f .chip:nth-child(n+5),
.card.enter-f .msg:nth-child(n+5),
.card.enter-f .slider-card:nth-child(n+5) { animation-delay: 0.145s; }
@keyframes optionPop {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card.enter-f, .card.enter-b, .card.leave-f, .card.leave-b,
  .card.enter-f::before, .card.enter-b::before,
  .card.enter-f *, .card.enter-b *,
  .ghost.g1, .ghost.g2 {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   CARD INTERNALS
   ============================================================ */
.card-illo {
  position: relative; flex: 0 0 auto;
  height: clamp(118px, 22vh, 168px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(80% 120% at 50% -30%, rgba(255,255,255,0.11), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.08));
}
.card.dense .card-illo { height: clamp(92px, 14vh, 120px); }
.card-illo svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: grayscale(1) saturate(0) contrast(1.08) brightness(0.9);
  opacity: 0.82;
}
.illo-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 38px;
  background: linear-gradient(180deg, transparent, rgba(5,5,5,0.72)); pointer-events: none; }

.card-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 22px 22px 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.card-body::-webkit-scrollbar { width: 5px; }
.card-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 99px; }

.card-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.86) 45%);
  border-top: 1px solid var(--border);
}
.hint { font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 7px; min-width: 0; }
.hint.required { color: var(--a2-bright); font-weight: 700; }
.hint .swipe-ic { opacity: 0.7; }
.spacer { flex: 1; }

/* ============================================================
   STEP HEAD
   ============================================================ */
.step-head { margin: 0 0 18px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.q-title { font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 6.4vw, 34px); line-height: 1.02; letter-spacing: 0; margin: 0; text-wrap: balance; }
.q-sub { margin: 11px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 52ch; }
.microcopy { margin-top: 10px; font-size: 13px; color: var(--faint); display: flex; align-items: center; gap: 7px; }

/* ============================================================
   OPTIONS
   ============================================================ */
.grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.grid.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 440px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }

.opt {
  position: relative; display: flex; align-items: center; gap: 13px; text-align: left; width: 100%;
  padding: 14px 15px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--border); color: var(--text);
  transition: transform 0.32s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.4s;
  min-height: 60px;
}
.opt:hover { background: var(--glass-2); border-color: var(--border-2); transform: translateY(-2px); }
.opt:active { transform: scale(0.985); }
.opt .ic { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(150deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.105); color: var(--a2-bright); transition: all 0.35s var(--ease); }
.opt .ic svg { width: 21px; height: 21px; }
.opt .ic .glyph { font-size: 18px; font-weight: 700; }
.opt .body { flex: 1 1 auto; min-width: 0; }
.opt .body .t { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.opt .body .s { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.opt .tick { flex: 0 0 auto; width: 23px; height: 23px; border-radius: 50%; border: 1.7px solid var(--border-2);
  display: grid; place-items: center; color: #070707; transition: all 0.3s var(--ease); }
.opt .tick svg { width: 13px; height: 13px; opacity: 0; transform: scale(0.4); transition: all 0.3s var(--ease); }
.opt.sel { background: linear-gradient(150deg, rgba(255,255,255,0.115), rgba(255,255,255,0.035)); border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(242,237,225,0.58), 0 18px 44px -20px rgba(255,255,255,0.30); transform: translateY(-2px); }
.opt.sel::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px;
  background: var(--grad-bright); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.9; }
.opt.sel .ic { background: var(--grad-bright); color: #070707; box-shadow: 0 0 22px rgba(255,255,255,0.22); }
.opt.sel .tick { background: var(--grad-bright); border-color: transparent; }
.opt.sel .tick svg { opacity: 1; transform: scale(1); }
.opt.pulse { animation: tap 0.42s var(--ease); }
@keyframes tap { 0% { transform: translateY(-2px) scale(1);} 35% { transform: translateY(-3px) scale(1.025);} 100% { transform: translateY(-2px) scale(1);} }
.opt.disabled { opacity: 0.4; pointer-events: none; filter: saturate(0.5); }
.opt .rank { position: absolute; top: -9px; left: -9px; width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #070707;
  background: var(--grad-bright); box-shadow: 0 4px 14px rgba(255,255,255,0.22); transform: scale(0); transition: transform 0.4s var(--spring); }
.opt.sel .rank { transform: scale(1); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--border); color: var(--text); font-size: 14px; font-weight: 600;
  transition: all 0.28s var(--ease); min-height: 44px; }
.chip .ci { width: 17px; height: 17px; display: grid; place-items: center; color: var(--muted); }
.chip:hover { background: var(--glass-2); border-color: var(--border-2); transform: translateY(-2px); }
.chip:active { transform: scale(0.96); }
.chip.sel { background: linear-gradient(150deg, rgba(255,255,255,0.13), rgba(255,255,255,0.05)); border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(242,237,225,0.55), 0 8px 24px -10px rgba(255,255,255,0.35); }
.chip.sel .ci { color: var(--a2-bright); }

/* search */
.search { display: flex; align-items: center; gap: 11px; padding: 12px 15px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--border); }
.search svg { width: 18px; height: 18px; color: var(--faint); flex: 0 0 auto; }
.search input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 15px; font-family: inherit; }
.search input::placeholder { color: var(--faint); }

/* inline field */
.inlinefield { margin-top: 14px; animation: expandIn 0.5s var(--ease); }
@keyframes expandIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.field-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.tinput, .tarea { width: 100%; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: 15px; padding: 13px 14px; outline: none;
  transition: border-color 0.3s, box-shadow 0.3s; }
.tarea { resize: none; min-height: 80px; line-height: 1.5; }
.tinput:focus, .tarea:focus { border-color: rgba(242,237,225,0.62); box-shadow: 0 0 0 3px rgba(255,255,255,0.09); }
.tinput::placeholder, .tarea::placeholder { color: var(--faint); }

/* ============================================================
   SLIDERS
   ============================================================ */
.sliders { display: flex; flex-direction: column; gap: 16px; }
.slider-card { padding: 15px 16px 16px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s; }
.slider-card.active { border-color: var(--border-2); background: var(--glass-2); }
.slider-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.slider-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.slider-name .si { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(255,255,255,0.11), rgba(255,255,255,0.035)); color: var(--a2-bright); }
.slider-name .si svg { width: 16px; height: 16px; }
.slider-val { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 10px; border-radius: 99px;
  background: var(--grad-bright); color: #070707; min-width: 28px; text-align: center; box-shadow: 0 0 16px rgba(255,255,255,0.20); }
.slider-rail { position: relative; height: 36px; display: flex; align-items: center; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px;
  background: rgba(255,255,255,0.09); outline: none; margin: 0; position: relative; z-index: 2; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; }
.range::-moz-range-track { height: 8px; border-radius: 99px; background: transparent; }
.range-fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 8px; border-radius: 99px; z-index: 1;
  background: var(--grad-bright); box-shadow: 0 0 14px rgba(255,255,255,0.24); pointer-events: none; transition: width 0.12s linear; }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 25px; height: 25px; border-radius: 50%;
  background: #fffaf0; border: 3px solid var(--a2-bright);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.12), 0 6px 16px rgba(0,0,0,0.55); cursor: grab; margin-top: -8.5px; transition: box-shadow 0.2s; }
.range:active::-webkit-slider-thumb { cursor: grabbing; box-shadow: 0 0 0 10px rgba(255,255,255,0.15), 0 6px 16px rgba(0,0,0,0.55); }
.range::-moz-range-thumb { width: 25px; height: 25px; border-radius: 50%; background: #fffaf0; border: 3px solid var(--a2-bright);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.12); cursor: grab; }
.slider-ends { display: flex; justify-content: space-between; margin-top: 9px; }
.slider-ends span { font-size: 12px; color: var(--faint); font-weight: 600; transition: color 0.25s, opacity 0.25s; }
.slider-ends span.lo-on { color: #e4c9c1; }
.slider-ends span.hi-on { color: var(--a2-bright); }

/* ============================================================
   MESSAGE CARDS
   ============================================================ */
.msg-list { display: flex; flex-direction: column; gap: 11px; }
.msg { position: relative; text-align: left; padding: 18px 19px; border-radius: var(--radius-lg);
  background: var(--glass); border: 1px solid var(--border); color: var(--text);
  transition: transform 0.4s var(--ease), box-shadow 0.4s, background 0.3s, border-color 0.3s; overflow: hidden; }
.msg .qmark { font-family: var(--font-display); font-size: 36px; line-height: 0.6; color: rgba(255,255,255,0.10);
  position: absolute; top: 12px; right: 16px; }
.msg .mtext { font-family: var(--font-display); font-weight: 500; font-size: clamp(16px, 4vw, 19px); line-height: 1.26;
  letter-spacing: -0.01em; position: relative; z-index: 1; max-width: 90%; }
.msg:hover { transform: translateY(-3px); border-color: var(--border-2); background: var(--glass-2); }
.msg.sel { border-color: transparent; background: linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.04));
  box-shadow: 0 0 0 1.5px rgba(242,237,225,0.62), 0 22px 50px -20px rgba(255,255,255,0.34); transform: translateY(-3px) scale(1.01); }
.msg.sel .qmark { color: rgba(255,255,255,0.28); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 24px; border-radius: 99px;
  font-size: 15px; font-weight: 700; border: none; white-space: nowrap; transition: transform 0.2s var(--ease), box-shadow 0.3s, opacity 0.3s, filter 0.3s; }
.btn.primary { background: var(--grad-bright); color: #070707;
  box-shadow: 0 12px 32px -10px rgba(255,255,255,0.36), 0 0 0 1px rgba(255,255,255,0.22) inset; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(255,255,255,0.48); filter: brightness(1.04); }
.btn.primary:active { transform: scale(0.96); }
.btn.primary:disabled { opacity: 0.35; filter: grayscale(0.5); pointer-events: none; box-shadow: none; }
.btn.ghost { background: var(--glass-2); color: var(--muted); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--glass-3); color: var(--text); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn.primary:hover .arrow { transform: translateX(3px); }
.btn.big { padding: 16px 30px; font-size: 16px; }

/* ============================================================
   WELCOME CARD
   ============================================================ */
.welcome-card { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 26px; }
.wordmark-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: clamp(50px, 13vw, 74px);
  font-weight: 300;
  line-height: 0.86;
  letter-spacing: 0.055em;
  color: transparent;
  background:
    linear-gradient(96deg, #5f5a54 0%, #fffdf8 43%, #bcb4a9 62%, #f5efe4 74%, #645d55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 34px rgba(255,255,255,0.18);
}
.wordmark-line {
  width: min(180px, 52vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
  box-shadow: 0 0 18px rgba(255,255,255,0.18);
}
.welcome-card .wtitle { font-family: var(--font-display); font-weight: 600; font-size: clamp(27px, 7vw, 38px);
  line-height: 1.04; letter-spacing: 0; margin: 20px 0 0; text-wrap: balance; }
.welcome-card .wtitle .g { background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-card .wsub { margin: 16px auto 0; max-width: 40ch; color: var(--muted); font-size: 15px; line-height: 1.6; }
.welcome-card .wcta { margin-top: 28px; }
.trust { margin-top: 18px; font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center; }
.trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.deck-hint-fan { font-size: 12px; color: var(--faint); margin-top: 14px; display: flex; align-items: center; gap: 7px; }

/* ============================================================
   LIQUID ORB
   ============================================================ */
.orb-wrap { position: relative; width: 150px; height: 150px; }
.orb-wrap.sm { width: 104px; height: 104px; }
.orb { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,0.92), rgba(201,193,180,0.42) 42%, rgba(255,255,255,0.05) 73%, transparent 78%);
  box-shadow: 0 0 70px rgba(255,255,255,0.16), inset 0 0 60px rgba(255,255,255,0.16); animation: orbBreathe 6s ease-in-out infinite; }
.orb::before { content: ""; position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 65% 70%, rgba(255,255,255,0.34), transparent 60%); filter: blur(6px);
  animation: orbSwirl 9s ease-in-out infinite alternate; }
.orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,0.8), transparent 28%); mix-blend-mode: screen; }
.orb-ring { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.20); animation: spin 16s linear infinite; }
.orb-ring.r2 { inset: -28px; border-color: rgba(255,255,255,0.10); animation-duration: 24s; animation-direction: reverse; }
@keyframes orbBreathe { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.06);} }
@keyframes orbSwirl { from{ transform: rotate(0) translate(4px,2px);} to{ transform: rotate(360deg) translate(-4px,-2px);} }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   COMPLETION CARD
   ============================================================ */
.done-card { height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 22px; overflow-y: auto; }
.done-card .dtitle { font-family: var(--font-display); font-weight: 600; font-size: clamp(23px, 6vw, 30px);
  line-height: 1.1; letter-spacing: -0.015em; margin: 18px 0 0; text-wrap: balance; }
.done-card .dsub { margin: 12px auto 0; max-width: 40ch; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.summary { margin: 22px 0 0; width: 100%; padding: 20px; border-radius: var(--radius-lg); background: var(--glass-2);
  border: 1px solid var(--border); text-align: left; animation: riseIn 0.7s var(--ease) both; }
.summary .row + .row { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.summary .k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.summary .v { font-family: var(--font-display); font-weight: 500; font-size: 19px; line-height: 1.2; margin-top: 6px; }
.summary .v .g { background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 99px;
  background: linear-gradient(150deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
  border: 1px solid rgba(242,237,225,0.24); color: var(--text); opacity: 0; animation: riseIn 0.5s var(--ease) forwards; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.done-card .dcta { margin-top: 22px; display: flex; flex-direction: column; gap: 11px; width: 100%; align-items: center; }
.share-link { background: none; border: none; color: var(--muted); font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px; transition: color 0.25s; }
.share-link:hover { color: var(--a2-bright); }
.bloom { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.45); transform: translate(-50%,-50%); animation: bloom 1.6s var(--ease-out) forwards; }
.bloom.b-2 { animation-delay: 0.25s; border-color: rgba(242,237,225,0.30); }
.bloom.b-3 { animation-delay: 0.5s; border-color: rgba(255,255,255,0.18); }
@keyframes bloom { 0% { width: 8px; height: 8px; opacity: 0.9; } 100% { width: 320px; height: 320px; opacity: 0; } }

/* ============================================================
   NOTE TABS / VOICE
   ============================================================ */
.note-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.note-tab { flex: 1; padding: 10px; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: all 0.25s var(--ease); }
.note-tab svg { width: 15px; height: 15px; }
.note-tab.on { background: linear-gradient(150deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045)); border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(242,237,225,0.52); color: var(--text); }
.voicebox { display: flex; align-items: center; gap: 15px; padding: 16px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--border); }
.rec-btn { width: 50px; height: 50px; border-radius: 50%; flex: 0 0 auto; border: none; display: grid; place-items: center;
  color: #070707; background: var(--grad-bright); box-shadow: 0 8px 22px -6px rgba(255,255,255,0.34); transition: transform 0.2s; }
.rec-btn.recording { animation: recPulse 1.3s ease-in-out infinite; }
@keyframes recPulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(255,255,255,0.30);} 50%{ box-shadow: 0 0 0 14px rgba(255,255,255,0);} }
.rec-btn:active { transform: scale(0.92); }
.wave { display: flex; align-items: center; gap: 3px; height: 24px; flex: 1; }
.wave i { width: 3px; border-radius: 99px; background: var(--a2-bright); opacity: 0.55; height: 30%; }
.wave.live i { animation: waveA 0.9s ease-in-out infinite; }
.wave.live i:nth-child(odd) { animation-duration: 1.1s; }
.wave.live i:nth-child(3n) { animation-duration: 0.7s; }
@keyframes waveA { 0%,100%{ height: 25%; } 50%{ height: 95%; } }
.rec-meta { font-size: 12.5px; color: var(--muted); }

/* contact */
.fields { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
@media (min-width: 440px) { .fields { display: grid; grid-template-columns: 1fr 1fr; } }
.fields .full { grid-column: 1 / -1; }
.consent { margin-top: 13px; font-size: 12px; color: var(--faint); display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }
.consent svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--a2); }

/* ============================================================
   ILLUSTRATION ANIMATIONS
   ============================================================ */
.il-float { animation: ilFloat 5s ease-in-out infinite; }
.il-float2 { animation: ilFloat 6.5s ease-in-out infinite; animation-delay: -1.2s; }
.il-float3 { animation: ilFloat 7.5s ease-in-out infinite; animation-delay: -2.4s; }
@keyframes ilFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.il-pulse { animation: ilPulse 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes ilPulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
.il-spin { animation: spin 22s linear infinite; transform-origin: center; transform-box: fill-box; }
.il-spin-r { animation: spin 16s linear infinite reverse; transform-origin: center; transform-box: fill-box; }
.il-dash { stroke-dasharray: 5 7; animation: ilDash 8s linear infinite; }
@keyframes ilDash { to { stroke-dashoffset: -96; } }
.il-rise { animation: ilRise 0.9s var(--spring) both; }
@keyframes ilRise { from { opacity: 0; transform: translateY(14px) scale(0.9); } to { opacity: 1; transform: none; } }
.il-bar { transform-origin: bottom; animation: ilBar 2.6s ease-in-out infinite; }
@keyframes ilBar { 0%,100% { transform: scaleY(0.7); } 50% { transform: scaleY(1); } }
.il-tw { animation: ilTw 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ilTw { 0%,100% { opacity: 0.3; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1); } }

/* ============================================================
   DEBUG PANEL
   ============================================================ */
.debug { position: fixed; z-index: 50; right: 0; top: 0; bottom: 0; width: min(380px, 92vw);
  background: rgba(5,5,5,0.94); backdrop-filter: blur(20px); border-left: 1px solid var(--border-2);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5); display: flex; flex-direction: column; animation: slidePanel 0.4s var(--ease); }
@keyframes slidePanel { from { transform: translateX(100%); } to { transform: none; } }
.debug-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.debug-head .dh-t { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--a2-bright); }
.debug-head .x { width: 30px; height: 30px; border-radius: 8px; background: var(--glass-2); border: 1px solid var(--border); color: var(--muted); display: grid; place-items: center; }
.debug-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.debug-body .dsec { margin-bottom: 20px; }
.debug-body .dsec h4 { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 0 0 9px; }
.dbar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 6px; }
.dbar > i { display: block; height: 100%; background: var(--grad-bright); border-radius: 99px; transition: width 0.4s var(--ease); }
.dpct { font-size: 22px; font-weight: 800; font-family: var(--font-display); }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; }
.dtag { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,0.09); border: 1px solid rgba(242,237,225,0.24); color: var(--text); }
.angle { font-size: 14px; line-height: 1.5; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(150deg, rgba(255,255,255,0.095), rgba(255,255,255,0.025)); border: 1px solid rgba(242,237,225,0.20); color: var(--text); }
.djson { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; line-height: 1.55; color: #c8c0b5;
  white-space: pre-wrap; word-break: break-word; background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: 12px; padding: 12px; max-height: 280px; overflow-y: auto; }
.debug-hintbar { position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 40; font-size: 10.5px; color: var(--faint);
  background: rgba(5,5,5,0.72); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; backdrop-filter: blur(10px); pointer-events: none; opacity: 0.5; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.08s !important; }
  .blob { animation: none; }
  .card.enter-f, .card.enter-b { animation: cardFade 0.2s ease both; }
  @keyframes cardFade { from { opacity: 0; } to { opacity: 1; } }
}
