/* Sixsense. Light mesh, pearl, gold line. A real app, not a form.
   BRAYON PIESKE - "Vision isn't enough." */

:root {
  --ink: #1A1C22;
  --mute: #5E6270;
  --blue: #4285F4;
  --blue-2: #1A73E8;
  --purple: #8E75B2;
  --pink: #FDADEE;
  --gold: #C9A44A;
  --gold-2: #E8D48A;
  --card: rgba(255, 255, 255, 0.72);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-x: clip;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background: #EEF1FF;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transition: background 700ms ease;
  background:
    radial-gradient(1100px 640px at 6% -8%, rgba(66, 133, 244, 0.26), transparent 58%),
    radial-gradient(860px 560px at 108% 4%, rgba(253, 173, 238, 0.28), transparent 52%),
    radial-gradient(720px 480px at 70% 108%, rgba(142, 117, 178, 0.16), transparent 55%),
    linear-gradient(180deg, #F8F5FF 0%, #EEF3FF 48%, #F8EEF6 100%);
}
body.weather-hum .sky {
  background:
    radial-gradient(1100px 640px at 8% -8%, rgba(66, 133, 244, 0.22), transparent 58%),
    radial-gradient(900px 560px at 100% 8%, rgba(201, 164, 74, 0.18), transparent 52%),
    linear-gradient(180deg, #F6F4FF 0%, #F3F0E8 100%);
}
body.weather-voice .sky {
  background:
    radial-gradient(1100px 640px at 10% 0%, rgba(201, 164, 74, 0.28), transparent 55%),
    radial-gradient(800px 500px at 100% 20%, rgba(253, 173, 238, 0.22), transparent 50%),
    linear-gradient(180deg, #FBF6EC 0%, #F3EEFF 100%);
}
body.weather-spike .sky {
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(66, 133, 244, 0.32), transparent 50%),
    radial-gradient(700px 480px at 90% 80%, rgba(234, 67, 53, 0.12), transparent 50%),
    linear-gradient(180deg, #F4F1FF 0%, #F7EFEA 100%);
}
body.weather-alarm .sky {
  background:
    radial-gradient(800px 500px at 50% -10%, rgba(234, 67, 53, 0.18), transparent 55%),
    radial-gradient(900px 600px at 0% 100%, rgba(201, 164, 74, 0.2), transparent 50%),
    linear-gradient(180deg, #F8EFEF 0%, #F3F0FF 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.65;
}
.b1 { width: 380px; height: 380px; left: -90px; top: 12%; background: rgba(66, 133, 244, 0.38); }
.b2 { width: 300px; height: 300px; right: -70px; top: 0; background: rgba(253, 173, 238, 0.42); }
.b3 { width: 240px; height: 240px; right: 22%; bottom: -50px; background: rgba(201, 164, 74, 0.16); }
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='80' height='80' filter='url(%23n)'/></svg>");
  pointer-events: none;
}

button, input { font: inherit; }
button { cursor: pointer; }

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

.app {
  width: min(430px, 100%);
  margin-inline: auto;
  min-height: 100dvh;
  padding: calc(18px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 50px rgba(80, 70, 140, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow:
    0 8px 20px rgba(80, 70, 140, 0.16),
    0 0 0 1px rgba(201, 164, 74, 0.28);
}
.top-copy { flex: 1; min-width: 0; }
.wordmark {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.gold-line {
  display: block;
  width: 28px;
  height: 1.5px;
  margin: 6px 0 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), transparent);
}
.tagline {
  margin: 0;
  font-size: 12px;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn {
  width: 40px;
  height: 40px;
  justify-self: end;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
}
.icon-btn:hover { background: #fff; }
.icon-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.status[data-phase="listening"] i { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16); }
.status[data-phase="reading"] i { background: #eab308; animation: breath 1.4s ease-out infinite; }
.status[data-phase="demo"] i { background: var(--gold); }
.status[data-phase="error"] i { background: #EA4335; }
.text-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue-2);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.text-btn:hover { text-decoration: underline; }
.text-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.chamber, .around, .connect, .seg-wrap {
  min-width: 0;
}
.chamber, .around {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 46px rgba(80, 70, 140, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.chamber {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 16px 16px 18px;
  position: relative;
  overflow: hidden;
}
.chamber::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-2), var(--pink), var(--blue), transparent);
  opacity: 0.7;
}

.pearl-stage {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  inset: 18px;
  pointer-events: none;
}
.bead {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 74, 0.18);
  transform: rotate(var(--a)) translateY(-62px);
}
.bead.u1 { background: #8E75B2; box-shadow: 0 0 0 3px rgba(142, 117, 178, 0.2); }
.bead.u2, .bead.u3 { background: #EA4335; box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.18); }

.ring-wave {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  pointer-events: none;
}

.pearl {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  --energy: 0;
}
.orb-aura {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #C9A44A, #F7F1EA, #8E75B2, #FDADEE, #C9A44A);
  opacity: calc(0.28 + var(--energy) * 0.5);
  filter: blur(14px);
  transition: opacity 200ms ease;
}
.chamber.live .orb-aura { animation: spin 9s linear infinite; }
.orb-core {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #F7F1EA 46%, #E7D8C8 100%);
  border: 1.5px solid rgba(201, 164, 74, 0.7);
  box-shadow:
    inset 0 -10px 18px rgba(160, 130, 90, 0.12),
    0 16px 32px rgba(201, 164, 74, 0.22);
  transform: scale(calc(1 + var(--energy) * 0.06));
  transition: transform 120ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.pearl-slash {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 2px;
  height: 64%;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  transform: rotate(-32deg);
  opacity: 0.9;
}
body.weather-voice .orb-core {
  filter: saturate(1.08);
  box-shadow:
    inset 0 -10px 18px rgba(160, 130, 90, 0.12),
    0 18px 36px rgba(201, 164, 74, 0.32);
}
body.weather-alarm .orb-core {
  border-color: rgba(234, 67, 53, 0.55);
  box-shadow:
    inset 0 -10px 18px rgba(160, 80, 70, 0.12),
    0 0 0 6px rgba(234, 67, 53, 0.12),
    0 18px 36px rgba(234, 67, 53, 0.2);
}
.pearl:hover .orb-core { transform: scale(1.04); }
.pearl:focus-visible { outline: 2px solid var(--gold); outline-offset: 10px; }

.now {
  margin-top: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(80, 70, 140, 0.1);
  position: relative;
  overflow: hidden;
}
.now::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}
.now[data-urgency="2"]::before,
.now[data-urgency="3"]::before { background: linear-gradient(180deg, #EA4335, #F58C82); }
.now.swap { animation: now-swap 460ms cubic-bezier(.2, .7, .2, 1); }
@keyframes now-swap {
  0%   { opacity: 0.3; transform: translateY(10px) scale(0.985); }
  100% { opacity: 1;   transform: translateY(0) scale(1); }
}
.now-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.now-meta[hidden] { display: none; }
.now-meta .src, .now-meta time {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.now-meta .src[data-src="gemini"] { color: var(--blue-2); }
.now-meta .src[data-src="demo"] { color: var(--purple); }
.now-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.chamber.live .now-kicker { color: var(--blue-2); }
.lbl {
  margin: 12px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.lbl.reading { color: #8E75B2; }
.now h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
#now-sense {
  margin: 8px 0 0;
  font-size: 16px;
  color: #4a4d59;
  overflow-wrap: anywhere;
}
.dense-fact #now-sense,
.dense-fact .note p:not(.lbl) {
  font-size: 13px;
  opacity: 0.78;
}
.dense-imagine #now-sense,
.dense-imagine .note p:not(.lbl) {
  color: #5b3f86;
  font-size: 15px;
}
.chamber .btn { margin-top: 16px; min-width: 140px; }
.chamber .btn[hidden] { display: none !important; }

/* First-run affordance: a big, obvious "Activate microphone" call to action. */
.btn-activate {
  margin-top: 18px;
  width: min(320px, 100%);
  min-height: 56px;
  font-size: 16px;
  font-weight: 650;
}
.btn-activate svg { flex: 0 0 auto; }
/* Only draw the eye on the first visit; calm afterwards. */
.chamber.hint .btn-activate { animation: cue-pulse 2.4s ease-in-out infinite; }
@keyframes cue-pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(66, 133, 244, 0.28), 0 0 0 0 rgba(66, 133, 244, 0.35); }
  50%      { box-shadow: 0 12px 28px rgba(66, 133, 244, 0.34), 0 0 0 12px rgba(66, 133, 244, 0); }
}

/* On the very first visit, make the pearl itself read as tappable. */
.chamber.hint .orb-aura { animation: aura-hint 2.4s ease-in-out infinite; }
.chamber.hint .pearl::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(201, 164, 74, 0.55);
  animation: tap-ring 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes aura-hint {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.7;  transform: scale(1.05); }
}
@keyframes tap-ring {
  0%   { transform: scale(0.9); opacity: 0.8; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes spin { to { transform: rotate(1turn); } }
@keyframes breath {
  0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(234, 179, 8, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  transition: transform 150ms ease, filter 150ms ease, background 150ms ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #4285F4 0%, #6B7CFF 48%, #B07CD8 100%);
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.28);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.around[hidden], .connect[hidden], .seg-wrap[hidden] { display: none !important; }

.connect {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(90deg, rgba(66, 133, 244, 0.12), rgba(253, 173, 238, 0.14));
  backdrop-filter: blur(16px);
  color: inherit;
}
.connect > span:nth-of-type(2) { flex: 1; min-width: 0; }
.connect-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #FDADEE);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.12);
  flex: 0 0 10px;
}
.connect strong { display: block; font-size: 14px; font-weight: 650; }
.connect em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--mute);
}
.connect-go {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 650;
  color: var(--blue-2);
}
.connect:hover { filter: brightness(1.03); }
.connect:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.seg-wrap { display: grid; gap: 8px; }
.seg-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
}
.seg-hint svg { color: var(--purple); }
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(80, 70, 140, 0.12);
  backdrop-filter: blur(16px);
}
.seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  min-height: 46px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--mute);
  transition: background 200ms ease, color 200ms ease;
}
.seg button svg { flex: 0 0 auto; }
.seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(80, 70, 140, 0.12);
}
#mode-imagine[aria-pressed="true"] {
  color: #5b3f86;
  background: linear-gradient(180deg, #fff, #FBEFFF);
}
/* draw the eye to the creative mode while it is not selected */
#mode-imagine[aria-pressed="false"] { animation: seg-invite 2.4s ease-in-out infinite; }
@keyframes seg-invite {
  0%, 100% { background: transparent; color: var(--mute); }
  50%      { background: rgba(142, 117, 178, 0.14); color: #5b3f86; }
}

.around { padding: 20px 18px 18px; flex: 1; }
.around-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--mute);
}
.law {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--mute);
}
.empty {
  margin: 16px 0 0;
  padding: 22px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(142, 117, 178, 0.28);
  background: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  color: var(--mute);
  text-align: center;
}
.empty[hidden] { display: none; }
.feed { display: grid; gap: 10px; margin-top: 14px; }
.note {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 14px 16px 14px 18px;
  position: relative;
  box-shadow: 0 8px 20px rgba(80, 70, 140, 0.06);
}
.note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}
.note.u2::before, .note.u3::before { background: #EA4335; }
.note h3 { margin: 0; font-size: 15px; font-weight: 650; }
.note p { margin: 6px 0 0; font-size: 14px; color: var(--mute); }
.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}
.note time, .src {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.src[data-src="gemini"] { color: var(--blue-2); }
.wrong-btn {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  font-weight: 650;
  color: var(--blue-2);
}
.note.wrong {
  opacity: 0.55;
  outline: 1px dashed rgba(234, 67, 53, 0.4);
}
.note.wrong h3 { text-decoration: line-through; }
.note h3, .note p { display: block; }

.onboard {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  overflow: auto;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(66, 133, 244, 0.26), transparent 55%),
    radial-gradient(800px 500px at 100% 80%, rgba(253, 173, 238, 0.28), transparent 50%),
    #F4F1FF;
}
.onboard[hidden] { display: none; }
.onboard .frame {
  width: min(400px, 100%);
  min-width: 0;
  padding: 28px 20px 24px;
  border-radius: 32px;
  position: relative;
}
.onboard-hero {
  display: block;
  width: 100%;
  height: 196px;
  margin: -6px 0 10px;
  touch-action: none;
}
@media (max-width: 374px) {
  .onboard-hero { height: 168px; }
}

