/* ========================================
   Ask Mirror Talk Widget — Premium UX
   ======================================== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Container */
.ask-mirror-talk {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 28px;
  border: 1px solid #e6e2dc;
  background: linear-gradient(180deg, #faf8f4 0%, #f5f2ed 100%);
  color: #2e2a24;
  font-family: "Source Serif 4", Georgia, serif;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;     /* prevent iOS text inflation */
  text-size-adjust: 100%;
}

.ask-mirror-talk,
.ask-mirror-talk * {
  box-sizing: border-box;
}

/* Subtle top accent bar */
.ask-mirror-talk::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2e2a24, #8b7355, #2e2a24);
}

/* Title */
.ask-mirror-talk h2 {
  margin-top: 0;
  margin-bottom: 4px;
  color: #2e2a24;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.ask-mirror-talk h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: #2e2a24;
  font-size: 18px;
  font-weight: 600;
}

/* Label */
.ask-mirror-talk label {
  display: block;
  font-size: 15px;
  color: #6b665d;
  margin-bottom: 4px;
  font-style: italic;
}

#ask-mirror-talk-form {
  margin-top: 18px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(212, 206, 198, 0.9);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
}

.amt-form-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.amt-form-kicker {
  margin: 0 0 4px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-form-note {
  max-width: 240px;
  margin: 0;
  color: #8f877b;
  font-size: 12px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-question-coach {
  margin: 10px 0 4px;
}

.amt-question-coach-inner {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(212, 206, 198, 0.92);
  background: linear-gradient(135deg, rgba(250,248,244,0.96), rgba(244,239,232,0.94));
}

.amt-question-coach-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-question-coach-text {
  margin: 0 0 10px;
  color: #6b665d;
  font-size: 13px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-question-coach-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.amt-question-coach-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ddd4c9;
  background: rgba(255,255,255,0.92);
  color: #2e2a24;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ask-mirror-talk .amt-question-coach-btn:hover,
.ask-mirror-talk .amt-question-coach-btn:focus-visible {
  border-color: #8b7355;
  background: #fff;
  color: #2e2a24;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(46, 42, 36, 0.08);
}

.amt-question-coach-btn-label {
  color: #8b7355;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-question-coach-btn-text {
  color: #2e2a24;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

/* ========================================
   Form Input
   ======================================== */
#ask-mirror-talk-input {
  width: 100%;
  min-height: 138px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0 12px;
  border: 2px solid #d4cec6;
  border-radius: 10px;
  font-family: inherit;
  background: #fff;
  color: #2e2a24;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  resize: vertical;
  /* Prevent iOS zoom on focus (font-size >= 16px prevents auto-zoom) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#ask-mirror-talk-input:focus {
  outline: none;
  border-color: #2e2a24;
  box-shadow: 0 0 0 4px rgba(46, 42, 36, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

#ask-mirror-talk-input::placeholder {
  color: #b5afa5;
  font-style: italic;
}

#ask-mirror-talk-input:disabled {
  background: #f0ede8;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.amt-char-counter {
  text-align: right;
  font-size: 0.72rem;
  color: #b5afa5;
  margin-top: 0;
  transition: color 0.2s ease;
}

.amt-char-counter.amt-char-counter-warn {
  color: #c0392b;
  font-weight: 600;
}

/* ========================================
   Submit Button
   ======================================== */
.ask-mirror-talk button[type="submit"] {
  display: block;
  width: min(100%, 320px);
  margin: 16px auto 0;
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border: none;
  padding: 13px 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(46, 42, 36, 0.2);
}

.ask-mirror-talk button[type="submit"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ask-mirror-talk button[type="submit"]:hover:not(:disabled) {
  background: linear-gradient(135deg, #3d3731, #524b42);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(46, 42, 36, 0.3);
}

.ask-mirror-talk button[type="submit"]:hover:not(:disabled)::after {
  opacity: 1;
}

.ask-mirror-talk button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(46, 42, 36, 0.2);
}

.ask-mirror-talk button[type="submit"]:disabled {
  background: #8b8378;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
  transform: none;
}

/* ========================================
   Response Section
   ======================================== */
.ask-mirror-talk-response {
  margin-top: 24px;
  padding: 24px 26px 26px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6e2dc;
  min-height: 0;
  line-height: 1.85;
  color: #2e2a24;
  font-size: 16px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  /* Smooth reveal — element stays in layout flow once shown;
     opacity + translate transition means no sudden pop-in */
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  contain: layout style;
  overflow-anchor: auto;
}

/* Subtle top accent on the response card */
.ask-mirror-talk-response.amt-visible::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #d4a857 40%, #8b7355 60%, transparent 100%);
  border-radius: 12px 12px 0 0;
  opacity: 0.6;
}

/* Visible state — added once on first question, never removed */
.ask-mirror-talk-response.amt-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lock min-height during loading and streaming to prevent height jumps */
.ask-mirror-talk-response.amt-streaming,
.ask-mirror-talk-response.amt-loading-state {
  min-height: 240px;
}

/* Response content — no animation during streaming to prevent layout bounce */
#ask-mirror-talk-output {
  overflow-anchor: none; /* prevent scroll anchoring thrash */
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 62ch;
  margin: 0 auto;
}

#ask-mirror-talk-output > * {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

#ask-mirror-talk-output p {
  margin: 0 auto 16px;
}

#ask-mirror-talk-output p:last-child {
  margin-bottom: 0;
}

#ask-mirror-talk-output ul,
#ask-mirror-talk-output ol,
#ask-mirror-talk-output blockquote {
  margin-left: auto;
  margin-right: auto;
}

/* Streaming cursor — visible while streaming text */
.ask-mirror-talk-response.amt-streaming #ask-mirror-talk-output::after {
  content: '▍';
  display: inline;
  animation: blink 0.7s step-end infinite;
  color: #8b7355;
  font-weight: 300;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Only animate paragraphs AFTER streaming is complete (class added by JS) */
#ask-mirror-talk-output.amt-complete p {
  animation: fadeInUp 0.4s ease-out both;
}

/* Stagger paragraph animations — only when complete */
#ask-mirror-talk-output.amt-complete p:nth-child(1) { animation-delay: 0.05s; }
#ask-mirror-talk-output.amt-complete p:nth-child(2) { animation-delay: 0.1s; }
#ask-mirror-talk-output.amt-complete p:nth-child(3) { animation-delay: 0.15s; }
#ask-mirror-talk-output.amt-complete p:nth-child(4) { animation-delay: 0.2s; }
#ask-mirror-talk-output.amt-complete p:nth-child(5) { animation-delay: 0.25s; }
#ask-mirror-talk-output.amt-complete p:nth-child(6) { animation-delay: 0.3s; }
#ask-mirror-talk-output.amt-complete p:nth-child(7) { animation-delay: 0.35s; }
#ask-mirror-talk-output.amt-complete p:nth-child(8) { animation-delay: 0.4s; }

/* Better spacing after headings in paragraphs */
.ask-mirror-talk-response p strong:only-child {
  display: block;
  margin-bottom: 8px;
}

/* Error state */
.ask-mirror-talk-response.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  animation: shake 0.4s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ========================================
   Loading Animation — Premium Shimmer
   ======================================== */
.amt-loading {
  padding: 8px 4px 20px;
  animation: fadeIn 0.25s ease-out;
}

/* Shimmer skeleton lines */
.amt-shimmer-group {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 22px;
}

.amt-shimmer {
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    #f0ede8 0%,
    #e8e3db 40%,
    #f0ede8 60%,
    #f0ede8 100%
  );
  background-size: 250% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.amt-shimmer:nth-child(1) { width: 92%; }
.amt-shimmer:nth-child(2) { width: 77%; animation-delay: 0.1s; }
.amt-shimmer:nth-child(3) { width: 85%; animation-delay: 0.2s; }
.amt-shimmer:nth-child(4) { width: 63%; animation-delay: 0.3s; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Enhanced Skeleton Loading Lines */
.amt-skeleton-answer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0;
}

.amt-skeleton-line {
  height: 18px;
  background: linear-gradient(90deg, #e8e4de 25%, #d8d2c8 50%, #e8e4de 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: 4px;
  opacity: 0.6;
}

.amt-loading-text {
  font-size: 13px;
  color: #a09380;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: opacity 0.2s ease;
}

/* ========================================
   Citations Section
   ======================================== */
.ask-mirror-talk-citations {
  margin-top: 28px;
  /* display:none collapses the h3 heading so no blank space appears on page load.
     JS reveals it via: display:'' then rAF .amt-visible for the opacity transition. */
  display: none;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease;
}

.ask-mirror-talk-citations.amt-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ask-mirror-talk-citations h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #6b665d;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
}

.ask-mirror-talk-citations h3 + .amt-citation-trust-note {
  margin-top: 0;
}

#ask-mirror-talk-citations {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Citation Items */
.citation-item {
  background: #fff;
  border: 1px solid #e6e2dc;
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 0;
  /* Use property-specific transitions instead of 'all' to avoid unintended animations */
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  /* Fade in — no horizontal slide which can cause horizontal overflow/jank */
  animation: fadeIn 0.35s ease-out both;
  overflow: hidden;
}

.citation-item-primary {
  border-color: #d7c3a0;
  box-shadow: 0 8px 22px rgba(139, 115, 85, 0.08);
}

/* Stagger citation fade-ins */
.citation-item:nth-child(1) { animation-delay: 0.04s; }
.citation-item:nth-child(2) { animation-delay: 0.1s; }
.citation-item:nth-child(3) { animation-delay: 0.16s; }
.citation-item:nth-child(4) { animation-delay: 0.22s; }
.citation-item:nth-child(5) { animation-delay: 0.28s; }

.citation-item:hover {
  border-color: #2e2a24;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.citation-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  gap: 12px;
  cursor: pointer;
  padding: 16px 18px 12px;
  transition: background 0.2s ease;
}

.citation-link:hover {
  text-decoration: none;
  background: #faf8f4;
}

/* Citation info column (title + quote) */
.citation-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.citation-match-badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(46, 42, 36, 0.08);
  color: #5d5040;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.citation-title {
  font-weight: 600;
  color: #2e2a24;
  font-size: 15px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

/* Quote snippet under each citation */
.citation-quote {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: #6b665d;
  font-style: italic;
  border-left: 3px solid #d4cec6;
  padding: 4px 0 4px 10px;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.citation-link:hover .citation-quote {
  color: #4a453d;
  border-left-color: #8b7355;
}

.citation-time {
  font-size: 13px;
  color: #2e2a24;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  background: #f1ebe3;
  padding: 5px 12px;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  cursor: pointer;
}

.citation-link:hover .citation-title {
  color: #1a1815;
}

.citation-link:hover .citation-time {
  background: #d8c4a8;
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.2);
}

.citation-preview-btn {
  margin: 0 18px 14px;
  padding: 7px 0;
  min-height: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #6d5a42;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.citation-preview-btn:hover {
  background: transparent;
  color: #2e2a24;
  opacity: 1;
}

.amt-citation-trust-note {
  margin-bottom: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(212, 206, 198, 0.9);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(250,248,244,0.95), rgba(245,242,237,0.92));
  color: #6b665d;
  font-size: 13px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-citation-trust-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.amt-citation-trust-level {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 0;
  padding: 3px 0;
  border-radius: 0;
  background: transparent;
  color: #355750;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  gap: 6px;
}

.amt-citation-trust-level::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex-shrink: 0;
}

.amt-citation-trust-copy-soft {
  gap: 5px;
}

.amt-citation-trust-level-soft {
  color: #8b7355;
}

.amt-citation-trust-copy strong {
  color: #2e2a24;
}

.amt-citation-trust-copy span:last-child {
  color: #5f5a53;
}

/* ========================================
   Response Content Formatting
   ======================================== */
.ask-mirror-talk-response strong {
  font-weight: 700;
  color: #1a1815;
}

.ask-mirror-talk-response em {
  font-style: italic;
  color: #4a453d;
}

.ask-mirror-talk-response ol,
.ask-mirror-talk-response ul {
  margin: 16px 0;
  padding-left: 28px;
}

.ask-mirror-talk-response ol {
  list-style-type: decimal;
}

.ask-mirror-talk-response ul {
  list-style-type: disc;
}

.ask-mirror-talk-response li {
  margin: 8px 0;
  line-height: 1.7;
  padding-left: 4px;
}

.ask-mirror-talk-response li strong {
  color: #1a1815;
}

.ask-mirror-talk-response p + ol,
.ask-mirror-talk-response p + ul {
  margin-top: 12px;
}

/* ========================================
   Feedback Section (from analytics addon)
   ======================================== */
.amt-feedback-section {
  margin-top: 24px !important;
  padding: 20px !important;
  background: linear-gradient(135deg, #faf8f4, #f5f2ed) !important;
  border-radius: 10px !important;
  border: 1px solid #e6e2dc !important;
  animation: fadeInUp 0.5s ease-out;
}

.amt-feedback-question {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #2e2a24 !important;
  margin-bottom: 14px !important;
  text-align: center;
}

.amt-feedback-buttons {
  display: flex;
  gap: 10px;
}

/* Base for analytics-addon legacy feedback (overridden by lines below for new circular buttons) */
.amt-feedback-buttons .amt-feedback-btn {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-feedback-positive {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #a7f3d0 !important;
}

.amt-feedback-positive:hover {
  background: #10b981 !important;
  color: #fff !important;
  border-color: #10b981 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.amt-feedback-negative {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border-color: #fecaca !important;
}

.amt-feedback-negative:hover {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.amt-feedback-thanks {
  display: none;
  padding: 14px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  border-radius: 8px !important;
  text-align: center !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Negative feedback detail step ────────────────────────────────── */
.amt-feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.amt-chip {
  padding: 6px 14px;
  border: 1.5px solid #d1c7bb;
  border-radius: 20px;
  background: #fff;
  color: #4a4035;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-chip:hover {
  border-color: #8b7355;
  background: #f5f0ea;
}

.amt-chip.amt-chip-selected {
  background: #8b7355;
  border-color: #8b7355;
  color: #fff;
}

.amt-feedback-comment {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1.5px solid #d1c7bb;
  border-radius: 6px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #2e2a24;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.amt-feedback-comment:focus {
  border-color: #8b7355;
}

.amt-feedback-submit {
  padding: 8px 20px;
  background: #8b7355;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-feedback-submit:hover {
  background: #6d5a42;
}

.amt-feedback-skip {
  padding: 8px 14px;
  background: transparent;
  color: #8b7355;
  border: none;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes scaleIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========================================
   Share Button
   ======================================== */
.amt-share-section {
  text-align: center;
  margin-top: 16px;
}

.amt-share-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #8b7355;
  background: transparent;
  border: 2px solid #d4cec6;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-share-btn:hover {
  color: #2e2a24;
  border-color: #2e2a24;
  background: #faf8f4;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ========================================
   Social Share Card Modal
   ======================================== */
.amt-share-card-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.amt-share-card-modal.amt-scm-visible {
  opacity: 1;
}

.amt-scm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
}

.amt-scm-panel {
  position: relative;
  background: #1f1a15;
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 18px;
  padding: 38px 22px 22px;
  max-width: 500px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.52);
  transform: translateY(0);
  transition: transform 0.25s ease;
}

.amt-scm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.30);
  color: rgba(255,255,255,0.95);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.amt-scm-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.40);
}

