/* ==========================================================================
   Fruit Up University - Your Fruit Up Friend Slide-Over Coach Studio
   Site stylesheet: site/fruit-up-friend-coach.css
   120fps Project Butter UX · iPhone/Android Parity · Light & Dark Mode
   ========================================================================== */

:root {
  --fuu-fr-primary: #155e3a;
  --fuu-fr-primary-hover: #0f472b;
  --fuu-fr-primary-soft: rgba(21, 94, 58, 0.09);
  --fuu-fr-accent: #19b660;
  --fuu-fr-accent-dark: #0d8042;
  --fuu-fr-action: #e5232d;
  --fuu-fr-action-hover: #bf1720;
  --fuu-fr-bg: #faf8f4;
  --fuu-fr-surface: #ffffff;
  --fuu-fr-sage: #edf5f0;
  --fuu-fr-muted-bg: #f3efe8;
  --fuu-fr-dark: #0f2e1c;
  --fuu-fr-text: #141a16;
  --fuu-fr-text-2: #46524b;
  --fuu-fr-muted: #6e7b73;
  --fuu-fr-border: #e4dfd5;
  --fuu-fr-border-strong: #cfc8ba;
  --fuu-fr-backdrop: rgba(7, 17, 11, 0.56);
  --fuu-fr-shadow: 0 20px 50px rgba(7, 17, 11, 0.22);
  --fuu-fr-shadow-sm: 0 8px 24px rgba(7, 17, 11, 0.14);
  --fuu-fr-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --fuu-fr-font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --fuu-fr-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fuu-fr-font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"],
html.dark,
body.dark,
body[data-theme="dark"] {
  --fuu-fr-bg: #07110b;
  --fuu-fr-surface: #0f2e1c;
  --fuu-fr-sage: #133a24;
  --fuu-fr-muted-bg: #0b2215;
  --fuu-fr-text: #f5f2ea;
  --fuu-fr-text-2: #b9c3ba;
  --fuu-fr-muted: #8a968d;
  --fuu-fr-border: #294134;
  --fuu-fr-border-strong: #375847;
  --fuu-fr-primary-soft: rgba(25, 182, 96, 0.16);
  --fuu-fr-backdrop: rgba(3, 8, 5, 0.72);
  --fuu-fr-shadow: 0 24px 60px rgba(0, 0, 0, 0.58);
  --fuu-fr-shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* Box sizing & overflow guards */
.fuu-fr-fab,
.fuu-fr-fab *,
.fuu-fr-drawer,
.fuu-fr-drawer *,
.fuu-fr-backdrop {
  box-sizing: border-box;
}

/* ==========================================================================
   1. Floating 120fps Tactile Launcher Button (Bottom-Right, Safe-Area Aware)
   ========================================================================== */
.fuu-fr-fab {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  max-width: calc(100vw - 36px);
  padding: 7px 18px 7px 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(25, 182, 96, 0.55);
  background: linear-gradient(135deg, #0f2e1c 0%, #155e3a 100%);
  color: #ffffff;
  font-family: var(--fuu-fr-font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 46, 28, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  transition:
    transform 190ms var(--fuu-fr-spring),
    box-shadow 190ms var(--fuu-fr-spring),
    opacity 190ms var(--fuu-fr-spring);
  -webkit-tap-highlight-color: transparent;
}

.fuu-fr-fab:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 18px 40px rgba(15, 46, 28, 0.44), 0 0 0 2px rgba(25, 182, 96, 0.35);
}

.fuu-fr-fab:active {
  transform: scale(0.96);
}

.fuu-fr-fab:focus-visible {
  outline: 3px solid var(--fuu-fr-accent);
  outline-offset: 3px;
}

.fuu-fr-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 14px, 0) scale(0.94);
}

.fuu-fr-fab-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #edf5f0;
  border: 2px solid #19b660;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fuu-fr-fab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fuu-fr-fab-pulse {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #19b660;
  border: 2px solid #0f2e1c;
}