/* The brand logo, framed on a dark panel so its neon reads premium. */
.onboard-logo {
  display: grid;
  place-items: center;
  padding: 14px;
  margin: -4px 0 16px;
  border-radius: 26px;
  background: radial-gradient(120% 120% at 50% 34%, #17102b 0%, #0b0715 62%, #050309 100%);
  box-shadow:
    0 22px 52px rgba(96, 52, 176, 0.32),
    0 0 0 1px rgba(150, 120, 220, 0.22) inset;
}
.onboard-logo img {
  display: block;
  width: 100%;
  max-width: 264px;
  height: auto;
  border-radius: 16px;
}
@media (max-width: 374px) {
  .onboard-logo img { max-width: 220px; }
}
.gold-slash {
  display: block;
  width: 36px;
  height: 2px;
  margin: 0 0 18px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--blue-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.onboard h1 {
  margin: 8px 0 0;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}
.lead {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--mute);
  overflow-wrap: break-word;
}
.onboard .btn { width: 100%; margin-top: 28px; }
.fine {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--mute);
  overflow-wrap: break-word;
}

.sheet {
  border: 0;
  width: min(400px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  padding: 0;
  background: transparent;
  margin: auto;
}
.sheet::backdrop { background: rgba(28, 26, 48, 0.38); }
.sheet form {
  padding: 22px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 255, 0.94));
  box-shadow: 0 24px 60px rgba(80, 70, 140, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.9);
  min-width: 0;
  overflow: hidden;
}
.sheet h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.sheet-sub { margin: 6px 0 0; font-size: 13px; color: var(--mute); }
.gemini-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #F7F4FF);
  border: 1px solid #EEEAF6;
}
.gemini-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sheet h3 { margin: 0; font-size: 15px; font-weight: 650; }
.status-line { margin: 4px 0 0; font-size: 13px; color: var(--mute); }
.status-line.ok { color: #1A73E8; }
.pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: #F1F3F8;
  color: var(--mute);
}
.pill.on {
  background: rgba(66, 133, 244, 0.12);
  color: var(--blue-2);
}
.hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--mute);
  overflow-wrap: anywhere;
}
.sheet label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.sheet label[hidden], .link-action[hidden] { display: none; }
.sheet input {
  width: 100%;
  font-weight: 400;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #E3E7EF;
  border-radius: 14px;
  background: #F8FAFD;
  -webkit-text-security: disc;
}
.sheet input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.link-action {
  margin-top: 12px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue-2);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}
