/* ============================================================
   KAYEM ASK — Pocket Answers (/tap/ask/ only).
   Version 4 design, owner-approved 2026-11-12. Mood is an accent
   and animation change per stage (body[data-stage]), not a new UI.
   Loaded by tap/ask/index.html only; no other page uses it.
   ============================================================ */
:root {
  color-scheme: dark;
  --ink: #0c1018;
  --text: #f9fafb;
  --subtext: #aab2c1;
  --accent: #72d2bd;
  --accent-rgb: 114,210,189;
  --pace: 3.6s;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height:100%; background:var(--ink); }
body { min-height:100vh; min-height:100dvh; margin:0; color:var(--text); background:radial-gradient(ellipse at 50% 38%, #1b2633 0%, #0e131d 55%, #090d13 100%); overflow-x:hidden; }
button { font: inherit; }
.ambient {position:fixed; inset:auto; border-radius:50%; pointer-events:none; filter:blur(90px); opacity:.18; transition:background 1s ease;}
.ambient-one {width:340px; height:340px; top:-190px; left:-80px; background:var(--accent);}
.ambient-two {width:310px; height:310px; right:-180px; bottom:8vh; background:var(--accent);opacity:.09;}
.page-shell {position:relative; max-width:830px; min-height:100vh; min-height:100dvh; margin:0 auto; padding:24px clamp(20px,5vw,54px) 28px; display:flex; flex-direction:column;}
.brandbar {display:flex; align-items:center; justify-content:space-between; gap:12px; color:#f4f5f8; font-size:12px; font-weight:850; letter-spacing:.13em;}
.brand-dot {color:var(--accent);}
.brand-caption {font-size:10px; font-weight:650; letter-spacing:.17em; color:#929bab;}
.experience {flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; justify-content:center; padding:35px 0 18px;}
.eyebrow {font-size:10px; color:var(--accent); font-weight:800; letter-spacing:.17em; display:flex; align-items:center; gap:8px;}
.live-dot {width:7px; height:7px; border-radius:50%; background:var(--accent); box-shadow:0 0 12px rgba(var(--accent-rgb),.75);}
.title {font-size:clamp(34px,7vw,54px); font-weight:850; letter-spacing:-.06em; margin:12px 0 3px; line-height:1.12;}
.title span {color:var(--accent);}
.subtitle {color:#aab2c1; font-size:clamp(13px,3.1vw,15px); margin:0 0 6px; line-height:1.5;}
.orb-wrap {width:270px; height:265px; display:grid; place-items:center; position:relative; margin:10px 0 5px; isolation:isolate;}
.aura {position:absolute; width:220px; height:220px; border-radius:50%; background:radial-gradient(circle,rgba(var(--accent-rgb),.17) 0%, rgba(var(--accent-rgb),.06) 43%, transparent 70%); filter:blur(18px); transition:background .9s ease; animation:auraBreathe var(--pace) ease-in-out infinite;}
.orb {width:186px; height:186px; border-radius:50%; position:relative; z-index:1; display:grid; place-items:center; transform-origin:center; background:radial-gradient(circle at 31% 22%, #50535a 0%, #272a2f 28%, #101216 63%, #030407 100%); border:1px solid rgba(255,255,255,.24); box-shadow:inset -10px -15px 18px rgba(0,0,0,.55), inset 10px 9px 20px rgba(255,255,255,.045),0 25px 40px rgba(0,0,0,.42),0 0 46px rgba(var(--accent-rgb),.12); animation:orbBreathe var(--pace) ease-in-out infinite; transition:box-shadow .8s ease;}
.orb-glint {position:absolute; width:82px; height:19px; border-radius:50%; background:rgba(255,255,255,.17); filter:blur(9px); transform:rotate(-30deg); top:24px; left:19px;}
.orb-center {position:relative; display:grid; place-items:center; width:88px; height:88px; border-radius:50%; background:radial-gradient(circle at 40% 33%, white, #ededed 68%, #d8d8d8 100%); box-shadow:0 0 1px #fff, 0 1px 5px rgba(0,0,0,.35);}
.orb-center span {font-family:Arial, Helvetica, sans-serif; color:#101010; font-size:29px; letter-spacing:-.06em; font-weight:900;}
.orb-shadow {position:absolute; z-index:0; width:137px; height:20px; bottom:22px; border-radius:50%; background:rgba(0,0,0,.47); filter:blur(13px);}
.status-area {width:100%; max-width:560px; min-height:180px; display:flex; align-items:center; flex-direction:column;}
.stage-label {color:var(--accent); font-size:10px; font-weight:850; letter-spacing:.18em; min-height:15px;}
.message {font-size:clamp(22px,5.2vw,32px); line-height:1.25; font-weight:750; letter-spacing:-.03em; margin:10px 0 8px; min-height:35px; text-wrap:balance;}
.support-message {font-size:14px; color:var(--subtext); line-height:1.6; min-height:23px; margin:2px 0 0;}
.timer {margin-top:19px; width:150px; height:4px; border-radius:999px; background:rgba(255,255,255,.11); overflow:hidden; transition:opacity .35s ease;}
.timer-fill {background:var(--accent); box-shadow:0 0 8px var(--accent); width:0%; height:100%; border-radius:inherit;}
.timer.running .timer-fill {animation:fillTimer 3s linear forwards;}
.answer-panel {width:100%; margin-top:8px; padding:14px 20px 18px; border-radius:22px; background:linear-gradient(145deg,rgba(var(--accent-rgb),.11),rgba(255,255,255,.025)); border:1px solid rgba(var(--accent-rgb),.38); box-shadow:0 0 32px rgba(var(--accent-rgb),.11), inset 0 1px 1px rgba(255,255,255,.03);}
.answer-panel[hidden] {display:none;}
.answer-panel.enter {animation:answerAppear .85s cubic-bezier(.2,.7,.23,1) both;}
.answer-kicker {color:var(--accent); font-size:10px; font-weight:850; letter-spacing:.18em;}
.answer-text {font-size:clamp(27px,6.1vw,41px); font-weight:850; line-height:1.22; letter-spacing:-.045em; margin:10px auto 3px; text-wrap:balance;}
.footer {padding:14px 0 5px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:7px 18px; font-size:11px; color:#7e8797; border-top:1px solid rgba(255,255,255,.08);}
.noscript {position:fixed; bottom:12px; left:12px; right:12px; padding:16px; border-radius:10px; background:#273143; color:white;}
/* Mood is an accent and animation change, not an entire new UI. */
body[data-stage="friendly"] {--accent:#72d2bd;--accent-rgb:114,210,189;--pace:3.6s;}
body[data-stage="curious"] {--accent:#75bde7;--accent-rgb:117,189,231;--pace:2.9s;}
body[data-stage="sarcastic"] {--accent:#e6b65d;--accent-rgb:230,182,93;--pace:2.4s;}
body[data-stage="sassy"] {--accent:#f1a061;--accent-rgb:241,160,97;--pace:2.15s;}
body[data-stage="annoyed"] {--accent:#f07870;--accent-rgb:240,120,112;--pace:1.85s;}
body[data-stage="fighting"] {--accent:#e96387;--accent-rgb:233,99,135;--pace:1.65s;}
body[data-stage="meltdown"] {--accent:#c294ff;--accent-rgb:194,148,255;--pace:1.3s;}
body[data-stage="legendary"] {--accent:#f0a3ff;--accent-rgb:240,163,255;--pace:1.1s;}
body[data-stage="sarcastic"] .orb {animation:orbWobble var(--pace) ease-in-out infinite;}
body[data-stage="sassy"] .orb,body[data-stage="annoyed"] .orb {animation:orbWobble var(--pace) ease-in-out infinite;}
body[data-stage="fighting"] .orb,body[data-stage="meltdown"] .orb,body[data-stage="legendary"] .orb {animation:orbFlustered var(--pace) ease-in-out infinite;}
body.revealed .orb {box-shadow:inset -10px -15px 18px rgba(0,0,0,.55),inset 10px 9px 20px rgba(255,255,255,.045),0 25px 40px rgba(0,0,0,.42),0 0 60px rgba(var(--accent-rgb),.42);}
@keyframes orbBreathe {0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}
@keyframes auraBreathe {0%,100%{transform:scale(.92);opacity:.65}50%{transform:scale(1.12);opacity:1}}
@keyframes orbWobble {0%,100%{transform:rotate(0) scale(1)}25%{transform:rotate(-2.5deg) scale(1.025)}50%{transform:rotate(1.8deg) scale(1.055)}75%{transform:rotate(-1deg) scale(1.025)}}
@keyframes orbFlustered {0%,100%{transform:rotate(0) scale(1)}17%{transform:rotate(-4deg) scale(1.055)}36%{transform:rotate(4deg) scale(.985)}59%{transform:rotate(-2deg) scale(1.065)}79%{transform:rotate(2deg) scale(1.025)}}
@keyframes fillTimer {from{width:0%}to{width:100%}}
@keyframes answerAppear {from{opacity:0;transform:translateY(13px) scale(.975);filter:blur(5px)}to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}
@media(min-width:640px){.experience{padding-top:40px}.orb-wrap{width:310px;height:300px}.orb{width:215px;height:215px}.orb-center{width:100px;height:100px}.orb-center span{font-size:33px}.orb-shadow{bottom:19px;width:157px}}
@media(max-width:430px){.page-shell{padding-top:19px;padding-bottom:18px}.orb-wrap{margin-top:3px;margin-bottom:2px;height:245px}.orb{width:171px;height:171px}.orb-center{width:82px;height:82px}.orb-center span{font-size:26px}.orb-shadow{bottom:16px}.experience{padding-top:22px}.status-area{min-height:178px}.footer{justify-content:center;text-align:center}}
@media(prefers-reduced-motion:reduce){.orb,.aura,.timer.running .timer-fill,.answer-panel.enter{animation:none !important}.timer.running .timer-fill{width:100%}.orb,.ambient,.answer-panel{transition:none!important}}

/* ASK ball is the only customer-facing control. Readiness first: no automatic reveal. */
.orb-button {appearance:none; -webkit-appearance:none; background:transparent; border:0; padding:0; color:inherit; font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation; user-select:none;}
.orb-button:focus-visible {outline:3px solid var(--accent); outline-offset:5px; border-radius:30px;}
.orb-hint {color:var(--subtext);font-size:10px;font-weight:800;letter-spacing:.15em;margin:-4px 0 14px;opacity:.85;}
.orb-button.is-pressed .orb {animation:none!important;transform:translateY(6px) scale(.91)!important;transition:transform .09s ease-out,box-shadow .09s ease-out;box-shadow:inset -5px -8px 20px #000b,0 9px 15px #0008,0 0 16px rgba(var(--accent-rgb),.28);}
.orb-button.is-releasing .orb {animation:orbTapRelease .5s cubic-bezier(.16,.75,.26,1) both!important;}
.orb-button.is-releasing .aura {animation:orbTapRipple .6s ease-out both!important;}
@keyframes orbTapRelease {0%{transform:translateY(6px) scale(.91)}34%{transform:translateY(-6px) scale(1.09)}64%{transform:translateY(2px) scale(.98)}83%{transform:translateY(-1px) scale(1.025)}100%{transform:translateY(0) scale(1)}}
@keyframes orbTapRipple {0%{transform:scale(.9);opacity:.95}100%{transform:scale(1.6);opacity:0}}
@media(prefers-reduced-motion:reduce){.orb-button.is-pressed .orb,.orb-button.is-releasing .orb,.orb-button.is-releasing .aura{animation:none!important;transform:none!important;transition:none!important}}

/* V4: clearly distinguish invitation, thinking and answer; prevent re-asking mid-sequence. */
.orb-hint {font-size:clamp(11px,2.8vw,13px); letter-spacing:.075em; color:#edf7ff; background:rgba(var(--accent-rgb),.12); border:1px solid rgba(var(--accent-rgb),.4); border-radius:999px; padding:10px 14px; max-width:340px; line-height:1.45; margin-top:0; margin-bottom:18px; }
.message {max-width:540px;}
.support-message {color:#d5dce7;font-size:clamp(14px,3vw,16px);max-width:470px;}
.orb-button[aria-disabled="true"] {cursor:default;}

/* Integration (kayem.co): semantic elements, a11y helpers, ball span children. */
.eyebrow, .stage-label, .answer-kicker { margin:0; }
.orb-button > span { display:block; }
.orb-button .orb, .orb-button .orb-center { display:grid; }
.brand { color:inherit; text-decoration:none; }
.brand:focus-visible { outline:3px solid var(--accent); outline-offset:4px; border-radius:4px; }
.visually-hidden { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* Instruction clarity (2026-11-13): the how-to line sits ABOVE the ball as the
   main instruction. Plain sentence case and a larger size so it reads at a
   glance on small phones; same colours and pill as V4. A fixed two-line box
   keeps the ball from jumping when the line changes. */
.orb-hint {font-size:clamp(15px,4.2vw,17px); font-weight:700; letter-spacing:0; line-height:1.4; text-transform:none; color:#f4f8ff; max-width:360px; margin:16px auto 2px; padding:11px 18px; border-radius:20px; min-height:calc(2 * 1.4em + 22px); display:flex; align-items:center; justify-content:center; text-wrap:balance;}
@media(max-width:430px){.orb-hint{margin-top:12px}}