.fuu-fr-fab-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.fuu-fr-fab-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.fuu-fr-fab-sub {
  font-family: var(--fuu-fr-font-mono);
  font-size: 0.67rem;
  font-weight: 500;
  color: #a6f4c5;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==========================================================================
   2. Slide-Over Backdrop & Drawer Container
   ========================================================================== */
.fuu-fr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--fuu-fr-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--fuu-fr-spring);
}

.fuu-fr-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fuu-fr-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1210;
  width: min(490px, 100vw);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--fuu-fr-bg);
  color: var(--fuu-fr-text);
  font-family: var(--fuu-fr-font-body);
  border-left: 1px solid var(--fuu-fr-border);
  box-shadow: var(--fuu-fr-shadow);
  transform: translate3d(104%, 0, 0);
  will-change: transform;
  transition: transform 320ms var(--fuu-fr-spring);
  overflow: hidden;
}

.fuu-fr-drawer.is-open {
  transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   3. Drawer Header & Option A Pass Status Strip
   ========================================================================== */
.fuu-fr-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #0f2e1c 0%, #155e3a 100%);
  color: #ffffff;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.fuu-fr-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.fuu-fr-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fuu-fr-header-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(25, 182, 96, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.25rem;
}

.fuu-fr-header-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fuu-fr-heading-wrap {
  min-width: 0;
}

.fuu-fr-title {
  margin: 0;
  font-family: var(--fuu-fr-font-display);
  font-size: 1.28rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #ffffff;
}

.fuu-fr-subtitle {
  margin: 3px 0 0;
  font-size: 0.76rem;
  color: #cbead8;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuu-fr-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fuu-fr-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms var(--fuu-fr-spring), background-color 150ms ease;
}

.fuu-fr-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fuu-fr-icon-btn:active {
  transform: scale(0.95);
}

.fuu-fr-pass-strip {
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(7, 17, 11, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  line-height: 1.25;
  color: #e6f6ed;
}

.fuu-fr-pass-strip-text {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fuu-fr-pass-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #19b660;
  flex-shrink: 0;
}

.fuu-fr-pass-dot.is-preview {
  background: #ffd23f;
}

.fuu-fr-pass-cta {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--fuu-fr-action);
  color: #ffffff;
  font-family: var(--fuu-fr-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
  transition: transform 140ms var(--fuu-fr-spring), background-color 140ms ease;
}

.fuu-fr-pass-cta:hover {
  background: var(--fuu-fr-action-hover);
}

.fuu-fr-pass-cta:active {
  transform: scale(0.96);
}

/* ==========================================================================
   4. 4 Selectable Fruit Up Characters / Guides Switcher
   ========================================================================== */
.fuu-fr-personas {
  flex-shrink: 0;
  padding: 10px 12px 8px;
  background: var(--fuu-fr-surface);
  border-bottom: 1px solid var(--fuu-fr-border);
}

.fuu-fr-section-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--fuu-fr-font-mono);
  font-size: 0.67rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fuu-fr-muted);
  margin-bottom: 7px;
}