.amt-scm-title {
  color: #f5e6c8;
  font-size: 18px;
  font-weight: 700;
  max-width: 32ch;
  margin: 0 auto 8px;
  padding: 0 56px;
  text-align: center;
  font-family: Georgia, serif;
  line-height: 1.2;
}

.amt-scm-context {
  margin: -2px 0 10px;
  color: rgba(245,230,200,0.72);
  font-size: 12px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-scm-preview {
  display: block;
  width: 100%;
  max-width: 340px;
  border-radius: 12px;
  border: 1px solid rgba(201,168,76,0.25);
  margin: 0 auto 12px;
}

.amt-scm-preview-line {
  margin: 2px auto 12px;
  max-width: 38ch;
  color: rgba(245,230,200,0.82);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  font-family: Georgia, serif;
}

.amt-scm-hint {
  color: rgba(245,230,200,0.5);
  font-size: 12px;
  text-align: center;
  margin: 0 auto 10px;
  max-width: 38ch;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-scm-invite {
  margin: 0 auto 12px;
  color: rgba(245,230,200,0.62);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  max-width: 42ch;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-scm-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.amt-scm-btn {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-scm-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.amt-scm-native    { background: #f5e6c8; color: #1a1410; font-size: 14px; }
.amt-scm-copy-link { background: rgba(255,255,255,0.08); color: #f5e6c8; border-color: rgba(255,255,255,0.14); }
.amt-scm-copy      { background: rgba(255,255,255,0.08); color: #f5e6c8; border-color: rgba(255,255,255,0.14); }
.amt-scm-download  { background: rgba(255,255,255,0.05); color: #f5e6c8; border-color: rgba(201,168,76,0.22); }

.amt-scm-platform-note {
  color: #f7c948;
  font-size: 13px;
  text-align: center;
  margin: 10px 0 0;
  padding: 8px 12px;
  background: rgba(247,201,72,0.08);
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
}

/* ── Toast share button ───────────────────────── */
.amt-toast-share-btn {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-toast-share-btn:hover {
  background: rgba(255,255,255,0.28);
}

/* ── Badge shelf share button ─────────────────── */
.amt-badge.amt-badge-earned {
  position: relative;
}

.amt-badge-share-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
}

.amt-badge.amt-badge-earned:hover .amt-badge-share-btn {
  opacity: 1;
}

/* ── Progress / streak share buttons in badge shelf ─ */
.amt-share-progress-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  color: #c9a84c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-share-progress-btn:hover {
  background: rgba(201,168,76,0.2);
}

.amt-share-progress-btn-primary {
  margin-top: 0;
  background: rgba(201,168,76,0.16);
}

.amt-share-progress-btn-secondary {
  margin-top: 0;
  background: rgba(255,255,255,0.06);
  color: #f5e6c8;
  border-color: rgba(255,255,255,0.14);
}

@media (max-width: 480px) {
  .amt-badge-overview {
    flex-direction: column;
    align-items: stretch;
  }

  .amt-badge-overview-actions {
    width: 100%;
  }

  .amt-next-unlocks {
    grid-template-columns: 1fr;
  }

  .amt-scm-buttons {
    grid-template-columns: 1fr;
  }
  .amt-scm-download {
    grid-column: 1;
  }

  .amt-scm-title {
    padding: 0 48px;
    font-size: 17px;
  }
}

/* ========================================
   Inline Audio Player
   ======================================== */

/* Citation active state */
.citation-item.citation-playing {
  border-color: #2e2a24;
  box-shadow: 0 4px 20px rgba(46, 42, 36, 0.12);
}

.citation-item.citation-playing .citation-link {
  background: #faf8f4;
}

.citation-item.citation-playing .citation-time {
  background: #2e2a24;
  color: #fff;
}

/* Player container */
.amt-inline-player {
  padding: 16px 18px;
  border-top: 1px solid #e6e2dc;
  background: linear-gradient(180deg, #faf8f4 0%, #f5f2ed 100%);
  animation: playerSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.amt-inline-player.amt-player-closing {
  animation: playerSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes playerSlideIn {
  from {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    max-height: 300px;
    opacity: 1;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

@keyframes playerSlideOut {
  from {
    max-height: 300px;
    opacity: 1;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  to {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Player header */
.amt-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.amt-player-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b7355;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-player-close {
  background: none;
  border: 1px solid #d4cec6;
  color: #6b665d;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.amt-player-close:hover {
  background: #2e2a24;
  border-color: #2e2a24;
  color: #fff;
  transform: scale(1.1);
}

/* Episode title in player */
.amt-player-episode {
  font-size: 14px;
  font-weight: 600;
  color: #2e2a24;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Audio element */
.amt-inline-player .amt-audio {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  outline: none;
  margin-bottom: 10px;
}

/* Custom audio styling for webkit browsers */
.amt-inline-player .amt-audio::-webkit-media-controls-panel {
  background: #fff;
  border-radius: 8px;
}

/* Player action buttons */
.amt-player-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.amt-player-skip-back,
.amt-player-skip-fwd {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(212, 206, 198, 0.72);
  color: #6d5a42;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-player-skip-back:hover,
.amt-player-skip-fwd:hover {
  background: rgba(255, 255, 255, 0.96);
  color: #2e2a24;
  border-color: rgba(139, 115, 85, 0.42);
}

.amt-player-full {
  margin-left: auto;
  font-size: 11px;
  color: #8b7355;
  font-weight: 700;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  transition: color 0.2s ease, opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: transparent;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.amt-player-full:hover {
  color: #2e2a24;
  opacity: 1;
}

/* ========================================
   Keyframe Animations
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* slideInRight removed — replaced with fadeIn for citations to prevent horizontal jank */

/* ========================================
   Responsive Design — Tablet
   ======================================== */
@media (max-width: 768px) {
  .ask-mirror-talk {
    padding: 20px 14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .ask-mirror-talk h2 {
    font-size: 24px;
  }

  .amt-heading-row,
  .amt-form-intro,
  .amt-journey-card-inner,
  .amt-momentum-card-inner,
  .amt-weekly-recap-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .amt-heading-copy,
  .amt-form-note {
    max-width: none;
  }

  .amt-heading-controls {
    width: min(100%, 240px);
    max-width: 240px;
    justify-content: center;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    padding: 7px 11px 8px;
    border: 1px solid rgba(139, 115, 85, 0.26);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(239,229,213,0.76));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 10px 22px rgba(46,42,36,0.07);
  }

  .amt-heading-controls-note {
    text-align: center;
    margin-top: 1px;
  }

  .ask-mirror-talk button[type="submit"] {
    display: block;
    width: min(100%, 280px);
    margin-left: auto;
    margin-right: auto;
  }

  .amt-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .amt-form-footer .amt-char-counter {
    text-align: left;
  }

  .citation-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .citation-time {
    align-self: flex-start;
  }

  .amt-topics-list {
    gap: 5px;
  }

  .amt-topic-btn {
    padding: 7px 11px;
    font-size: 12px;
  }

  .amt-feedback-buttons {
    flex-direction: column;
  }

  .amt-player-actions {
    flex-wrap: wrap;
  }

  .amt-player-full {
    margin-left: 0;
    flex: 1;
    text-align: center;
  }

  .amt-qotd-text {
    font-size: 16px;
  }

  .amt-qotd-inner {
    padding: 14px 16px;
  }

  .amt-workflow-bar {
    gap: 6px;
    padding: 7px;
  }

  .amt-stats-bar {
    padding: 9px 14px;
    gap: 10px;
  }
}

/* ========================================
   Responsive Design — Mobile (≤ 480px)
   ======================================== */
@media (max-width: 480px) {

  /* ── Container ──────────────────────── */
  .ask-mirror-talk {
    width: 100%;
    max-width: 100%;
    padding: 12px clamp(10px, 3vw, 12px);
    margin: 0 auto;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .ask-mirror-talk::before {
    height: 2px;
  }

  /* ── Heading Area ───────────────────── */
  .amt-heading-row {
    margin-bottom: 10px;
    gap: 12px;
  }

  .amt-heading-kicker {
    font-size: 10px;
    margin-bottom: 4px;
    letter-spacing: 0.10em;
  }

  .amt-heading-subtitle {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 4px;
  }

  .amt-text-size-btn,
  .amt-journal-btn,
  .amt-note-btn,
  .amt-about-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .amt-journal-btn,
  .amt-note-btn,
  .amt-about-btn {
    font-size: 15px;
  }

  .amt-heading-controls-note {
    font-size: 10px;
  }

  /* ── Typography ─────────────────────── */
  .ask-mirror-talk h2 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 2px;
  }

  .ask-mirror-talk h3 {
    font-size: 15px;
    margin-top: 14px;
    margin-bottom: 6px;
  }

  .ask-mirror-talk label {
    font-size: 13px;
    text-align: left;
  }

  /* ── Form Input ─────────────────────── */
  #ask-mirror-talk-input {
    font-size: 16px;            /* prevents iOS zoom on focus */
    padding: 10px 12px;
    margin: 4px 0 8px;
    border-radius: 8px;
    min-height: 68px;           /* compact on mobile */
  }

  #ask-mirror-talk-form {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .amt-form-intro {
    margin-bottom: 6px;
    gap: 10px;
  }

  .amt-form-kicker {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .amt-form-note {
    font-size: 11px;
  }

  /* ── Submit Button — full-width tap target ── */
  .ask-mirror-talk button[type="submit"] {
    margin-top: 8px;
    width: min(100%, 300px);
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }

  .ask-mirror-talk button[type="submit"]:hover:not(:disabled) {
    transform: none;            /* no hover lift on touch */
  }

  .ask-mirror-talk button[type="submit"]:active:not(:disabled) {
    transform: scale(0.97);
    box-shadow: 0 1px 3px rgba(46, 42, 36, 0.15);
  }

  /* ── Stats Bar ──────────────────────── */
  .amt-stats-bar {
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    gap: 8px;
  }

  .amt-stat {
    font-size: 0.8rem;
  }

  .amt-stat-icon {
    font-size: 1rem;
  }

  .amt-stat-value {
    font-size: 0.95rem;
  }

  .amt-stat-label {
    font-size: 0.72rem;
  }

  .amt-stat-action-btn {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 0.72rem;
  }

  .amt-stat-action-label {
    font-size: 0.68rem;
  }

  /* ── Workflow Bar ───────────────────── */
  .amt-workflow-bar {
    margin: 16px 0 12px;
    padding: 6px;
    border-radius: 14px;
    gap: 5px;
  }

  .amt-workflow-guide {
    font-size: 8px;
    top: -18px;
  }

  .amt-workflow-step {
    padding: 7px 4px 6px;
    gap: 2px;
    border-radius: 10px;
  }

  .amt-workflow-icon {
    font-size: 16px;
  }

  .amt-workflow-label {
    font-size: clamp(9px, 2.4vw, 10px);
    min-height: 1.8em;
    line-height: 1.05;
  }

  .amt-workflow-hint {
    font-size: clamp(7px, 2vw, 8px);
  }

  /* ── Question of the Day ────────────── */
  .amt-qotd-inner {
    padding: 12px 12px 14px;
    border-radius: 10px;
  }

  .amt-qotd-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 6px;
  }

  .amt-qotd-badge {
    font-size: 10px;
  }

  .amt-qotd-theme {
    font-size: 9px;
    padding: 2px 7px;
  }

  .amt-qotd-text {
    font-size: 15px;
    line-height: 1.42;
    margin-bottom: 10px;
  }

  .amt-qotd-ask {
    width: 100%;
    text-align: center;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }

  .amt-qotd-ask:hover {
    transform: none;
  }

  .amt-qotd-ask:active {
    transform: scale(0.97);
  }

  /* ── Browse by Topic ────────────────── */
  .amt-topics {
    margin-bottom: 10px;
  }

  .amt-topics-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .amt-topics-list {
    gap: 5px;
    /* Horizontally scrollable on narrow screens */
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 3px;
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
    scrollbar-width: none;     /* Firefox */
  }

  .amt-topics-list::-webkit-scrollbar {
    display: none;             /* Chrome, Safari */
  }

  /* Fade hint showing more topics are off-screen to the right */
  .amt-topics {
    position: relative;
  }
  .amt-topics::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, #faf8f4 90%);
    pointer-events: none;
  }

  .amt-topic-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 16px;
    -webkit-tap-highlight-color: transparent;
  }

  .amt-topic-btn:hover {
    transform: none;
  }

  .amt-topic-btn:active {
    transform: scale(0.95);
    box-shadow: none;
  }

  .amt-topic-icon {
    font-size: 13px;
  }

  /* ── Suggested Questions ────────────── */
  .amt-suggestions {
    margin-bottom: 10px;
  }

  .amt-suggestions-label,
  .amt-followups-label {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .amt-suggestions-list,
  .amt-followups-list {
    gap: 5px;
  }

  .amt-suggestion-btn,
  .amt-followup-btn {
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 16px;
    -webkit-tap-highlight-color: transparent;
    /* full-width on very narrow screens for easy tapping */
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    text-align: center;
  }

  .amt-suggestion-btn:hover,
  .amt-followup-btn:hover {
    transform: none;
  }

  .amt-suggestion-btn:active,
  .amt-followup-btn:active {
    transform: scale(0.96);
  }

  /* ── Explore Expander ───────────────── */
  .amt-explore-toggle {
    padding: 8px 12px;
    border-radius: 16px;
    -webkit-tap-highlight-color: transparent;
  }

  .amt-explore-toggle[aria-expanded="true"] {
    border-radius: 14px 14px 0 0;
  }

  .amt-explore-panel--open {
    padding: 10px 10px 4px;
  }

  /* Neutralise edge-bleed negative margins on the inner topics list */
  .amt-explore-panel .amt-topics-list {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  /* Remove right-fade hint (was positioned relative to topics wrapper) */
  .amt-explore-panel .amt-topics::after {
    display: none;
  }

  /* ── Response Section ───────────────── */
  .ask-mirror-talk-response {
    margin-top: 12px;
    padding: 12px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.7;
  }

  #ask-mirror-talk-output p {
    margin: 0 0 10px 0;
  }

  .ask-mirror-talk-response ol,
  .ask-mirror-talk-response ul {
    padding-left: 18px;
    margin: 10px 0;
  }

  .ask-mirror-talk-response li {
    margin: 5px 0;
    line-height: 1.6;
  }

  /* ── Loading ────────────────────────── */
  .amt-loading {
    padding: 20px 10px;
  }

  .amt-loading-text {
    font-size: 12px;
  }

  .amt-shimmer-group {
    gap: 10px;
    margin-bottom: 18px;
  }

  .amt-shimmer {
    height: 11px;
  }

  /* ── Citations ──────────────────────── */
  .ask-mirror-talk-citations {
    margin-top: 14px;
  }

  .ask-mirror-talk-citations h3 {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .citation-item {
    margin-bottom: 5px;
    border-radius: 8px;
  }

  /* Remove hover lift on touch */
  .citation-item:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .citation-link {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 12px;
    -webkit-tap-highlight-color: transparent;
  }

  .citation-title {
    font-size: 13px;
    line-height: 1.35;
  }

  .citation-quote {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    padding: 2px 0 2px 7px;
  }

  .citation-time {
    font-size: 11px;
    padding: 3px 9px;
    align-self: flex-start;
  }

  .citation-link:hover .citation-time {
    transform: none;            /* no hover scale on touch */
  }

  .amt-citation-trust-note {
    margin-bottom: 10px;
    padding: 10px 11px;
    font-size: 12px;
    border-radius: 10px;
  }

  .citation-preview-btn {
    margin: 0 12px 10px;
    padding: 6px 0;
    font-size: 10px;
  }

  .citation-match-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* ── Inline Audio Player ────────────── */
  .amt-inline-player {
    padding: 10px 12px;
  }

  .amt-player-episode {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .amt-inline-player .amt-audio {
    height: 34px;
    margin-bottom: 6px;
  }

  .amt-player-actions {
    flex-wrap: wrap;
    gap: 5px;
  }

  .amt-player-skip-back,
  .amt-player-skip-fwd {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
    font-size: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .amt-player-skip-back:hover,
  .amt-player-skip-fwd:hover {
    transform: none;
  }

  .amt-player-full {
    margin-left: 0;
    flex: 1 1 100%;
    text-align: center;
    padding: 7px 0 3px;
    font-size: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .amt-player-full:hover {
    transform: none;
  }

  .amt-player-title {
    font-size: 11px;
  }

  .amt-player-close {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  /* ── Feedback Section ───────────────── */
  .amt-feedback-section {
    margin-top: 12px !important;
    padding: 12px !important;
    border-radius: 8px !important;
  }

  .amt-feedback-question {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }

  .amt-feedback-buttons {
    flex-direction: column;
    gap: 6px;
  }

  .amt-feedback-buttons .amt-feedback-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .amt-feedback-positive:hover,
  .amt-feedback-negative:hover {
    transform: none;
    box-shadow: none;
  }

  .amt-feedback-positive:active {
    background: #10b981 !important;
    color: #fff !important;
    transform: scale(0.97);
  }

  .amt-feedback-negative:active {
    background: #ef4444 !important;
    color: #fff !important;
    transform: scale(0.97);
  }

  .amt-feedback-thanks {
    font-size: 13px !important;
    padding: 10px !important;
  }

  .amt-chip {
    font-size: 12px;
    padding: 5px 12px;
  }

  .amt-feedback-comment {
    font-size: 13px;
    padding: 7px 9px;
  }

  /* ── Follow-ups ─────────────────────── */
  .amt-followups {
    margin-top: 12px;
    padding-top: 10px;
  }

  /* ── Response Header ────────────────── */
  .amt-response-header h3 {
    font-size: 15px;
  }

  .amt-copy-answer-btn {
    font-size: 11px;
    padding: 5px 10px;
  }

  /* ── Question Coach ─────────────────── */
  .amt-question-coach-inner {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .amt-question-coach-kicker {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .amt-question-coach-text {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .amt-question-coach-btn {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .amt-question-coach-btn-label {
    font-size: 10px;
  }

  .amt-question-coach-btn-text {
    font-size: 12px;
  }

  /* ── Char Counter ───────────────────── */
  .amt-char-counter {
    font-size: 11px;
  }
}

/* ========================================
   Accessibility
   ======================================== */
.ask-mirror-talk button:focus-visible,
#ask-mirror-talk-input:focus-visible {
  outline: 2px solid #2e2a24;
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   Session Resume Hint
   ======================================== */
.amt-journey-card {
  margin-bottom: 18px;
  animation: fadeInUp 0.45s ease;
}

.ask-mirror-talk:not(.amt-workflow-mode-progress) #amt-momentum-card,
.ask-mirror-talk:not(.amt-workflow-mode-progress) #amt-weekly-recap,
.ask-mirror-talk:not(.amt-workflow-mode-progress) #amt-badge-shelf,
.ask-mirror-talk:not(.amt-workflow-mode-progress) #amt-streak-revival-card {
  display: none !important;
}

.ask-mirror-talk:not(.amt-workflow-mode-explore) #amt-explore-expander,
.ask-mirror-talk:not(.amt-workflow-mode-explore) #amt-journey-card,
.ask-mirror-talk:not(.amt-workflow-mode-explore) #ask-mirror-talk-followups {
  display: none !important;
}

.amt-journey-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(212, 206, 198, 0.95);
  background:
    radial-gradient(circle at top right, rgba(212,168,87,0.12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(247,243,236,0.98));
  box-shadow: 0 12px 30px rgba(46, 42, 36, 0.06);
}

.amt-journey-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-journey-title {
  margin: 0 0 6px;
  color: #2e2a24;
  font-size: 22px;
  line-height: 1.2;
}

.amt-journey-text {
  margin: 0;
  color: #6b665d;
  font-size: 14px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-journey-quote {
  margin: 12px 0 0;
  color: #4b453e;
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
}

.amt-journey-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.amt-journey-btn {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  font-size: 14px;
  line-height: 1.45;
  font-family: inherit;
}

.amt-journey-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(46, 42, 36, 0.08);
}

.amt-journey-btn-primary {
  color: #fff;
  border: 1px solid #2e2a24;
  background: linear-gradient(135deg, #2e2a24, #4a433b);
}

.amt-journey-btn-secondary {
  color: #2e2a24;
  border: 1px solid #d4cec6;
  background: rgba(255,255,255,0.84);
}

.amt-journey-btn-secondary:hover {
  border-color: #8b7355;
  background: #faf8f4;
  color: #2e2a24;
}

.amt-momentum-card {
  margin-bottom: 18px;
  animation: fadeInUp 0.45s ease;
}

.amt-momentum-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(240px, 0.95fr);
  gap: 18px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(212, 206, 198, 0.95);
  background:
    radial-gradient(circle at 12% 18%, rgba(247,201,72,0.16), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(78,205,196,0.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.97), rgba(246,241,232,0.98));
  box-shadow: 0 14px 34px rgba(46, 42, 36, 0.07);
}

.amt-momentum-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-momentum-title {
  margin: 0 0 8px;
  color: #2e2a24;
  font-size: 24px;
  line-height: 1.18;
}

.amt-momentum-text {
  margin: 0;
  color: #625a50;
  font-size: 14px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-momentum-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.amt-momentum-pill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(139,115,85,0.14);
  background: rgba(255,255,255,0.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
}

.amt-momentum-pill strong {
  color: #2e2a24;
  font-size: 28px;
  line-height: 1;
  font-family: Georgia, serif;
}

.amt-momentum-pill em {
  margin-top: 5px;
  color: #7a7167;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-momentum-next {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  color: #6b665d;
  font-size: 13px;
  font-weight: 650;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-momentum-ask-btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid #2e2a24;
  border-radius: 999px;
  background: #2e2a24;
  color: #fffaf2;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-weekly-recap {
  margin-bottom: 18px;
  animation: fadeInUp 0.45s ease;
}

.amt-weekly-recap-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(212, 206, 198, 0.95);
  background:
    radial-gradient(circle at bottom left, rgba(78,205,196,0.12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241,247,245,0.98));
  box-shadow: 0 12px 30px rgba(46, 42, 36, 0.06);
}

.amt-weekly-recap-card-container {
  grid-column: 1 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.amt-weekly-recap-card-image {
  width: 100%;
  max-width: 378px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(46, 42, 36, 0.12);
}

.amt-weekly-recap-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #4a7b74;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-weekly-recap-title {
  margin: 0 0 6px;
  color: #2e2a24;
  font-size: 22px;
  line-height: 1.2;
}

.amt-weekly-recap-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.amt-weekly-recap-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(72,119,111,0.10);
  color: #355750;
  font-size: 12px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-weekly-recap-text,
.amt-weekly-recap-subtext {
  margin: 0;
  color: #5f6661;
  font-size: 14px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-weekly-recap-subtext {
  margin-top: 6px;
}

.amt-weekly-recap-quote {
  margin: 14px 0 0;
  color: #355750;
  font-size: 15px;
  line-height: 1.65;
  font-style: italic;
}

.amt-weekly-recap-actions {
  grid-column: 2 / 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.amt-weekly-recap-btn {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  font-size: 14px;
  line-height: 1.45;
  font-family: inherit;
}

.amt-weekly-recap-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(46, 42, 36, 0.08);
}

.amt-weekly-recap-btn-primary {
  color: #fff;
  border: 1px solid #30544d;
  background: linear-gradient(135deg, #30544d, #48776f);
}

.amt-weekly-recap-btn-secondary {
  color: #2e2a24;
  border: 1px solid #cde0dc;
  background: rgba(255,255,255,0.86);
}

.amt-weekly-recap-btn-secondary:hover {
  border-color: #48776f;
  color: #2e2a24;
  background: rgba(255,255,255,0.94);
}

.amt-weekly-recap-btn-share {
  color: #355750;
  border: 1px solid rgba(72,119,111,0.28);
  background: rgba(72,119,111,0.08);
}

.amt-weekly-recap-btn-share:hover {
  border-color: #355750;
  background: rgba(72,119,111,0.14);
  color: #355750;
}

.amt-resume-hint {
  margin-bottom: 12px;
}

.amt-resume-hint-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.amt-resume-label {
  font-size: 0.8rem;
  color: #6b665d;
  padding-left: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-resume-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  color: #6b665d;
  background: #faf8f4;
  border: 1px dashed #d4cec6;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.amt-resume-btn:hover {
  color: #2e2a24;
  border-color: #2e2a24;
  border-style: solid;
  background: #f5f2ed;
}

/* ========================================
   Question of the Day
   ======================================== */
.amt-qotd {
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out;
}

.amt-qotd-inner {
  background: linear-gradient(135deg, #fdfbf6 0%, #f5f0e6 100%);
  border: 1.5px solid #e0d5c3;
  border-radius: 14px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

/* Warm shimmer accent along the top */
.amt-qotd-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4a857, #8b7355, #d4a857);
}

.amt-qotd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.amt-qotd-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8b7355;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-qotd-theme {
  font-size: 11px;
  font-weight: 600;
  color: #a09380;
  background: rgba(139, 115, 85, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.3px;
}

.amt-qotd-text {
  font-size: 18px;
  line-height: 1.5;
  color: #2e2a24;
  font-style: italic;
  font-weight: 500;
  margin: 0 0 14px 0;
}

.amt-qotd-ask {
  display: inline-block;
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.3px;
}

.amt-qotd-ask:hover {
  background: linear-gradient(135deg, #3d3731, #524b42);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(46, 42, 36, 0.25);
}

.amt-qotd-ask:active {
  transform: translateY(0);
}

/* QOTD tablet adjustments handled in responsive section above */

/* ========================================
   Explore Expander (Topics + Suggestions)
   ======================================== */
.amt-explore-expander {
  margin-bottom: 16px;
  animation: fadeInUp 0.5s ease-out;
}

.amt-explore-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px; /* fixed height so no emoji can stretch the button */
  box-sizing: border-box;
  background: linear-gradient(135deg, #faf8f4, #f5f2ec);
  border: 1.5px solid #e6e2dc;
  border-radius: 24px;
  padding: 10px 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6b665d;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.amt-explore-toggle:hover {
  background: linear-gradient(135deg, #f0ede7, #e8e3db);
  border-color: #c8c2b8;
  color: #2e2a24;
  box-shadow: 0 2px 8px rgba(46, 42, 36, 0.08);
}

.amt-explore-toggle[aria-expanded="true"] {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border-color: #2e2a24;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 4px 14px rgba(46, 42, 36, 0.18);
}

.amt-explore-icons {
  font-size: 15px;
  letter-spacing: 2px;
  flex-shrink: 0;
  opacity: 0.75;
  /* Fixed dimensions so no emoji — tall glyphs, flags, ZWJ sequences — can
     stretch the button and cause layout bounce */
  height: 22px;
  line-height: 22px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.amt-explore-toggle[aria-expanded="true"] .amt-explore-icons {
  opacity: 1;
}

.amt-explore-label {
  flex: 1;
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.2px;
}

.amt-explore-chevron {
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  display: inline-block;
  opacity: 0.5;
  line-height: 1;
}

.amt-explore-toggle[aria-expanded="true"] .amt-explore-chevron {
  transform: rotate(90deg);
  opacity: 1;
}

/* Panel — hidden by default, animated open */
.amt-explore-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              padding 0.35s ease;
  opacity: 0;
  background: linear-gradient(to bottom, #faf8f4, #fff);
  border: 1.5px solid #e6e2dc;
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 0 16px;
  box-sizing: border-box;
}

.amt-explore-panel--open {
  max-height: 1200px;
  opacity: 1;
  padding: 16px 16px 8px;
}

/* Tighten inner section margins inside the panel */
.amt-explore-panel .amt-topics {
  margin-bottom: 12px;
}

.amt-explore-panel .amt-suggestions {
  margin-bottom: 4px;
}

/* ========================================
   Browse by Topic
   ======================================== */
.amt-topics {
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease-out;
}

.amt-topics-label {
  font-size: 14px;
  color: #6b665d;
  margin: 0 0 10px 0;
  font-style: italic;
}

.amt-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amt-topic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fff, #faf8f4);
  border: 1.5px solid #e6e2dc;
  border-radius: 24px;
  padding: 8px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #2e2a24;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.4;
}

.amt-topic-icon {
  font-size: 15px;
  line-height: 1;
}

.amt-topic-name {
  font-size: 13px;
}

.amt-topic-btn:hover {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border-color: #2e2a24;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(46, 42, 36, 0.2);
}

.amt-topic-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(46, 42, 36, 0.15);
}

/* ========================================
   Suggested Questions
   ======================================== */
.amt-suggestions {
  margin-bottom: 16px;
}

.amt-suggestions-label,
.amt-followups-label {
  font-size: 14px;
  color: #6b665d;
  margin: 0 0 8px 0;
  font-style: italic;
}

.amt-suggestions-list,
.amt-followups-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amt-suggestion-btn,
.amt-followup-btn {
  background: #fff;
  border: 1.5px solid #d4cec6;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  color: #2e2a24;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.amt-suggestion-btn:hover,
.amt-followup-btn:hover {
  background: #2e2a24;
  color: #fff;
  border-color: #2e2a24;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(46, 42, 36, 0.15);
}

.amt-suggestion-btn:active,
.amt-followup-btn:active {
  transform: translateY(0);
}

/* ========================================
   Follow-up Questions — The Addictive Loop
   ======================================== */
.amt-followups {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e6e2dc;
  animation: fadeInUp 0.4s ease;
}

.amt-followups-label {
  position: relative;
}

/* Subtle glow on follow-up buttons to draw attention */
.amt-followup-btn {
  animation: followUpAppear 0.5s ease-out both;
}

.amt-followup-btn:nth-child(1) { animation-delay: 0.1s; }
.amt-followup-btn:nth-child(2) { animation-delay: 0.25s; }
.amt-followup-btn:nth-child(3) { animation-delay: 0.4s; }

@keyframes followUpAppear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   PWA Install Banner — "Add to Home Screen"
   ======================================== */
.amt-install-banner {
  margin: -8px -8px 16px -8px;
  animation: fadeInUp 0.4s ease-out;
}

.amt-install-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  border-radius: 10px;
  color: #fff;
}

.amt-install-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.amt-install-text strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.amt-install-text span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.amt-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.amt-install-btn {
  background: #fff;
  color: #2e2a24;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.amt-install-btn:hover {
  background: #f5f2ed;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.amt-install-btn:active {
  transform: scale(0.96);
}

.amt-install-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.amt-install-dismiss:hover {
  color: #fff;
}

.amt-install-banner.amt-install-hiding {
  animation: fadeOutUp 0.3s ease-in forwards;
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

/* Mobile: stack install banner vertically */
@media (max-width: 480px) {
  .amt-install-banner {
    margin: -4px -4px 12px -4px;
  }

  .amt-install-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    text-align: center;
  }

  .amt-install-actions {
    justify-content: center;
    gap: 10px;
  }

  .amt-install-btn {
    flex: 1;
    padding: 10px 16px;
  }
}

/* Hide install banner in standalone mode (already installed) */
@media (display-mode: standalone) {
  .amt-install-banner {
    display: none !important;
  }
}

/* ========================================
   Push Notification Opt-In Banner
   ======================================== */
.amt-notif-optin {
  margin: 16px 0;
  animation: amtSlideDown 0.3s ease-out;
}

.amt-notif-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #f7f2e9 0%, #efe7db 100%);
  border: 1px solid #ddd3c4;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 10px 22px rgba(46, 42, 36, 0.06);
}

.amt-notif-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #a5d6a7;
  justify-content: center;
}

.amt-notif-error {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-color: #ffcc80;
  justify-content: center;
}

.amt-notif-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.amt-notif-text strong {
  font-size: 15px;
  color: #2e2a24;
}

.amt-notif-text span {
  font-size: 13px;
  color: #6b665d;
  line-height: 1.55;
}

.amt-notif-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.amt-notif-enable {
  background: #2e2a24;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.amt-notif-enable:hover {
  background: #3d3731;
}

.amt-notif-enable:active {
  transform: scale(0.97);
}

.amt-notif-dismiss {
  background: transparent;
  border: 1px solid #c4bfb5;
  color: #6b665d;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.amt-notif-dismiss:hover {
  background: rgba(0,0,0,0.04);
  border-color: #a09a8f;
}

/* Preferences checkboxes */
.amt-notif-prefs {
  background: #faf8f4;
  border: 1px solid #d4cfc5;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: amtSlideDown 0.2s ease-out;
}

.amt-notif-prefs-intro {
  margin: 0 0 4px;
  color: #6b665d;
  font-size: 13px;
  line-height: 1.5;
}

.amt-notif-pref {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #2e2a24;
  cursor: pointer;
}

.amt-notif-pref input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2e2a24;
  cursor: pointer;
}

.amt-notif-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: #6b665d;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0 0 4px;
  margin-bottom: 2px;
  transition: color 0.15s;
}
.amt-notif-back:hover {
  color: #2e2a24;
}

.amt-notif-save {
  align-self: flex-start;
  background: #2e2a24;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  transition: background 0.2s;
}

.amt-notif-save:hover {
  background: #3d3731;
}

.amt-notif-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.amt-notif-optin.amt-notif-hiding {
  animation: amtSlideUp 0.3s ease-in forwards;
}

@keyframes amtSlideDown {
  from { opacity: 0; max-height: 0; transform: translateY(-8px); }
  to { opacity: 1; max-height: 280px; transform: translateY(0); }
}

@keyframes amtSlideUp {
  from { opacity: 1; max-height: 280px; }
  to { opacity: 0; max-height: 0; margin: 0; padding: 0; overflow: hidden; }
}

/* Mobile: stack notification banner vertically */
@media (max-width: 600px) {
  .amt-notif-inner {
    flex-direction: column;
    text-align: center;
    padding: 14px 16px;
  }

  .amt-notif-actions {
    width: 100%;
    justify-content: center;
  }

  .amt-notif-enable {
    flex: 1;
    padding: 10px 16px;
  }

  .amt-notif-back {
    align-self: center;
  }

  .amt-notif-prefs {
    align-items: center;
  }

  .amt-notif-save {
    align-self: center;
    width: 100%;
  }
}

/* ========================================
   Notification Management Button & Panel
   ======================================== */

/* Bell button in stats bar */
.amt-notif-manage-btn {
  background: none;
  border: 1px solid #d4cfc5;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 16px;
  cursor: pointer;
  color: #6b665d;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.amt-notif-manage-btn:hover {
  background: rgba(0,0,0,0.04);
  border-color: #a09a8f;
}
.amt-notif-manage-btn[aria-expanded="true"] {
  background: #f0ede8;
  border-color: #a09a8f;
}

/* Management panel */
.amt-notif-manage-panel {
  margin: 4px 0 12px;
  background: #faf8f4;
  border: 1px solid #d4cfc5;
  border-radius: 12px;
  padding: 16px 20px;
  animation: amtSlideDown 0.2s ease-out;
}

.ask-mirror-talk > .amt-notif-manage-panel {
  margin: 12px 0 16px;
}
.amt-notif-manage-panel .amt-nmp-heading {
  font-size: 14px;
  font-weight: 600;
  color: #2e2a24;
  margin: 0 0 12px;
}
.amt-notif-manage-panel .amt-nmp-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.amt-notif-manage-panel .amt-nmp-pref {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #2e2a24;
  cursor: pointer;
}
.amt-notif-manage-panel .amt-nmp-pref input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2e2a24;
  cursor: pointer;
  flex-shrink: 0;
}
.amt-notif-manage-panel .amt-nmp-pref-desc {
  font-size: 12px;
  color: #6b665d;
  display: block;
}
.amt-notif-manage-panel .amt-nmp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.amt-notif-manage-panel .amt-nmp-save {
  background: #2e2a24;
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.amt-notif-manage-panel .amt-nmp-save:hover {
  background: #3d3731;
}
.amt-notif-manage-panel .amt-nmp-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.amt-notif-manage-panel .amt-nmp-unsub {
  background: none;
  border: none;
  color: #9e9387;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.amt-notif-manage-panel .amt-nmp-unsub:hover {
  color: #c0392b;
}

/* Retain step */
.amt-nmp-retain {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.amt-nmp-retain-heading {
  font-size: 14px;
  font-weight: 600;
  color: #2e2a24;
  margin: 0;
}
.amt-nmp-retain-body {
  font-size: 13px;
  color: #6b665d;
  margin: 0;
  line-height: 1.5;
}
.amt-nmp-retain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.amt-nmp-keep-qotd {
  background: #2e2a24;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.amt-nmp-keep-qotd:hover {
  background: #3d3731;
}
.amt-nmp-confirm-unsub {
  background: none;
  border: 1px solid #c4bfb5;
  color: #6b665d;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.amt-nmp-confirm-unsub:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.amt-nmp-success-msg {
  font-size: 14px;
  color: #2e7d32;
  font-weight: 600;
}
.amt-nmp-unsub-msg {
  font-size: 14px;
  color: #6b665d;
}

@media (max-width: 600px) {
  .amt-notif-manage-panel {
    padding: 14px 14px;
  }
  .amt-nmp-retain-actions {
    flex-direction: column;
  }
  .amt-nmp-keep-qotd,
  .amt-nmp-confirm-unsub {
    width: 100%;
    text-align: center;
  }
  .amt-notif-manage-panel .amt-nmp-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .ask-mirror-talk button,
  #ask-mirror-talk-input,
  .ask-mirror-talk form,
  .amt-feedback-section,
  .amt-inline-player,
  .amt-suggestions,
  .amt-followups,
  .amt-install-banner {
    display: none;
  }

  .ask-mirror-talk {
    box-shadow: none;
    border: none;
  }
}

/* ========================================
   Gamification — Stats Bar, Badges, Toasts
   ======================================== */

/* ── Stats bar ── */
.amt-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 12px;
  flex-wrap: wrap;
}

.amt-stat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.11);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  opacity: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.amt-stat-action-btn:hover,
.amt-stat-action-btn:focus-visible {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.38);
  color: #fff;
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.18);
}

.amt-stat-action-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  opacity: 0.86;
}

.amt-stats-bar-empty {
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.72), transparent 34%),
    linear-gradient(135deg, rgba(46,42,36,0.88), rgba(111,90,66,0.9));
}

.amt-stats-bar-empty .amt-stat {
  opacity: 0.74;
}

.amt-stats-prompt {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.amt-stats-prompt-kicker {
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-stats-prompt-text {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  line-height: 1.45;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-stats-prompt-subtext {
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  line-height: 1.45;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 0.85rem;
}

.amt-stat-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Pulse animation when streak ≥ 3 days */
.amt-streak-active {
  animation: streakPulse 1.6s ease-in-out infinite;
}

@keyframes streakPulse {
  0%, 100% { transform: scale(1);   filter: drop-shadow(0 0 0px #f7c948); }
  50%       { transform: scale(1.25); filter: drop-shadow(0 0 6px #f7c948); }
}

/* Glow when ≥ 3 questions asked today */
.amt-questions-active {
  animation: questionsPulse 2s ease-in-out infinite;
}

@keyframes questionsPulse {
  0%, 100% { filter: drop-shadow(0 0 0px #e884c8); }
  50%       { filter: drop-shadow(0 0 7px #e884c8); transform: scale(1.1); }
}

.amt-stat-value {
  font-weight: 700;
  font-size: 1rem;
  color: #f7c948;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.amt-stat-label {
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}

.amt-stat-themes .amt-stat-value { color: #4ecdc4; }
.amt-stat-questions .amt-stat-value { color: #e884c8; }

.amt-workflow-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 30px 0 18px;
  padding: 9px;
  border-radius: 18px;
  border: 1px solid rgba(139, 115, 85, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.82), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.70), rgba(239,232,222,0.76));
  box-shadow: 0 14px 34px rgba(46,42,36,0.08), inset 0 1px 0 rgba(255,255,255,0.70);
  backdrop-filter: blur(10px);
}

.amt-workflow-guide {
  position: absolute;
  top: -22px;
  left: 50%;
  z-index: 1;
  color: rgba(93, 75, 54, 0.62);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.1;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.amt-workflow-step {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px 9px;
  border: 1px solid rgba(139,115,85,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.38);
  color: #6f665c;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.52);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-workflow-step::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.58) 46%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-34%);
}

.amt-workflow-step-active::after {
  animation: amtWorkflowGuideSweep 3.8s ease-in-out 0.8s 2;
}

.amt-workflow-step:hover,
.amt-workflow-step:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.72);
  border-color: rgba(139,115,85,0.18);
  color: #2e2a24;
  outline: none;
}

.amt-workflow-step-active {
  background: linear-gradient(135deg, #2e2a24, #6f5a42);
  color: #fffaf2;
  border-color: rgba(255,255,255,0.52);
  box-shadow:
    0 10px 22px rgba(46,42,36,0.18),
    0 0 0 2px rgba(212,168,87,0.24),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

.amt-workflow-step-available:not(.amt-workflow-step-active) {
  background: rgba(255,255,255,0.50);
  border-color: rgba(139,115,85,0.14);
}

.amt-workflow-icon {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1;
}

.amt-workflow-label {
  max-width: 100%;
  min-height: 1.95em;
  overflow: visible;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.amt-workflow-hint {
  max-width: 100%;
  color: currentColor;
  opacity: 0.62;
  overflow: visible;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.amt-workflow-nudge {
  max-width: 680px;
  margin: 18px auto 20px;
  padding: 12px 14px;
  border: 1px solid rgba(139, 115, 85, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.72), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,0.58), rgba(245,238,228,0.72));
  color: rgba(93, 75, 54, 0.76);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 10px 26px rgba(46,42,36,0.05), inset 0 1px 0 rgba(255,255,255,0.72);
}

.amt-workflow-nudge-text {
  display: block;
  margin: 0 0 10px;
}

.amt-workflow-nudge-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.amt-workflow-nudge-btn {
  appearance: none;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: #5f5143;
  cursor: pointer;
  font: 800 12px/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 9px 13px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.amt-workflow-nudge-btn:hover,
.amt-workflow-nudge-btn:focus-visible {
  background: #fffaf2;
  box-shadow: 0 8px 18px rgba(46,42,36,0.1);
  outline: none;
  transform: translateY(-1px);
}

.amt-workflow-nudge-btn-primary {
  background: linear-gradient(135deg, #2e2a24, #6f5a42);
  border-color: rgba(255,255,255,0.3);
  color: #fffaf2;
}

.amt-workflow-nudge-btn-primary:hover,
.amt-workflow-nudge-btn-primary:focus-visible {
  background: linear-gradient(135deg, #2e2a24, #6f5a42);
  color: #fffaf2;
  box-shadow: 0 10px 22px rgba(46,42,36,0.16);
}

.amt-workflow-nudge-btn-primary:hover *,
.amt-workflow-nudge-btn-primary:focus-visible * {
  color: inherit;
}

.amt-workflow-panels {
  position: relative;
}

.amt-workflow-panel {
  display: none;
  animation: fadeInUp 0.32s ease;
}

.amt-workflow-panel[hidden] {
  display: none !important;
}

.ask-mirror-talk.amt-workflow-mode-ask #amt-workflow-panel-ask,
.ask-mirror-talk.amt-workflow-mode-explore #amt-workflow-panel-explore,
.ask-mirror-talk.amt-workflow-mode-save_share #amt-workflow-panel-save-share,
.ask-mirror-talk.amt-workflow-mode-progress #amt-workflow-panel-progress {
  display: block;
}

.amt-workflow-panel-header {
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 1px solid rgba(139, 115, 85, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.86), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.86), rgba(246,239,229,0.76));
  box-shadow: 0 14px 34px rgba(46,42,36,0.06), inset 0 1px 0 rgba(255,255,255,0.72);
}

.amt-workflow-panel-kicker,
.amt-save-share-kicker {
  display: block;
  margin: 0 0 6px;
  color: #8b7355;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.amt-workflow-panel-header h3,
.amt-save-share-hub-card h3 {
  margin: 0;
  color: #2e2a24;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.2;
}

.amt-workflow-panel-header p,
.amt-save-share-hub-card p {
  max-width: 64ch;
  margin: 8px 0 0;
  color: rgba(46,42,36,0.72);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.6;
}

.ask-mirror-talk-response .ask-mirror-talk-citations {
  margin-top: 20px;
}

.amt-workflow-panel-explore .amt-continuation-strip,
.amt-workflow-panel-explore .amt-followups,
.amt-workflow-panel-explore .amt-qotd,
.amt-workflow-panel-explore .amt-explore-expander,
.amt-workflow-panel-save-share .amt-reflect-section,
.amt-workflow-panel-save-share .amt-answer-utilities,
.amt-workflow-panel-save-share .amt-insights-panel,
.amt-workflow-panel-progress .amt-stats-bar,
.amt-workflow-panel-progress .amt-momentum-card,
.amt-workflow-panel-progress .amt-weekly-recap,
.amt-workflow-panel-progress .amt-badge-shelf,
.amt-workflow-panel-progress .amt-streak-protect-banner,
.amt-workflow-panel-progress .amt-streak-revival-card {
  margin-top: 16px;
}

.amt-save-share-hub-card {
  padding: 20px;
  border: 1px solid rgba(139, 115, 85, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(212,168,87,0.16), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,0.90), rgba(248,243,235,0.82));
  box-shadow: 0 14px 34px rgba(46,42,36,0.07), inset 0 1px 0 rgba(255,255,255,0.74);
}

.amt-save-share-question {
  color: #2e2a24 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.amt-save-share-excerpt {
  padding: 14px 16px;
  border-left: 3px solid rgba(139,115,85,0.34);
  border-radius: 14px;
  background: rgba(255,255,255,0.58);
  color: rgba(46,42,36,0.74) !important;
}

.amt-save-share-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.amt-save-share-hub-btn {
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(46,42,36,0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, #2e2a24, #6f5a42);
  color: #fffaf2;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(46,42,36,0.14);
}

.amt-save-share-hub-btn-secondary {
  background: rgba(255,255,255,0.70);
  color: #2e2a24;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70);
}

.amt-workflow-focus-pulse {
  animation: amtWorkflowPulse 0.9s ease;
}

@keyframes amtWorkflowPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(139,115,85,0); }
  45% { box-shadow: 0 0 0 5px rgba(139,115,85,0.16), 0 18px 40px rgba(46,42,36,0.10); }
}

@keyframes amtWorkflowGuideSweep {
  0%, 58%, 100% {
    opacity: 0;
    transform: translateX(-34%);
  }
  18% {
    opacity: 0.62;
  }
  42% {
    opacity: 0;
    transform: translateX(34%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .amt-workflow-step-active::after {
    animation: none;
  }
}

.amt-badges-btn {
  margin-left: auto;
}

/* Wobble hint — plays twice when the stats bar first appears, then stops */
@keyframes amtBadgeWobble {
  0%          { transform: rotate(0deg)   scale(1); }
  12%         { transform: rotate(-10deg) scale(1.15); }
  25%         { transform: rotate(8deg)   scale(1.12); }
  37%         { transform: rotate(-6deg)  scale(1.1); }
  50%         { transform: rotate(4deg)   scale(1.05); }
  62%         { transform: rotate(-2deg)  scale(1.02); }
  75%,  100%  { transform: rotate(0deg)   scale(1); }
}

.amt-badges-btn-hint {
  animation: amtBadgeWobble 0.65s ease-in-out 2;
  animation-delay: 0.4s;
  animation-fill-mode: both;
}

/* ── Badge shelf ── */
.amt-badge-shelf {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px;
  background: #0f0f23;
  border-radius: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.25s ease;
}

.amt-badge-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(247,201,72,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(247,201,72,0.18);
}

.amt-badge-overview-copy {
  min-width: 0;
}

.amt-badge-overview-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: rgba(247,201,72,0.72);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-badge-overview-title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

.amt-badge-overview-subtitle {
  margin: 0;
  color: rgba(255,255,255,0.66);
  font-size: 13px;
  line-height: 1.5;
}

.amt-badge-overview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.amt-next-unlocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.amt-next-unlock-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.amt-next-unlock-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-next-unlock-title {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
}

.amt-next-unlock-meter {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.amt-next-unlock-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f7c948, #f2a65a);
}

.amt-next-unlock-rose .amt-next-unlock-meter span {
  background: linear-gradient(90deg, #e884c8, #f2b3dc);
}

.amt-next-unlock-teal .amt-next-unlock-meter span {
  background: linear-gradient(90deg, #4ecdc4, #89e4de);
}

.amt-next-unlock-ink .amt-next-unlock-meter span {
  background: linear-gradient(90deg, #c9a84c, #f5e6c8);
}

.amt-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 12px 10px;
  align-items: start;
  width: 100%;
}

.amt-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 96px;
  justify-self: center;
  text-align: center;
  cursor: default;
  transition: transform 0.15s;
}

.amt-badge:hover { transform: scale(1.08); }

.amt-badge-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.amt-badge-name {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.amt-badge-locked .amt-badge-emoji { filter: grayscale(1) opacity(0.3); }
.amt-badge-locked .amt-badge-name  { color: rgba(255,255,255,0.3); }

.amt-badge-earned .amt-badge-emoji {
  filter: drop-shadow(0 0 6px rgba(247,201,72,0.7));
}

/* ── Milestone / badge toast ── */
.amt-milestone-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
  border: 1.5px solid rgba(247,201,72,0.4);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  z-index: 99998;
  max-width: min(380px, 90vw);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s ease;
  pointer-events: none;
}

.amt-milestone-toast.amt-toast-in {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.amt-milestone-toast.amt-toast-out {
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
}

.amt-toast-emoji { font-size: 2rem; flex-shrink: 0; }

.amt-milestone-toast strong {
  display: block;
  font-size: 0.95rem;
  color: #f7c948;
  margin-bottom: 2px;
}

.amt-milestone-toast span { color: rgba(255,255,255,0.75); }

/* ── Rating Section (old icon-only buttons removed; styles now in analytics-addon block above) ── */

/* ── Save to Email ───────────────────────────────────────────── */
.amt-email-section {
  margin-top: 8px;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.amt-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: 1.5px solid #d4cec6;
  border-radius: 12px;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 0.85rem;
  color: #6b665d;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.amt-email-btn:hover {
  border-color: #2e2a24;
  color: #2e2a24;
  background: #f5f2ed;
}

/* ── Citation Preview Button ─────────────────────────────────── */
.citation-preview-btn {
  display: inline-block !important;
  margin-top: 6px !important;
  margin-right: 8px !important;
  background: none !important;
  border: 1.5px solid #d4cec6 !important;
  border-radius: 6px !important;
  padding: 7px 14px !important;
  font-size: 0.9rem !important;
  color: #6b665d !important;
  cursor: pointer !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  line-height: 1.4 !important;
}

.citation-preview-btn:hover {
  border-color: #8b7355 !important;
  color: #2e2a24 !important;
  background: #f5f2ed !important;
}

/* ── Dark Mode ───────────────────────────────────────────────── */
.amt-dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  background: rgba(46,42,36,0.9);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}

.amt-dark-mode-toggle:hover {
  transform: scale(1.05);
}

.amt-toggle-moon { line-height: 1; }

.amt-toggle-streak {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f7c948;
  letter-spacing: 0.01em;
}

/* Light mode overrides when .amt-light-mode is on body */
body.amt-light-mode .ask-mirror-talk {
  background: #f5f0eb;
  color: #2e2a24;
}

body.amt-light-mode .amt-feedback-section {
  background: rgba(0,0,0,0.05);
}

body.amt-light-mode .amt-feedback-label {
  color: rgba(0,0,0,0.5);
}

body.amt-light-mode .amt-feedback-btn {
  border-color: rgba(0,0,0,0.2);
}

body.amt-light-mode #ask-mirror-talk-output p,
body.amt-light-mode #ask-mirror-talk-output li,
body.amt-light-mode .ask-mirror-talk-response h3 {
  color: #2e2a24;
}

body.amt-light-mode .citation-item {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

body.amt-light-mode .amt-stat-label,
body.amt-light-mode .amt-followups-label,
body.amt-light-mode .amt-topics-label,
body.amt-light-mode .amt-suggestions-label {
  color: rgba(0,0,0,0.5);
}

/* ── Onboarding Overlay ──────────────────────────────────────── */
.amt-onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: amt-fade-in 0.3s ease;
}

@keyframes amt-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.amt-onboarding-card {
  background: #f8f5f1;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}

.amt-onboarding-card h2 {
  font-size: 1.5rem;
  color: #d4a135;
  margin: 0 0 10px;
}

.amt-onboarding-card p {
  font-size: 0.95rem;
  color: rgba(46,42,36,0.75);
  line-height: 1.6;
  margin: 0 0 24px;
}

.amt-onboarding-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.amt-onboarding-example {
  background: rgba(212,161,53,0.08);
  border: 1px solid rgba(212,161,53,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: rgba(46,42,36,0.85);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.amt-onboarding-example:hover {
  background: rgba(212,161,53,0.14);
}

.amt-onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.amt-onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.2s;
}

.amt-onboarding-dot.active {
  background: #f7c948;
}

.amt-onboarding-next {
  background: #f7c948;
  color: #2e2a24;
  border: none;
  border-radius: 10px;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}

.amt-onboarding-next:hover {
  transform: scale(1.03);
}

.amt-onboarding-skip {
  background: none;
  border: none;
  color: rgba(46,42,36,0.5);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 12px;
  display: block;
  width: 100%;
  text-align: center;
  transition: color 0.2s ease;
}

.amt-onboarding-skip:hover {
  color: rgba(46,42,36,0.8);
}

/* ── Related Questions ───────────────────────────────────────── */
.amt-related-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e6e2dc;
}

.amt-related-label {
  font-size: 0.82rem;
  color: #6b665d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-related-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.amt-related-btn {
  background: #fff;
  border: 1px solid #e6e2dc;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
  color: #4a453d;
  cursor: pointer;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.amt-related-btn:hover {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  border-color: #2e2a24;
  color: #fff;
}

/* ── Freshness year badge on citations ───────────────────────── */
.citation-year {
  font-size: 0.75rem;
  color: rgba(46,42,36,0.45);
  background: rgba(46,42,36,0.07);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Topics: starter questions expand ───────────────────────── */
.amt-topic-starter-list {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e6e2dc;
}

.amt-topic-item.amt-topic-open .amt-topic-starter-list {
  display: flex;
}

.amt-topic-starter-btn {
  background: #fff;
  border: 1px solid #e6e2dc;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.84rem;
  color: #4a453d;
  cursor: pointer;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.amt-topic-starter-btn:hover {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border-color: #2e2a24;
}

.amt-topic-item {
  border: 1px solid #e6e2dc;
  border-radius: 10px;
  padding: 10px 14px;
  background: #faf8f4;
  transition: border-color 0.2s, background 0.2s;
}

.amt-topic-item.amt-topic-open {
  border-color: #8b7355;
  background: #f5f2ed;
}

.amt-topic-item .amt-topic-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #2e2a24;
}

/* Prevent the generic hover rule (.amt-topic-btn:hover) from setting white text
   on a transparent background — these buttons sit inside a light card. */
.amt-topic-item .amt-topic-btn:hover,
.amt-topic-item .amt-topic-btn:focus,
.amt-topic-item .amt-topic-btn:active {
  background: rgba(46, 42, 36, 0.06) !important;
  color: #2e2a24 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none;
}

.amt-topic-expand-arrow {
  font-size: 0.75rem;
  color: #b5afa5;
  transition: transform 0.2s;
  margin-left: auto;
}

.amt-topic-item.amt-topic-open .amt-topic-expand-arrow {
  transform: rotate(90deg);
}

/* ============================================================
   v5.0.0 — New Feature Styles
   ============================================================ */

/* ── Heading row with controls ────────────────────────────── */
.amt-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.amt-heading-row h2 {
  margin: 0;
}

.amt-heading-copy {
  max-width: 540px;
}

.amt-heading-kicker {
  margin: 0 0 8px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-heading-subtitle {
  margin: 8px 0 0;
  color: #6b665d;
  font-size: 15px;
  line-height: 1.65;
  max-width: 52ch;
}

.amt-heading-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.amt-heading-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: #6d5a42;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  pointer-events: none;
}

.amt-heading-trust-pill::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(139, 115, 85, 0.55);
  flex-shrink: 0;
}

.amt-heading-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  max-width: 180px;
}

.amt-heading-controls-note {
  width: 100%;
  margin-top: 2px;
  color: #8f877b;
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
  letter-spacing: 0;
  text-transform: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-heading-controls-note strong {
  color: #6d5a42;
  font-weight: 700;
}

.amt-text-size-btn,
.amt-journal-btn,
.amt-note-btn,
.amt-about-btn {
  background: rgba(255,255,255,0.72);
  border: 1px solid #e6e2dc;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  flex-shrink: 0;
  padding: 0;
  box-shadow: 0 1px 3px rgba(46, 42, 36, 0.04);
}

.amt-text-size-btn:hover,
.amt-journal-btn:hover,
.amt-note-btn:hover,
.amt-about-btn:hover {
  border-color: #2e2a24;
  color: #2e2a24;
  background: #fff;
}

.amt-journal-btn,
.amt-note-btn,
.amt-about-btn {
  font-size: 16px;
  font-weight: 400;
}

/* Insights button in stats bar */
.amt-insights-btn {
  font-size: 0.78rem;
}

.amt-insights-btn:hover { opacity: 1; }

/* ── Text Size Levels ─────────────────────────────────────── */
/* Applied to root container so ALL widget text scales together */
.ask-mirror-talk.amt-text-small {
  font-size: 14px !important;
  line-height: 1.65;
}
.ask-mirror-talk.amt-text-large {
  font-size: 18px !important;
  line-height: 1.85;
}
/* Explicitly cascade into key text-bearing elements */
.ask-mirror-talk.amt-text-small #ask-mirror-talk-output,
.ask-mirror-talk.amt-text-small .ask-mirror-talk-response,
.ask-mirror-talk.amt-text-small .amt-qotd,
.ask-mirror-talk.amt-text-small .amt-topics,
.ask-mirror-talk.amt-text-small .amt-suggestions,
.ask-mirror-talk.amt-text-small #ask-mirror-talk-input,
.ask-mirror-talk.amt-text-small .amt-citation,
.ask-mirror-talk.amt-text-small .amt-reflect-textarea {
  font-size: 14px !important;
  line-height: 1.65;
}
.ask-mirror-talk.amt-text-large #ask-mirror-talk-output,
.ask-mirror-talk.amt-text-large .ask-mirror-talk-response,
.ask-mirror-talk.amt-text-large .amt-qotd,
.ask-mirror-talk.amt-text-large .amt-topics,
.ask-mirror-talk.amt-text-large .amt-suggestions,
.ask-mirror-talk.amt-text-large #ask-mirror-talk-input,
.ask-mirror-talk.amt-text-large .amt-citation,
.ask-mirror-talk.amt-text-large .amt-reflect-textarea {
  font-size: 18px !important;
  line-height: 1.85;
}
/* Visual flash feedback when size changes */
.amt-text-size-btn.amt-size-changed {
  background: rgba(212, 165, 80, 0.35) !important;
  transform: scale(1.18);
  transition: transform 0.12s ease, background 0.12s ease;
}

/* ── Response Header (with copy button) ──────────────────── */
.amt-response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.amt-response-header h3 {
  margin: 0;
}

.amt-copy-answer-btn {
  background: transparent;
  border: 1.5px solid #d4cec6;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  flex-shrink: 0;
}

.amt-copy-answer-btn:hover {
  border-color: #2e2a24;
  color: #2e2a24;
  background: #faf8f4;
}

.amt-copy-answer-btn.amt-copy-copied {
  border-color: #10b981;
  color: #10b981;
}

.amt-answer-context {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(212, 206, 198, 0.95);
  background: linear-gradient(135deg, #faf8f4, #f5f2ed);
}

.amt-answer-context-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.amt-answer-context-copy-soft {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbf7f1, #f3ecdf);
  border: 1px solid #e7dccd;
}

.amt-answer-context-kicker {
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-answer-context-summary,
.amt-answer-context-detail {
  margin: 0;
  color: #4f4a43;
  font-size: 13px;
  line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-answer-context-summary {
  color: #2e2a24;
  font-weight: 600;
}

.amt-answer-context-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.amt-answer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 3px 0;
  border-radius: 0;
  background: transparent;
  color: #6d5a42;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  pointer-events: none;
}

.amt-answer-pill::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(139, 115, 85, 0.55);
  flex-shrink: 0;
}

.amt-answer-utilities {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #efe9df;
}

.amt-answer-utilities:empty {
  display: none;
}

.amt-answer-utilities > .amt-share-section {
  flex: 1 1 100%;
}

.amt-answer-utilities > .amt-email-section,
.amt-answer-utilities > .amt-save-insight-section {
  margin-top: 0;
}

.amt-answer-utilities > .amt-email-section {
  flex: 1 1 100%;
  justify-content: center;
}

.amt-answer-utilities > .amt-save-insight-section {
  flex: 1 1 100%;
  justify-content: center;
}

.amt-continuation-strip {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #e7dccd;
  animation: fadeInUp 0.5s ease, pulseOnce 2s ease 0.6s;
}

@keyframes pulseOnce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}

.amt-continuation-strip-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff9f0 0%, #fef5e7 50%, #fff9f0 100%);
  border: 2px solid #d9b88f;
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.12);
}

.amt-continuation-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #b8935f;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-continuation-text {
  margin: 0;
  color: #3d3731;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;
}

.amt-continuation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.amt-continuation-btn {
  background: #fff;
  border: 2px solid #d9cdbf;
  border-radius: 999px;
  padding: 12px 20px;
  color: #2e2a24;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 2px 8px rgba(46, 42, 36, 0.06);
}

.amt-continuation-btn:hover {
  border-color: #b8935f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 115, 85, 0.15);
}

.amt-continuation-btn-primary {
  background: linear-gradient(135deg, #b8935f 0%, #8b7355 100%);
  color: #fff;
  border-color: #b8935f;
  box-shadow: 0 4px 12px rgba(184, 147, 95, 0.25);
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(184, 147, 95, 0.25); }
  50% { box-shadow: 0 6px 20px rgba(184, 147, 95, 0.35); }
}

.amt-continuation-btn-primary:hover {
  background: linear-gradient(135deg, #c9a573 0%, #9d836a 100%);
  border-color: #c9a573;
}

/* ── Response Reading Progress Bar ──────────────────────── */
.amt-response-progress {
  position: sticky;
  top: 0;
  height: 3px;
  background: transparent;
  border-radius: 2px 2px 0 0;
  overflow: hidden;
  z-index: 2;
  margin: -1px -16px 0;
}

.amt-response-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4a574, #8b7355);
  border-radius: 2px;
  transition: width 0.15s ease-out;
}

/* ── Mood Reactions ──────────────────────────────────────── */
.amt-mood-reactions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6e2dc;
  animation: fadeInUp 0.4s ease;
}

.amt-mood-label {
  font-size: 13px;
  color: #8b7355;
  font-style: italic;
  margin: 0 0 10px 0;
}

.amt-mood-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.amt-mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: #fff;
  border: 1.5px solid #e6e2dc;
  border-radius: 14px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  animation: followUpAppear 0.5s ease-out both;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-width: 0;
  width: 100%;
}

.amt-mood-btn:hover {
  border-color: #2e2a24;
  background: #faf8f4;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(46,42,36,0.12);
}

.amt-mood-btn.amt-mood-selected {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  border-color: #2e2a24;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(46,42,36,0.2);
}

.amt-mood-btn.amt-mood-selected .amt-mood-reaction-label {
  color: rgba(255,255,255,0.8);
}

.amt-mood-emoji {
  font-size: 20px;
  line-height: 1;
}

.amt-mood-reaction-label {
  white-space: nowrap;
}

.amt-mood-reaction-label {
  font-size: 10px;
  color: #8b7355;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* ── Jot a Note Nudge ──────────────────────────────────────── */
.amt-jot-note-nudge {
  margin: 18px 0 0;
  animation: slideInUp 0.4s ease both;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.amt-jot-note-nudge-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fffbf5, #fef8f0);
  border: 1px solid #e8d9c6;
  border-left: 3px solid #d4a574;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.08);
}

.amt-jot-note-nudge-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.amt-jot-note-nudge-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
  color: #5f574e;
  font-weight: 500;
}

.amt-jot-note-nudge-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #6d5a42;
  background: linear-gradient(135deg, #fff, #f8f4ee);
  border: 1px solid #d4c8b8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.amt-jot-note-nudge-btn:hover {
  background: linear-gradient(135deg, #fefcf8, #f5f0e8);
  border-color: #c4b8a8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(109, 90, 66, 0.15);
}

.amt-jot-note-nudge-btn:active {
  transform: translateY(0);
}

.amt-jot-note-nudge-dismiss {
  padding: 4px;
  font-size: 20px;
  line-height: 1;
  color: #a0927f;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.amt-jot-note-nudge-dismiss:hover {
  color: #6d5a42;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Reflect Prompt ──────────────────────────────────────── */
.amt-reflect-section {
  margin-top: 16px;
  animation: fadeInUp 0.5s ease 0.3s both;
}

.amt-reflect-inner {
  background: linear-gradient(135deg, #faf8f4, #f5f2ec);
  border: 1px solid #e6e2dc;
  border-left: 3px solid #d4a574;
  border-radius: 12px;
  padding: 14px 16px;
}

.amt-reflect-label {
  font-size: 12px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
}

.amt-reflect-question {
  font-size: 14px;
  font-style: italic;
  color: #2e2a24;
  line-height: 1.6;
  margin: 0 0 10px 0;
}

.amt-reflect-toggle {
  background: transparent;
  border: 1.5px solid #d4cec6;
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 12px;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.amt-reflect-toggle:hover {
  border-color: #8b7355;
  color: #2e2a24;
  background: #faf8f4;
}

.amt-reflect-note-wrap {
  margin-top: 10px;
}

.amt-reflect-textarea {
  width: 100%;
  border: 1.5px solid #e6e2dc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #2e2a24;
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.amt-reflect-textarea:focus {
  outline: none;
  border-color: #8b7355;
}

.amt-reflect-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.amt-reflect-save-btn {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}

.amt-reflect-save-btn:disabled { opacity: 0.5; cursor: default; }

.amt-reflect-saved-msg {
  font-size: 13px;
  color: #10b981;
}

/* ── Save Insight Button ─────────────────────────────────── */
.amt-save-insight-section {
  text-align: center;
  margin-top: 8px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.amt-save-insight-btn {
  background: transparent;
  border: 1.5px solid #d4cec6;
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-save-insight-btn:hover {
  border-color: #8b7355;
  background: #faf8f4;
  color: #2e2a24;
}

.amt-save-insight-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.amt-share-intro {
  margin-bottom: 12px;
}

.amt-share-kicker {
  display: inline-block;
  margin-bottom: 4px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-share-caption {
  margin: 0;
  color: #6b665d;
  font-size: 13px;
  line-height: 1.5;
  max-width: 46ch;
  margin-inline: auto;
}

/* ── Insights Panel ────────────────────────────────────────── */
.amt-insights-panel {
  background: linear-gradient(180deg, #fffdf9 0%, #faf6ef 100%);
  border: 1.5px solid rgba(139, 115, 85, 0.18);
  border-radius: 20px;
  margin: 18px 0 20px;
  animation: fadeInUp 0.35s ease;
  box-shadow: 0 18px 44px rgba(46,42,36,0.10), inset 0 1px 0 rgba(255,255,255,0.82);
  max-height: min(72vh, 680px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.amt-insights-panel-pulse {
  box-shadow: 0 0 0 3px rgba(212,165,116,0.18), 0 10px 28px rgba(46,42,36,0.08);
}

.amt-insights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(139, 115, 85, 0.14);
  position: sticky;
  top: 0;
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(12px);
  z-index: 1;
}

.amt-insights-title {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2e2a24;
  line-height: 1.3;
}

.amt-insights-count {
  font-weight: 400;
  color: #8b7355;
  font-size: 13px;
}

.amt-insights-close-btn {
  width: 40px;
  height: 40px;
  background: #f2e6d6;
  border: 1px solid #dbc8ae;
  font-size: 18px;
  color: #5e4c36;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(46,42,36,0.08);
  z-index: 3;
}

.amt-insights-close-btn:hover {
  background: #ead9c5;
  border-color: #cdb593;
}

.amt-insights-list {
  padding: 10px 0 14px;
}

.amt-insight-item {
  margin: 12px 14px;
  padding: 16px 18px;
  border: 1px solid #efe8dd;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf9, #f8f3eb);
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.amt-insight-item:last-child { margin-bottom: 12px; }
.amt-insight-item:hover { background: #faf8f4; border-color: #e3d8ca; box-shadow: 0 8px 18px rgba(46,42,36,0.05); }

.amt-insight-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.amt-insight-theme {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(139, 115, 85, 0.1);
  color: #6d5a42;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-insight-question {
  font-size: 13px;
  font-weight: 600;
  color: #2e2a24;
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.amt-insight-answer {
  font-size: 13px;
  color: #6b665d;
  margin: 0 0 8px 0;
  line-height: 1.5;
  font-style: italic;
}

.amt-insight-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.amt-insight-date {
  font-size: 11px;
  color: #b5afa5;
  flex: 1;
}

.amt-insight-ask-btn {
  background: transparent;
  border: 1.5px solid #d4cec6;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.amt-insight-ask-btn:hover { border-color: #8b7355; color: #2e2a24; }

.amt-insight-share-btn {
  background: #fff;
  border: 1.5px solid #d4cec6;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.amt-insight-share-btn:hover {
  border-color: #2e2a24;
  color: #2e2a24;
  background: #faf8f4;
}

.amt-insight-delete-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: #9b8f82;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
  line-height: 1.2;
  transition: opacity 0.15s;
  text-decoration: underline;
}

.amt-insight-delete-btn:hover { opacity: 0.9; }

.amt-insights-empty {
  padding: 20px 16px;
  text-align: center;
  color: #8b7355;
  font-size: 14px;
}

.amt-insights-empty-hint {
  font-size: 13px;
  color: #b5afa5;
  font-style: italic;
  margin-top: 6px;
}

/* ── Streak Protection Banner ──────────────────────────────── */
.amt-streak-protect-banner {
  margin-bottom: 12px;
  animation: fadeInUp 0.4s ease;
}

.amt-streak-revival-card {
  margin-bottom: 12px;
  animation: fadeInUp 0.4s ease;
}

.amt-streak-revival-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(212, 168, 87, 0.45);
  background:
    radial-gradient(circle at top right, rgba(212,168,87,0.16), transparent 38%),
    linear-gradient(135deg, #fff8eb, #f7f1e8);
}

.amt-streak-revival-copy {
  min-width: 0;
}

.amt-streak-revival-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-streak-revival-title {
  margin: 0 0 6px;
  color: #2e2a24;
  font-size: 20px;
  line-height: 1.25;
}

.amt-streak-revival-text {
  margin: 0;
  color: #6b665d;
  font-size: 14px;
  line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-streak-revival-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.amt-streak-revival-btn {
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.amt-streak-revival-btn-primary {
  color: #fff;
  border: 1px solid #2e2a24;
  background: linear-gradient(135deg, #2e2a24, #4a433b);
}

.amt-streak-revival-btn-secondary {
  color: #7c6e5c;
  border: 1px solid #d9c8b4;
  background: rgba(255,255,255,0.72);
}

.amt-streak-revival-btn:hover {
  transform: translateY(-1px);
}

.amt-streak-protect-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fffbf0, #fff8e6);
  border: 1.5px solid #f7c948;
  border-radius: 14px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.amt-streak-protect-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.amt-streak-protect-text {
  flex: 1;
  font-size: 13px;
  color: #2e2a24;
  min-width: 180px;
  line-height: 1.4;
}

.amt-streak-protect-cta {
  background: linear-gradient(135deg, #f7c948, #e6b433);
  border: none;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1208;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}

.amt-streak-protect-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(247,201,72,0.4);
}

.amt-streak-protect-dismiss {
  background: none;
  border: none;
  font-size: 14px;
  color: #b5afa5;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Share V2 (separate actions) ─────────────────────────── */
.amt-share-section-v2 {
  margin-top: 16px;
  background: linear-gradient(135deg, #faf8f4, #f4efe7);
  border: 1px solid #e8e1d6;
  border-radius: 16px;
  padding: 14px;
}

.amt-share-helper {
  margin: 12px 0 0;
  color: #8b7355;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.amt-share-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: stretch;
  justify-content: center;
}

.amt-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 188px;
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.amt-share-btn[disabled],
.amt-share-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.68;
  filter: grayscale(0.25);
}

.amt-share-btn-primary {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border: 1px solid #2e2a24;
}

.amt-share-line {
  color: #5b5147;
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.45;
}

.amt-share-btn-secondary {
  background: #fff;
  color: #2e2a24;
  border: 1px solid #d8d0c3;
}

.amt-share-btn-secondary:hover {
  border-color: #8b7355;
  background: #faf7f2;
  color: #2e2a24;
}

/* ── About Modal ─────────────────────────────────────────── */
.amt-about-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.amt-about-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.amt-about-visible .amt-about-backdrop {
  opacity: 1;
}

.amt-about-panel {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 520px;
  background: linear-gradient(to bottom, #faf8f4, #fff);
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 32px;
  box-sizing: border-box;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  max-height: 85vh;
  overflow-y: auto;
}

.amt-about-visible .amt-about-panel {
  transform: translateX(-50%) translateY(0);
}

.amt-about-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: #f2e6d6;
  border: 1px solid #dbc8ae;
  font-size: 20px;
  color: #6d5a42;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(46,42,36,0.08);
}

.amt-about-close:hover { background: #efe5d8; border-color: #d2c1aa; color: #2e2a24; }

.amt-about-logo {
  font-size: 3rem;
  margin-bottom: 8px;
}

.amt-about-title {
  font-size: 22px;
  font-weight: 700;
  color: #2e2a24;
  margin: 0 0 6px 0;
  font-family: Georgia, serif;
}

.amt-about-tagline {
  font-size: 14px;
  color: #8b7355;
  font-style: italic;
  margin: 0 0 20px 0;
}

.amt-about-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
}

.amt-about-bullets li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0ede7;
  font-size: 14px;
  color: #2e2a24;
  line-height: 1.5;
}

.amt-about-bullets li:last-child { border-bottom: none; }

.amt-about-bullet-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.amt-about-your-stats {
  font-size: 13px;
  color: #8b7355;
  background: linear-gradient(135deg, #faf8f4, #f5f2ec);
  border: 1px solid #e6e2dc;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 18px 0;
}

.amt-about-cta {
  background: linear-gradient(135deg, #2e2a24, #3d3731);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  display: inline-block;
}

.amt-about-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(46,42,36,0.2);
}

/* ── Explore first-visit glow ──────────────────────────────── */
.amt-explore-first-visit-glow {
  animation: amtExploreGlow 2.5s ease-in-out 3;
}

@keyframes amtExploreGlow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px rgba(212,165,116,0.45), 0 4px 18px rgba(212,165,116,0.25); }
}

/* ── Icon parade fade ──────────────────────────────────────── */
.amt-icons-fade-out {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.amt-icons-fade-in {
  opacity: 1;
  transition: opacity 0.35s ease;
}

/* ── Mobile overrides for v5.0 features ────────────────────── */
@media (max-width: 480px) {
  .amt-heading-controls {
    gap: 4px;
    max-width: none;
  }

  .amt-heading-row {
    gap: 12px;
  }

  .amt-heading-subtitle {
    font-size: 14px;
    margin-left: auto;
    margin-right: auto;
    max-width: 32ch;
  }

  #ask-mirror-talk-form,
  .ask-mirror-talk-response {
    padding-left: 16px;
    padding-right: 16px;
  }

  .amt-answer-utilities {
    flex-direction: column;
    align-items: stretch;
  }

  .amt-text-size-btn,
  .amt-journal-btn,
  .amt-note-btn,
  .amt-about-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .amt-heading-controls-note {
    margin-top: 0;
    font-size: 10px;
  }

  .amt-mood-buttons {
    gap: 6px;
  }

  .amt-mood-btn {
    min-width: 50px;
    padding: 7px 8px;
  }

  .amt-mood-emoji {
    font-size: 18px;
  }

  .amt-mood-reaction-label {
    font-size: 10px;
  }

  .amt-streak-protect-inner {
    gap: 8px;
    padding: 10px 12px;
  }

  .amt-streak-protect-text {
    min-width: 0;
    font-size: 12px;
  }

  .amt-streak-revival-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .amt-streak-revival-actions {
    width: 100%;
  }

  .amt-share-toggle-row {
    flex-wrap: wrap;
  }

  .amt-journey-btn {
    font-size: 13px;
  }

  .amt-insights-panel {
    max-height: min(74vh, 560px);
    margin-left: 0;
    margin-right: 0;
  }

  .amt-about-panel {
    padding: 24px 16px 28px;
    max-height: 90vh;
  }

  .amt-about-title {
    font-size: 19px;
  }
}

/* ── My Reflection Notes Journal ──────────────────────────── */

/* journal button styled via shared .amt-text-size-btn / .amt-about-btn rules above */

.amt-journal-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.amt-journal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.amt-journal-visible .amt-journal-backdrop { opacity: 1; }

.amt-journal-panel {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 520px;
  background: linear-gradient(to bottom, #faf8f4, #fff);
  border-radius: 24px 24px 0 0;
  padding: 28px 20px 32px;
  box-sizing: border-box;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.amt-journal-visible .amt-journal-panel {
  transform: translateX(-50%) translateY(0);
}

.amt-journal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: #f2e6d6;
  border: 1px solid #dbc8ae;
  font-size: 20px;
  color: #6d5a42;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  z-index: 4;
  box-shadow: 0 4px 16px rgba(46,42,36,0.08);
}
.amt-journal-close:hover { background: #efe5d8; border-color: #d2c1aa; color: #2e2a24; }

.amt-journal-header-copy {
  max-width: 38ch;
  margin: 0 auto;
  padding: 2px 56px 0;
  min-height: 54px;
  text-align: center;
}

.amt-journal-title {
  font-size: 21px;
  font-weight: 700;
  color: #2e2a24;
  margin: 0 0 4px 0;
  font-family: Georgia, serif;
  text-align: center;
  line-height: 1.2;
}

.amt-journal-subtitle {
  font-size: 12px;
  color: #a89070;
  text-align: center;
  margin: 0 0 20px 0;
  line-height: 1.45;
}

.amt-journal-empty {
  color: #8b7355;
  font-size: 14px;
  text-align: center;
  padding: 20px 8px 8px;
  line-height: 1.6;
}

.amt-journal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.amt-journal-entry {
  background: #fdf9f4;
  border: 1px solid #e8e0d5;
  border-radius: 14px;
  padding: 14px 16px 12px;
}

.amt-journal-prompt {
  font-size: 12px;
  font-weight: 600;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.amt-journal-note {
  font-size: 15px;
  color: #2e2a24;
  line-height: 1.65;
  margin: 0 0 10px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.amt-journal-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.amt-journal-date {
  font-size: 11px;
  color: #b0a090;
}

.amt-journal-entry-actions {
  display: flex;
  gap: 6px;
}

.amt-journal-share-btn,
.amt-journal-delete-btn {
  background: transparent;
  border: 1px solid #e0d8cc;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #7a6a55;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.amt-journal-share-btn:hover { background: #f5f0e8; border-color: #c8baa8; }
.amt-journal-delete-btn:hover { background: #fff0f0; border-color: #f0b0b0; color: #c05050; }

@media (max-width: 400px) {
  .amt-journal-panel {
    padding: 24px 12px 28px;
    max-height: 90vh;
  }
  .amt-journal-header-copy {
    padding: 2px 48px 0;
  }
  .amt-journal-title { font-size: 18px; }
}

/* ── Journal inline edit ───────────────────────────────────── */

.amt-journal-edit-btn {
  background: transparent;
  border: 1px solid #e0d8cc;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #7a6a55;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.amt-journal-edit-btn:hover { background: #f5f0e8; border-color: #c8baa8; }

.amt-journal-edit-wrap {
  margin: 6px 0 10px;
}

.amt-journal-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #c8bfb0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  color: #2e2a24;
  background: #fff;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.amt-journal-edit-textarea:focus { border-color: #8b7355; }

.amt-journal-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.amt-journal-edit-save-btn {
  background: #2e2a24;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.amt-journal-edit-save-btn:hover { background: #4a4540; }

.amt-journal-edit-cancel-btn {
  background: transparent;
  border: 1px solid #e0d8cc;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: #8b7355;
  cursor: pointer;
  transition: background 0.15s;
}
.amt-journal-edit-cancel-btn:hover { background: #f5f0e8; }

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  #page,
  #content,
  .site,
  .site-content,
  .ast-container,
  .ast-article-single,
  .entry-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .ask-mirror-talk,
  #ask-mirror-talk-form,
  .ask-mirror-talk-response,
  .amt-journey-card-inner,
  .amt-weekly-recap-inner,
  .amt-continuation-strip-inner,
  .amt-question-coach-inner,
  .amt-answer-context,
  .amt-share-card-modal,
  .amt-journal-panel,
  .amt-about-panel {
    box-sizing: border-box;
    max-width: 100%;
  }

  .ask-mirror-talk {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    overflow-x: hidden;
    margin-left: auto;
    margin-right: auto;
  }

  .amt-heading-row,
  .amt-stats-bar,
  .amt-workflow-bar,
  .amt-share-actions-row,
  .amt-answer-utilities,
  .amt-mood-buttons {
    max-width: 100%;
  }

  .amt-workflow-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow-x: visible;
    padding: 5px;
    border-radius: 16px;
  }

  .amt-workflow-bar::-webkit-scrollbar {
    display: none;
  }

  .amt-workflow-step {
    min-width: 0;
    padding: 8px 3px 7px;
    border-radius: 12px;
  }

  .amt-workflow-icon {
    font-size: 17px;
  }

  .amt-workflow-label {
    font-size: clamp(9px, 2.55vw, 10.5px);
    min-height: 1.95em;
    overflow: visible;
    white-space: normal;
  }

  .amt-workflow-hint {
    font-size: clamp(7.5px, 2.1vw, 8.5px);
  }

  .amt-workflow-nudge {
    margin-top: 14px;
    margin-bottom: 18px;
    padding: 10px 12px;
    font-size: 11.5px;
  }

  .amt-workflow-nudge-actions {
    gap: 6px;
  }

  .amt-workflow-nudge-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 118px;
    padding: 8px 10px;
  }

  .amt-workflow-guide {
    max-width: calc(100vw - 44px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .amt-scm-panel,
  .amt-about-panel,
  .amt-journal-panel {
    width: min(calc(100vw - 24px), 100%);
    max-width: calc(100vw - 24px);
  }

  .amt-heading-row,
  .amt-form-intro {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .amt-heading-copy {
    text-align: center;
  }

  .amt-heading-kicker,
  .amt-heading-subtitle {
    text-align: center;
    margin-bottom: 0;
  }

  .amt-heading-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: min(100%, 252px);
    max-width: 252px;
    margin-top: 0;
    gap: 8px;
    padding: 7px 12px 8px;
    border: 1px solid rgba(139, 115, 85, 0.28);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(239,229,213,0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.88), 0 12px 26px rgba(46,42,36,0.08);
  }

  .amt-heading-controls-note {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 0;
    text-align: center;
  }

  .amt-stats-bar {
    gap: 8px;
    padding: 10px 12px;
  }

  .amt-stat {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 84px;
    justify-content: center;
  }

  .amt-badges-btn,
  .amt-insights-btn,
  .amt-notif-manage-btn {
    margin-left: 0;
    min-height: 32px;
    flex: 1 1 auto;
  }

  .amt-badges-btn {
    padding: 5px 10px;
  }

  .amt-insights-btn,
  .amt-notif-manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
    color: #fff;
    opacity: 1;
    padding: 5px 10px;
  }

  .amt-stats-prompt {
    order: 10;
    margin-top: 2px;
  }

  #ask-mirror-talk-input {
    min-height: 150px;
  }

  .amt-heading-copy,
  .amt-heading-controls,
  .amt-form-note,
  .amt-form-footer,
  .amt-question-coach,
  .amt-answer-context-copy,
  .amt-answer-context-pills,
  .amt-answer-utilities,
  .amt-reflect-inner,
  .amt-share-actions-row,
  .amt-continuation-actions,
  .amt-stats-prompt {
    min-width: 0;
    width: 100%;
  }

  .amt-heading-controls,
  .amt-form-footer,
  .amt-answer-utilities,
  .amt-share-actions-row,
  .amt-continuation-actions,
  .amt-reflect-actions {
    flex-wrap: wrap;
  }

  .amt-form-note,
  .amt-question-coach-text,
  .amt-answer-context-summary,
  .amt-answer-context-detail,
  .amt-stats-prompt-text,
  .amt-stats-prompt-subtext {
    max-width: none;
  }

  .amt-journey-card-inner,
  .amt-momentum-card-inner,
  .amt-weekly-recap-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    grid-template-columns: none;
  }

  .amt-journey-card-inner > *,
  .amt-momentum-card-inner > *,
  .amt-weekly-recap-inner > * {
    min-width: 0;
    width: 100%;
  }

  .amt-journey-actions,
  .amt-momentum-next,
  .amt-weekly-recap-actions {
    width: 100%;
    min-width: 0;
  }

  .amt-journey-btn,
  .amt-momentum-ask-btn,
  .amt-weekly-recap-btn {
    width: 100%;
    text-align: center;
  }

  .amt-journey-title,
  .amt-momentum-title,
  .amt-weekly-recap-title {
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .amt-journey-text,
  .amt-journey-quote,
  .amt-momentum-text,
  .amt-weekly-recap-text,
  .amt-weekly-recap-subtext,
  .amt-question-coach-btn-text,
  .amt-answer-context-copy,
  .amt-continuation-text,
  .amt-reflect-question,
  .amt-share-helper {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .amt-journey-quote,
  .amt-weekly-recap-quote {
    font-size: 14px;
    line-height: 1.6;
  }

  .amt-journey-card,
  .amt-momentum-card,
  .amt-weekly-recap {
    overflow: hidden;
  }

  .amt-momentum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .amt-momentum-next {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .amt-stats-bar {
    align-items: stretch;
    gap: 10px;
  }

  .amt-stat,
  .amt-badges-open-btn,
  .amt-notification-btn {
    min-width: 0;
  }

  .amt-answer-utilities > .amt-share-section,
  .amt-answer-utilities > .amt-email-section,
  .amt-answer-utilities > .amt-save-insight-section,
  .amt-share-section-v2,
  .amt-continuation-btn,
  .amt-reflect-toggle,
  .amt-reflect-save-btn {
    width: 100%;
  }

  .amt-continuation-btn,
  .amt-share-btn,
  .amt-share-progress-btn,
  .amt-reflect-toggle,
  .amt-reflect-save-btn {
    text-align: center;
    justify-content: center;
  }

  .amt-share-actions-row {
    justify-content: center;
  }

  .amt-share-btn {
    width: min(100%, 200px) !important;
    max-width: 200px;
    flex: 0 1 200px !important;
    margin-left: auto;
    margin-right: auto;
  }

  .amt-citation-trust-note,
  .amt-answer-context,
  .amt-continuation-strip-inner,
  .amt-question-coach-inner,
  .amt-reflect-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .ask-mirror-talk.amt-text-large {
    font-size: 16px !important;
    line-height: 1.75;
  }

  .ask-mirror-talk.amt-text-large #ask-mirror-talk-output,
  .ask-mirror-talk.amt-text-large .ask-mirror-talk-response,
  .ask-mirror-talk.amt-text-large .amt-qotd,
  .ask-mirror-talk.amt-text-large .amt-topics,
  .ask-mirror-talk.amt-text-large .amt-suggestions,
  .ask-mirror-talk.amt-text-large #ask-mirror-talk-input,
  .ask-mirror-talk.amt-text-large .amt-citation,
  .ask-mirror-talk.amt-text-large .amt-reflect-textarea {
    font-size: 16px !important;
    line-height: 1.75;
  }

  .ask-mirror-talk h2,
  .amt-workflow-panel-header h3,
  .amt-save-share-hub-card h3 {
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 480px) {
  .amt-heading-controls {
    justify-content: center;
  }

  .amt-suggestions-list,
  .amt-followups-list,
  .amt-continuation-actions,
  .amt-reflect-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .amt-share-actions-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .amt-insights-header {
    padding: 12px 14px;
  }

  .amt-insight-item {
    margin: 10px 10px;
    padding: 14px;
  }

  .amt-insight-meta {
    align-items: stretch;
  }

  .amt-insight-ask-btn,
  .amt-insight-share-btn {
    flex: 1 1 auto;
    min-height: 34px;
  }

  .amt-suggestion-btn,
  .amt-followup-btn,
  .amt-continuation-btn,
  .amt-share-progress-btn,
  .amt-journal-share-btn,
  .amt-journal-delete-btn,
  .amt-journal-edit-btn {
    width: 100%;
    max-width: 100%;
    text-align: center;
    justify-content: center;
  }

  .amt-share-btn {
    width: auto !important;
    max-width: none;
    min-width: 142px;
    flex: 0 0 auto !important;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 999px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .amt-stats-bar {
    padding: 10px 12px;
  }

  .amt-stats-prompt {
    gap: 6px;
  }

  .amt-journey-card-inner,
  .amt-momentum-card-inner,
  .amt-weekly-recap-inner,
  .amt-continuation-strip-inner,
  .amt-answer-context,
  .amt-question-coach-inner,
  .amt-reflect-inner {
    padding: 14px;
    border-radius: 14px;
  }

  .amt-journey-title,
  .amt-momentum-title,
  .amt-weekly-recap-title {
    font-size: 17px;
  }

  .amt-journal-entry-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .amt-journal-entry-actions {
    width: 100%;
    flex-direction: column;
  }
}

/* ========================================
   Mobile Premium Rebalance
   Keep the PWA compact, calm, and proportional after the workflow refactor.
   ======================================== */
@media (max-width: 640px) {
  .ask-mirror-talk {
    width: min(100%, calc(100vw - 18px));
    max-width: calc(100vw - 18px);
    margin: 8px auto 18px;
    padding: 14px 12px 18px;
    border-radius: 18px;
  }

  .amt-heading-row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .amt-heading-kicker {
    font-size: 9px;
    letter-spacing: 0.13em;
  }

  .ask-mirror-talk h2,
  .amt-heading-row h2 {
    font-size: clamp(19px, 6vw, 22px);
    line-height: 1.08;
  }

  .amt-heading-subtitle {
    max-width: 30ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 12.5px;
    line-height: 1.35;
  }

  .amt-heading-controls {
    width: min(100%, 224px);
    max-width: 224px;
    gap: 5px;
    padding: 6px 9px 7px;
    border-radius: 16px;
  }

  .amt-text-size-btn,
  .amt-journal-btn,
  .amt-note-btn,
  .amt-about-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 12px;
  }

  .amt-journal-btn,
  .amt-note-btn,
  .amt-about-btn {
    font-size: 15px;
  }

  .amt-heading-controls-note {
    font-size: 9.5px;
    line-height: 1.25;
  }

  .amt-stats-bar {
    gap: 6px;
    margin: 10px 0 8px;
    padding: 8px;
    border-radius: 16px;
  }

  .amt-stat,
  .amt-stat-action-btn,
  .amt-badges-btn,
  .amt-insights-btn,
  .amt-notif-manage-btn {
    min-height: 30px;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 11px;
  }

  .amt-stat-icon {
    font-size: 14px;
  }

  .amt-stat-value {
    font-size: 13px;
  }

  .amt-stat-label,
  .amt-stat-action-label {
    font-size: 9.5px;
  }

  .amt-workflow-bar {
    gap: 4px;
    margin: 22px 0 12px;
    padding: 5px;
    border-radius: 16px;
  }

  .amt-workflow-guide {
    top: -17px;
    font-size: 7.5px;
    letter-spacing: 0.09em;
  }

  .amt-workflow-step {
    gap: 2px;
    padding: 7px 3px 6px;
    border-radius: 12px;
  }

  .amt-workflow-icon {
    font-size: 15px;
  }

  .amt-workflow-label {
    min-height: 0;
    font-size: clamp(8.5px, 2.35vw, 10px);
    line-height: 1.05;
  }

  .amt-workflow-hint {
    font-size: clamp(7px, 1.95vw, 8px);
    line-height: 1.05;
  }

  .amt-workflow-panel-header,
  .amt-save-share-hub-card {
    margin-bottom: 10px;
    padding: 13px 14px;
    border-radius: 16px;
  }

  .amt-workflow-panel-kicker,
  .amt-save-share-kicker,
  .amt-momentum-kicker,
  .amt-weekly-recap-kicker,
  .amt-journey-kicker,
  .amt-continuation-kicker {
    font-size: 9.5px;
    letter-spacing: 0.1em;
  }

  .amt-workflow-panel-header h3,
  .amt-save-share-hub-card h3 {
    font-size: 12.5px;
    line-height: 1.25;
  }

  .amt-workflow-panel-header p,
  .amt-save-share-hub-card p {
    font-size: 12.5px;
    line-height: 1.45;
  }

  #ask-mirror-talk-form {
    margin-top: 8px;
    padding: 12px;
    border-radius: 16px;
  }

  .amt-form-intro {
    gap: 4px;
    margin-bottom: 6px;
  }

  .amt-form-kicker {
    font-size: 9.5px;
  }

  .ask-mirror-talk label {
    font-size: 12.5px;
  }

  #ask-mirror-talk-input {
    min-height: 104px;
    margin: 6px 0 10px;
    padding: 11px 12px;
    border-width: 1px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.45;
  }

  .ask-mirror-talk button[type="submit"] {
    width: min(100%, 260px);
    margin-top: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 14px;
  }

  .ask-mirror-talk-response {
    padding: 14px 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.7;
  }

  #ask-mirror-talk-output,
  #ask-mirror-talk-output p,
  #ask-mirror-talk-output li {
    font-size: 14px;
    line-height: 1.72;
  }

  .amt-continuation-strip-inner,
  .amt-question-coach-inner,
  .amt-reflect-inner,
  .amt-answer-context,
  .amt-momentum-card-inner,
  .amt-weekly-recap-inner,
  .amt-journey-card-inner,
  .amt-insight-item {
    padding: 12px;
    border-radius: 15px;
  }

  .amt-continuation-strip,
  .amt-followups,
  .amt-qotd,
  .amt-explore-expander,
  .amt-reflect-section,
  .amt-answer-utilities,
  .amt-insights-panel,
  .amt-momentum-card,
  .amt-weekly-recap,
  .amt-badge-shelf,
  .amt-streak-protect-banner,
  .amt-streak-revival-card {
    margin-top: 10px;
  }

  .amt-momentum-title,
  .amt-weekly-recap-title,
  .amt-journey-title {
    font-size: clamp(16px, 4.7vw, 18px);
    line-height: 1.22;
  }

  .amt-momentum-text,
  .amt-weekly-recap-text,
  .amt-weekly-recap-subtext,
  .amt-journey-text,
  .amt-continuation-text,
  .amt-reflect-question,
  .amt-question-coach-text {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .amt-followup-btn,
  .amt-suggestion-btn,
  .amt-topic-starter-btn,
  .amt-continuation-btn,
  .amt-momentum-ask-btn,
  .amt-weekly-recap-btn,
  .amt-save-share-hub-btn,
  .amt-share-btn,
  .amt-reflect-toggle,
  .amt-reflect-save-btn {
    min-height: 36px;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.25;
  }

  .amt-workflow-nudge {
    margin: 12px auto 12px;
    padding: 9px 10px;
    border-radius: 16px;
    font-size: 11px;
    line-height: 1.35;
  }

  .amt-workflow-nudge-text {
    margin-bottom: 7px;
  }

  .amt-workflow-nudge-btn {
    min-width: 104px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .amt-jot-note-nudge-content {
    gap: 8px;
    padding: 10px 11px;
  }

  .amt-jot-note-nudge-icon {
    font-size: 18px;
  }

  .amt-jot-note-nudge-text {
    font-size: 12px;
  }

  .amt-jot-note-nudge-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .ask-mirror-talk {
    width: min(100%, calc(100vw - 12px));
    max-width: calc(100vw - 12px);
    padding-left: 9px;
    padding-right: 9px;
  }

  .amt-workflow-label {
    font-size: 8.5px;
  }

  .amt-workflow-hint {
    display: none;
  }

  .amt-heading-controls {
    max-width: 212px;
  }
}
