/* =============================================
   UMAMI · Eat Finder — Mobile (iPhone) layout
   ============================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080c10;
  --surface: #0d1520;
  --surface2: #111d2e;
  --border: rgba(100, 180, 255, 0.12);
  --accent: #3af0c0;
  --accent2: #3b9eff;
  --warn: #f5a623;
  --danger: #ff4f4f;
  --text: #e8f4ff;
  --muted: rgba(200, 220, 255, 0.45);
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;

  /* Safe area helpers for iOS notch + home bar */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: contain;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.mob-app {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 0;
}

/* === Entry point — "tap to begin" ===
   A futuristic button with a living voice waveform at its centre. On open,
   particles converge from a wide dispersion to assemble the ring + waveform;
   tapping anywhere begins the session. Full-screen overlay (transparent
   canvas) so the dispersion can sweep in from the edges. Hidden once a session
   starts. */
.mob-begin {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mob-begin-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.mob-begin-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  /* leading space balances the trailing letter-spacing so it stays centred */
  padding-left: 0.3em;
  color: rgba(200, 235, 255, 0.82);
  text-shadow: 0 0 12px rgba(90, 200, 255, 0.45);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.mob-begin-label.is-shown {
  opacity: 1;
}

.mob-app.is-session .mob-begin,
.mob-app.is-canvas .mob-begin {
  display: none;
}

/* === Blank canvas (post-tap) ===
   Tapping "begin" hands off to the 3D voice art over an otherwise blank canvas
   showing only the top umami bar. The voice bar stays hidden — the sculpture is
   the voice surface now. The people/transcript and recommendations sections are
   already hidden while not in a session. */
.mob-app.is-canvas:not(.is-session) .mob-waveform {
  display: none;
}

/* === First-utterance 3D voice art ===
   Full-bleed backdrop behind everything (header is z-index 10 and stays on top).
   Hidden until the blank canvas, faded in over ~1.2s; folded away once the
   session UI arrives so it doesn't fight the content for attention. */
.mob-voice3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.mob-app.is-canvas .mob-voice3d {
  opacity: 1;
}

.mob-app.is-session .mob-voice3d {
  opacity: 0;
}

/* === Canvas guidance note ===
   A quiet prompt sitting beneath the bead cloud while on the blank canvas. Low
   in the frame so it never crowds the blob; fades in with the canvas and away
   the moment a session starts. pointer-events:none so taps still pass through. */
.mob-canvas-note {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 16%);
  transform: translateX(-50%);
  width: min(82%, 320px);
  z-index: 1;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.mob-app.is-canvas:not(.is-session) .mob-canvas-note {
  opacity: 1;
}

.mob-canvas-note-q {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: rgba(232, 244, 255, 0.82);
  text-shadow: 0 0 18px rgba(58, 240, 192, 0.28);
}

.mob-canvas-note-sub {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Blank-canvas start. On open, only the top bar + voice bar show — the
   greeting is being rethought. The people/transcript and recommendations
   sections reveal once a session starts (.is-session, set on first Start).
   Scoped with :not(.is-session) so this beats the sections' own display
   rules regardless of source order. */
.mob-app:not(.is-session) .mob-people-section,
.mob-app:not(.is-session) .mob-pois {
  display: none;
}

/* === Voice echo — static frosted bar ===
   The canvas paints a fixed, soft horizontal bar (pale-blue→white) over the
   dark UI. The shape never moves; only the colour intensity responds to the
   live mic. The container is just the canvas frame so the glow can bleed past
   its edge. */
.mob-waveform {
  position: relative;
  height: 44px;
  margin: 0.5rem 0.95rem 0.1rem;
  opacity: 0.55;
  transition: opacity 0.45s ease;
  /* Long-press target for the mic pause/resume menu — suppress the iOS callout
     and text selection so the hold reads as a gesture, not a selection. */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.mob-waveform.is-active {
  opacity: 1;
}

.mob-waveform-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* === People row (iOS Stories-style avatar strip) === */
.mob-people-section {
  background: rgba(8, 12, 16, 0.92);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0 0.45rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Mic paused → gray out + dim the people avatars and the transcript so the
   paused state is obvious at a glance. Toggled via .is-mic-paused on .mob-app. */
.mob-app.is-mic-paused .mob-people-section {
  filter: grayscale(1);
  opacity: 0.4;
}

.mob-people {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  /* Vertical padding lives here (not on the section) because overflow-x: auto
     implicitly forces overflow-y: auto, so the active-speaker ring would be
     clipped at this element's edges without inner breathing room. */
  padding: 0.5rem 0.95rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mob-people::-webkit-scrollbar {
  display: none;
}

.mob-people-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.1rem;
}

.mob-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  min-width: 60px;
}

.mob-person-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}

/* Active speaker — colored ring offset from the avatar by a thin
   background-color gap, matching the iOS Stories look. */
.mob-person.active .mob-person-avatar {
  border-color: transparent;
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--person-color, var(--accent));
  transform: scale(1.04);
}

.mob-person-name {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.mob-person.active .mob-person-name {
  color: var(--person-color, var(--accent));
  font-weight: 700;
}

/* === Live transcript strip ===
   Quiet two-line window beneath the people row. The latest utterance sits
   at full presence; the prior line fades into the top of the strip. */
.mob-transcript {
  margin: 0.7rem 0.95rem 0;
  padding: 0.45rem 0.7rem 0.5rem;
  border-radius: 10px;
  background: rgba(20, 30, 50, 0.35);
  border: 1px solid rgba(100, 180, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 2.4rem;
  /* Grow to show a wrapped long turn, capped so it never dominates the screen;
     scroll vertically past the cap. Horizontal overflow stays clipped so text
     never runs off the viewport — it wraps instead (see .mob-transcript-text). */
  max-height: 24vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* Soft fade at the top of the strip so older lines look like they're
   slipping out rather than getting hard-clipped. */
.mob-transcript::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(to bottom,
      rgba(20, 30, 50, 0.55),
      transparent);
  pointer-events: none;
  z-index: 1;
}

.mob-transcript-empty {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.1rem 0;
  align-self: center;
}

.mob-transcript-line {
  display: flex;
  /* flex-start (not baseline) so the dot + speaker chip sit at the TOP of a
     multi-line wrapped turn rather than floating to its last line. */
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.25;
  min-width: 0;
  opacity: 0.42;
  transition: opacity 0.2s ease;
}

/* Most recent line gets full presence; everything earlier fades. */
.mob-transcript-line:last-child {
  opacity: 1;
}

.mob-transcript-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--line-color, var(--accent));
  transform: translateY(-1px);
}

.mob-transcript-speaker {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-color, var(--accent));
  font-weight: 700;
  flex-shrink: 0;
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mob-transcript-text {
  font-family: var(--sans);
  color: var(--text);
  letter-spacing: 0;
  /* Take the remaining width and wrap long turns onto multiple lines instead of
     overflowing the viewport horizontally. break-word handles very long words /
     URLs that would otherwise still overflow. */
  flex: 1;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.mob-transcript-line.is-new {
  animation: mobTransIn 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes mobTransIn {
  0% {
    transform: translateY(6px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* === Header === */
.mob-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: calc(var(--safe-top) + 0.55rem) 0.85rem 0.55rem;
  background: rgba(8, 12, 16, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mob-brand {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.mob-brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: mobPulse 2s infinite;
}

@keyframes mobPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.25);
    opacity: 0.55;
  }
}

.mob-loc {
  /* Hidden for now — rethinking the opening UI. Remove this line to restore. */
  display: none;
  flex: 1;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 30, 50, 0.4);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mob-loc.mob-loc-hint {
  background: rgba(58, 240, 192, 0.12);
  border-color: rgba(58, 240, 192, 0.4);
  color: var(--accent);
}

.mob-record {
  /* Hidden for now — rethinking how the human initiates the conversation.
     Remove this line to bring the Start button back. */
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: #04161c;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  min-height: 36px;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}

.mob-record:active {
  transform: scale(0.96);
}

.mob-record.mob-listening {
  background: var(--danger);
  color: #fff;
}

.mob-record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #04161c;
}

.mob-record.mob-listening .mob-record-dot {
  background: #fff;
  animation: mobPulse 0.8s infinite;
}

/* === Section shared chrome === */
.mob-section-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 16, 0.85);
  position: sticky;
  top: 0;
  z-index: 2;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.mob-section-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 1;
}

.mob-section-meta {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
}

.mob-refresh {
  color: var(--accent);
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  background: rgba(58, 240, 192, 0.08);
}

.mob-refresh:active {
  background: rgba(58, 240, 192, 0.2);
}

/* === POIs section === */
.mob-pois {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  min-height: 0;
}

.mob-poi-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Bottom pad accounts for the iOS home indicator so the last card never
     gets clipped by the safe area. */
  padding: 0.6rem 0.65rem calc(var(--safe-bottom) + 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.mob-poi-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-align: center;
  padding: 1.5rem 1rem;
  line-height: 1.6;
}

/* === POI card · Desktop-derived horizontal layout ===
   Photo square on the left (matches desktop's 200px column proportions
   scaled for mobile), body stacked on the right. flex-shrink:0 keeps cards
   from getting crushed when the scroll container is a flex column. */
.mob-poi {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  grid-template-columns: 124px 1fr;
  min-height: 124px;
  position: relative;
  flex-shrink: 0;
}

.mob-poi.source-twin {
  border-left: 3px solid var(--accent);
}

.mob-poi.source-places {
  border-left: 3px solid var(--accent2);
}

.mob-poi.source-wildcard {
  border-left: 3px solid var(--warn);
}

.mob-poi-photo {
  width: 124px;
  height: 100%;
  min-height: 124px;
  background:
    radial-gradient(circle at 30% 30%, rgba(58, 240, 192, 0.22), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(167, 139, 250, 0.22), transparent 60%),
    var(--surface2);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mob-poi-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* Fallback letter behind any <img>. If the image fails or is missing, the
   letter is revealed on the gradient — no blank squares. */
.mob-poi-photo-letter {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(232, 244, 255, 0.55);
  line-height: 1;
  user-select: none;
}

.mob-poi-body {
  padding: 0.65rem 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  /* allow text truncation inside the grid cell */
}

.mob-poi-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.mob-poi-badge {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  padding: 0.14rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
}

.mob-poi-badge-twin {
  background: rgba(58, 240, 192, 0.12);
  color: var(--accent);
}

.mob-poi-badge-new {
  background: rgba(59, 158, 255, 0.12);
  color: var(--accent2);
}

.mob-poi-badge-wild {
  background: rgba(255, 190, 58, 0.12);
  color: var(--warn);
}

.mob-poi-badge-requested {
  background: rgba(255, 107, 157, 0.2);
  color: #ff6b9d;
  border: 1px solid rgba(255, 107, 157, 0.5);
}

.mob-poi-score {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent);
  font-weight: 700;
}

.mob-poi-owner {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.55rem;
  border: 1px solid var(--border);
}

.mob-poi-owner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mob-poi-title {
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  /* 2-line clamp prevents tall cards on long names. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mob-poi-address {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mob-poi-rationale {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-style: italic;
  color: rgba(232, 244, 255, 0.72);
  line-height: 1.35;
  /* Keep rationale to 2 lines so the card stays compact. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mob-poi-link {
  align-self: flex-start;
  margin-top: 0.1rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--accent2);
  text-decoration: none;
}

.mob-poi-link:active {
  color: var(--accent);
}

.mob-poi.new-arrival {
  animation: mobPop 0.4s ease-out;
}

@keyframes mobPop {
  0% {
    transform: scale(0.94);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* === Conversation bubbles === */
.mob-chat {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  min-height: 0;
}

.mob-bubble-feed {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.65rem calc(var(--safe-bottom) + 0.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mob-bubble-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  text-align: center;
  padding: 1.2rem 1rem;
  line-height: 1.55;
}

.mob-bubble-error {
  color: var(--danger);
  background: rgba(255, 79, 79, 0.08);
  border: 1px solid rgba(255, 79, 79, 0.25);
  border-radius: 10px;
  margin: 0.5rem;
  padding: 0.85rem 0.95rem;
  text-align: left;
}

/* Each turn is a row: stack consecutive turns from the same speaker so we
   only show the avatar/name once. */
.mob-bubble-group {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin-top: 0.4rem;
}

.mob-bubble-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.15rem;
  margin-bottom: 0.1rem;
}

.mob-bubble-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mob-bubble-name {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.mob-bubble {
  align-self: flex-start;
  max-width: 84%;
  padding: 0.5rem 0.75rem;
  border-radius: 16px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.35;
  word-wrap: break-word;
  border-left: 3px solid var(--speaker-color, var(--accent));
}

.mob-bubble.is-new {
  animation: mobBubbleIn 0.3s ease-out;
}

@keyframes mobBubbleIn {
  0% {
    transform: translateY(8px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Smaller text styling for older bubbles to keep focus on recent ones. */
.mob-bubble-time {
  font-family: var(--mono);
  font-size: 0.5rem;
  color: var(--muted);
  margin-left: auto;
}

/* === Microphone-permission notice ===
   Shown when getUserMedia is denied/unavailable. Fixed above EVERYTHING (canvas,
   header, sections) so the user is never stranded on an empty UI with the error
   buried in a not-yet-revealed surface. */
.mob-mic-notice {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* See-through scrim: the 3D audio-reactive animation lives behind this (z-index 0)
     and we want the user to keep watching it while they reconnect the mic. So no
     backdrop blur here and only the faintest dim — just enough to seat the glass
     card. The blur/frost lives on the card itself, not the whole backdrop. */
  background: rgba(8, 12, 16, 0.12);
}

/* The [hidden] attribute must beat display:flex above. */
.mob-mic-notice[hidden] {
  display: none;
}

/* Frosted-glass card: see-through tint + strong backdrop blur, a bright hairline
   border, defined rounded corners, and an inner top highlight for the sheen. */
.mob-mic-notice-card {
  width: min(92%, 340px);
  background: rgba(22, 34, 52, 0.45);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(180, 210, 255, 0.18);
  border-radius: 20px;
  padding: 1.7rem 1.4rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mob-mic-notice-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.mob-mic-notice-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Glass pane for the message: a translucent frosted slab with its own blur, a
   bright hairline border and a top sheen — so the copy reads like etched glass
   floating over the animation, not flat text on the card. */
.mob-mic-notice-msg {
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(232, 244, 255, 0.82);
  margin-bottom: 1.2rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(180, 210, 255, 0.06);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(180, 210, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mob-mic-notice-btn {
  display: inline-block;
  padding: 0.7rem 1.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #04161c;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  min-height: 44px;
  transition: transform 0.1s;
}

.mob-mic-notice-btn:active {
  transform: scale(0.97);
}

/* === Mic pause/resume menu (long-press the waveform bar) === */
.mob-mic-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* Mostly-transparent scrim — keep the app visible behind the glass dialog. */
  background: rgba(8, 12, 16, 0.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.mob-mic-menu[hidden] {
  display: none;
}

/* Frosted-glass card (matches the notice dialog). */
.mob-mic-menu-card {
  width: min(86%, 300px);
  background: rgba(22, 34, 52, 0.45);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(180, 210, 255, 0.18);
  border-radius: 20px;
  padding: 1.4rem 1.2rem 1rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.mob-mic-menu-icon {
  font-size: 2rem;
  line-height: 1;
}

.mob-mic-menu-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.mob-mic-menu-btn {
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  background: var(--accent);
  color: #04161c;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  min-height: 44px;
  transition: transform 0.1s;
}

.mob-mic-menu-btn:active {
  transform: scale(0.98);
}

.mob-mic-menu-cancel {
  padding: 0.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  min-height: 36px;
}

/* === Canvas → session morph (unravel onto the waveform) ===
   During the morph the 3D voice art floats up and unravels onto the x-axis,
   landing on the live waveform bar. Keep it fully visible and lifted ABOVE the
   freshly-revealed content for the hand-off, and hold the real waveform
   invisible until the cloud lands — then the two cross-fade (3D out via the
   .is-session opacity rule, waveform in). Declared after .is-session so it wins.
   mob-voice3d.js removes .is-morphing once the unravel completes. */
.mob-app.is-morphing .mob-voice3d {
  opacity: 1;
  z-index: 6;
  /* keep the existing 1.2s opacity transition for the post-morph fade-out */
}

.mob-app.is-morphing .mob-waveform {
  opacity: 0;
}

/* === Bar mode: the unraveled projection IS the live waveform ===
   After the morph the 3D bead projection stays on as the session's voice bar:
   keep the canvas visible but BEHIND the content (z-index 0, pointer-events
   none), and hide the old frosted waveform canvas it replaced. Declared after
   the .is-session opacity:0 rule so opacity:1 wins. */
.mob-app.is-wavebar .mob-voice3d {
  opacity: 1;
  z-index: 0;
}

.mob-app.is-wavebar .mob-waveform-canvas {
  display: none;
}