.fuu-fr-persona-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.fuu-fr-persona-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1.5px solid var(--fuu-fr-border);
  background: var(--fuu-fr-bg);
  color: var(--fuu-fr-text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 150ms var(--fuu-fr-spring),
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.fuu-fr-persona-btn:hover {
  border-color: var(--fuu-fr-primary);
  background: var(--fuu-fr-sage);
}

.fuu-fr-persona-btn:active {
  transform: scale(0.97);
}

.fuu-fr-persona-btn.is-active {
  border-color: var(--fuu-fr-primary);
  background: var(--fuu-fr-sage);
  box-shadow: 0 4px 12px rgba(21, 94, 58, 0.14);
}

.fuu-fr-persona-ava {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: var(--fuu-fr-surface);
  border: 1px solid var(--fuu-fr-border);
  overflow: hidden;
}

.fuu-fr-persona-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fuu-fr-persona-meta {
  min-width: 0;
  flex: 1;
}

.fuu-fr-persona-name {
  display: block;
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--fuu-fr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fuu-fr-persona-role {
  display: block;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--fuu-fr-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   5. 4 One-Tap Smart Quick Actions + Collapsible Fridge Pantry Tray
   ========================================================================== */
.fuu-fr-quickbar {
  flex-shrink: 0;
  padding: 8px 12px 10px;
  background: var(--fuu-fr-surface);
  border-bottom: 1px solid var(--fuu-fr-border);
}

.fuu-fr-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.fuu-fr-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--fuu-fr-border-strong);
  background: var(--fuu-fr-muted-bg);
  color: var(--fuu-fr-text);
  font-family: var(--fuu-fr-font-body);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition:
    transform 140ms var(--fuu-fr-spring),
    background-color 150ms ease,
    border-color 150ms ease;
}

.fuu-fr-quick-btn:hover {
  border-color: var(--fuu-fr-primary);
  background: var(--fuu-fr-sage);
}

.fuu-fr-quick-btn:active {
  transform: scale(0.97);
}

.fuu-fr-quick-btn.is-active {
  border-color: var(--fuu-fr-primary);
  background: var(--fuu-fr-primary);
  color: #ffffff;
}

.fuu-fr-quick-btn span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Expandable Fridge / Pantry Builder Panel */
.fuu-fr-subtray {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--fuu-fr-sage);
  border: 1px solid var(--fuu-fr-border-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fuu-fr-subtray[hidden] {
  display: none;
}

.fuu-fr-subtray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fuu-fr-text);
}

.fuu-fr-subtray-close {
  border: none;
  background: transparent;
  color: var(--fuu-fr-muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
}

.fuu-fr-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fuu-fr-chip {
  border: 1px solid var(--fuu-fr-border-strong);
  background: var(--fuu-fr-surface);
  color: var(--fuu-fr-text);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: var(--fuu-fr-font-body);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 130ms var(--fuu-fr-spring), background-color 140ms ease, color 140ms ease;
}

.fuu-fr-chip:active {
  transform: scale(0.95);
}

.fuu-fr-chip.is-selected {
  background: var(--fuu-fr-primary);
  border-color: var(--fuu-fr-primary);
  color: #ffffff;
}

.fuu-fr-fridge-row {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.fuu-fr-fridge-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--fuu-fr-border-strong);
  background: var(--fuu-fr-surface);
  color: var(--fuu-fr-text);
  font-family: var(--fuu-fr-font-body);
  font-size: 0.85rem;
}

.fuu-fr-fridge-go {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: var(--fuu-fr-action);
  color: #ffffff;
  font-family: var(--fuu-fr-font-body);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms var(--fuu-fr-spring), background-color 150ms ease;
}

.fuu-fr-fridge-go:hover {
  background: var(--fuu-fr-action-hover);
}

.fuu-fr-fridge-go:active {
  transform: scale(0.96);
}

/* ==========================================================================
   6. Conversation Stream & Rich Actionable Answer Cards
   ========================================================================== */
.fuu-fr-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.fuu-fr-msg {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  animation: fuuFrPop 220ms var(--fuu-fr-spring);
}