.link-action.danger { color: #C5221F; }
.sheet menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
.sheet menu .btn[hidden] { display: none !important; }

/* Credits + hackathon marks */
.credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 10px 0 2px;
  font-size: 11px;
  color: var(--mute);
  text-align: center;
}
.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.credit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #FDADEE);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.12);
  flex: 0 0 auto;
}
.onboard-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--mute);
  text-align: center;
  overflow-wrap: anywhere;
}
.watermark {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: rgba(80, 70, 140, 0.16);
  pointer-events: none;
  z-index: 2;
  user-select: none;
}
@media (max-width: 900px) { .watermark { display: none; } }

@media (min-width: 768px) {
  .stage { padding: 36px 16px 48px; }
  .app {
    width: 390px;
    min-height: 760px;
    max-height: none;
    overflow: visible;
    border-radius: 40px;
    padding: 22px 18px 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.38));
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.95) inset,
      0 30px 80px rgba(70, 60, 130, 0.18);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
  }
}

@media (max-width: 430px) {
  .connect-go { display: none; }
}

@media (max-width: 374px) {
  .app { padding-inline: 14px; gap: 12px; }
  .wordmark { font-size: 18px; }
  .pearl-stage { width: 132px; height: 132px; }
  .pearl { width: 96px; height: 96px; }
  .orb-core { width: 78px; height: 78px; }
  .bead { transform: rotate(var(--a)) translateY(-56px); }
  .chamber { padding: 14px 12px 16px; }
  .now h2 { font-size: 22px; }
  .onboard h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .chamber.live .orb-aura,
  .status[data-phase="reading"] i,
  .chamber.hint .btn-activate,
  .chamber.hint .orb-aura,
  .chamber.hint .pearl::after,
  #mode-imagine[aria-pressed="false"] { animation: none; }
}