@keyframes fuuFrPop {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fuu-fr-msg.is-user {
  align-items: flex-end;
}

.fuu-fr-msg.is-coach {
  align-items: flex-start;
}

.fuu-fr-bubble {
  max-width: 94%;
  min-width: 0;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.fuu-fr-msg.is-user .fuu-fr-bubble {
  background: var(--fuu-fr-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.fuu-fr-msg.is-coach .fuu-fr-bubble {
  width: 100%;
  max-width: 100%;
  background: var(--fuu-fr-surface);
  color: var(--fuu-fr-text);
  border: 1px solid var(--fuu-fr-border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(7, 17, 11, 0.05);
}

.fuu-fr-coach-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fuu-fr-border);
}

.fuu-fr-coach-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--fuu-fr-primary);
}

[data-theme="dark"] .fuu-fr-coach-who,
html.dark .fuu-fr-coach-who,
body.dark .fuu-fr-coach-who {
  color: #5ee69c;
}

.fuu-fr-decision-pill {
  font-family: var(--fuu-fr-font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--fuu-fr-sage);
  color: var(--fuu-fr-primary);
  border: 1px solid var(--fuu-fr-border);
}

[data-theme="dark"] .fuu-fr-decision-pill,
html.dark .fuu-fr-decision-pill,
body.dark .fuu-fr-decision-pill {
  color: #9ff0c1;
}

.fuu-fr-reply-text {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.54;
  color: var(--fuu-fr-text);
}

/* Law Reminder Callout */
.fuu-fr-law-box {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--fuu-fr-sage);
  border-left: 3px solid var(--fuu-fr-accent);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--fuu-fr-text);
}

.fuu-fr-law-box strong {
  color: var(--fuu-fr-primary);
}

[data-theme="dark"] .fuu-fr-law-box strong,
html.dark .fuu-fr-law-box strong,
body.dark .fuu-fr-law-box strong {
  color: #66e6a0;
}

/* Quick Swaps List */
.fuu-fr-swaps {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fuu-fr-swaps-label {
  font-family: var(--fuu-fr-font-mono);
  font-size: 0.67rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fuu-fr-muted);
}

.fuu-fr-swap-card {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--fuu-fr-muted-bg);
  border: 1px solid var(--fuu-fr-border);
  font-size: 0.79rem;
  line-height: 1.38;
}

.fuu-fr-swap-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--fuu-fr-text);
}

.fuu-fr-swap-from {
  text-decoration: line-through;
  color: var(--fuu-fr-muted);
  font-weight: 500;
}

.fuu-fr-swap-arrow {
  color: var(--fuu-fr-accent-dark);
  font-weight: 800;
}

.fuu-fr-swap-meta {
  margin-top: 3px;
  font-size: 0.73rem;
  color: var(--fuu-fr-text-2);
}

.fuu-fr-store-pill {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--fuu-fr-primary-soft);
  color: var(--fuu-fr-primary);
  font-family: var(--fuu-fr-font-mono);
  font-size: 0.68rem;
  font-weight: 500;
}

[data-theme="dark"] .fuu-fr-store-pill,
html.dark .fuu-fr-store-pill,
body.dark .fuu-fr-store-pill {
  color: #8ceeb8;
}

/* Matching University Guide Cards */
.fuu-fr-guides {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fuu-fr-guide-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid var(--fuu-fr-border-strong);
  background: var(--fuu-fr-bg);
  color: var(--fuu-fr-text);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms var(--fuu-fr-spring), border-color 150ms ease, background-color 150ms ease;
}

.fuu-fr-guide-card:hover {
  border-color: var(--fuu-fr-primary);
  background: var(--fuu-fr-sage);
}

.fuu-fr-guide-card:active {
  transform: scale(0.98);
}

.fuu-fr-guide-info {
  min-width: 0;
  flex: 1;
}

.fuu-fr-guide-title {
  display: block;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--fuu-fr-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuu-fr-guide-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--fuu-fr-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuu-fr-guide-open {
  flex-shrink: 0;
  font-family: var(--fuu-fr-font-mono);
  font-size: 0.69rem;
  font-weight: 500;
  color: var(--fuu-fr-primary);
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--fuu-fr-primary-soft);
}

[data-theme="dark"] .fuu-fr-guide-open,
html.dark .fuu-fr-guide-open,
body.dark .fuu-fr-guide-open {
  color: #8ef0bb;
}

/* Primary Action Row (Print Custom Answer as Official PDF) */
.fuu-fr-card-actions {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fuu-fr-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 190px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 11px;
  border: none;
  background: var(--fuu-fr-primary);
  color: #ffffff;
  font-family: var(--fuu-fr-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms var(--fuu-fr-spring), background-color 150ms ease;
}

.fuu-fr-print-btn:hover {
  background: var(--fuu-fr-primary-hover);
}

.fuu-fr-print-btn:active {
  transform: scale(0.97);
}

.fuu-fr-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 11px;
  border: 1px solid var(--fuu-fr-border-strong);
  background: var(--fuu-fr-surface);
  color: var(--fuu-fr-text);
  font-family: var(--fuu-fr-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms var(--fuu-fr-spring), border-color 150ms ease;
}

.fuu-fr-secondary-btn:hover {
  border-color: var(--fuu-fr-primary);
}

.fuu-fr-secondary-btn:active {
  transform: scale(0.97);
}

/* Typing indicator */
.fuu-fr-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--fuu-fr-surface);
  border: 1px solid var(--fuu-fr-border);
  font-size: 0.8rem;
  color: var(--fuu-fr-muted);
}

.fuu-fr-dots {
  display: inline-flex;
  gap: 4px;
}

.fuu-fr-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--fuu-fr-accent);
  animation: fuuFrBounce 1.1s infinite ease-in-out;
}

.fuu-fr-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.fuu-fr-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes fuuFrBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ==========================================================================
   7. Bottom Composer Input Bar (Safe-Area & iPhone 16px Anti-Zoom Guard)
   ========================================================================== */
.fuu-fr-composer {
  flex-shrink: 0;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--fuu-fr-surface);
  border-top: 1px solid var(--fuu-fr-border);
}

.fuu-fr-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.fuu-fr-input {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  max-height: 112px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--fuu-fr-border-strong);
  background: var(--fuu-fr-bg);
  color: var(--fuu-fr-text);
  font-family: var(--fuu-fr-font-body);
  font-size: 0.94rem;
  line-height: 1.38;
  resize: none;
  scrollbar-width: none;
  overflow-y: auto;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.fuu-fr-input::-webkit-scrollbar {
  display: none;
}

.fuu-fr-input:focus {
  border-color: var(--fuu-fr-primary);
  box-shadow: 0 0 0 3px var(--fuu-fr-primary-soft);
}

.fuu-fr-send-btn {
  flex-shrink: 0;
  min-width: 68px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  background: var(--fuu-fr-action);
  color: #ffffff;
  font-family: var(--fuu-fr-font-body);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms var(--fuu-fr-spring), background-color 150ms ease, opacity 150ms ease;
}

.fuu-fr-send-btn:hover {
  background: var(--fuu-fr-action-hover);
}

.fuu-fr-send-btn:active {
  transform: scale(0.96);
}

.fuu-fr-send-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.fuu-fr-footnote {
  margin-top: 6px;
  font-size: 0.67rem;
  line-height: 1.3;
  color: var(--fuu-fr-muted);
  text-align: center;
}

/* ==========================================================================
   8. Mobile Parity (375px - 768px iPhone Safari & Android Chrome)
   ========================================================================== */
@media (max-width: 768px) {
  .fuu-fr-input,
  .fuu-fr-fridge-input {
    font-size: max(16px, 1rem);
  }

  .fuu-fr-fab {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    min-height: 50px;
    padding: 6px 14px 6px 7px;
  }

  .fuu-fr-fab-avatar {
    width: 34px;
    height: 34px;
  }

  .fuu-fr-fab-title {
    font-size: 0.84rem;
  }

  .fuu-fr-fab-sub {
    display: none;
  }

  .fuu-fr-drawer {
    width: 100vw;
    border-left: none;
  }

  .fuu-fr-persona-grid {
    gap: 6px;
  }

  .fuu-fr-persona-btn {
    padding: 7px 8px;
  }

  .fuu-fr-quick-grid {
    gap: 5px;
  }

  .fuu-fr-quick-btn {
    padding: 7px 8px;
    font-size: 0.73rem;
  }
}

/* Hide interactive launcher & drawer in Print / US Letter PDF output */
@media print {
  .fuu-fr-fab,
  .fuu-fr-backdrop,
  .fuu-fr-drawer {
    display: none !important;
  }
}
