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

@font-face {
  font-family: 'Cooper';
  src: url('cooperl.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #e2d0dc 0%, #f2d8c2 25%, #c8e4f0 50%, #eeddd0 75%, #dcd0e8 100%);
  position: relative;
  transition: background 0.8s ease;
}

body.chat-active {
  background: linear-gradient(135deg, #f5f2f3 0%, #f7f5f3 25%, #f4f6f7 50%, #f7f5f4 75%, #f5f3f5 100%);
}

.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

@media (min-width: 601px) {
  .container {
    max-width: 800px;
  }
}

.start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  min-height: calc(100vh - 180px);
}

.start-screen img.max-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  animation: slideDownIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: transform 0.3s ease;
}

.start-screen img.max-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

@media (min-width: 601px) {
  .start-screen img.max-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 28px;
  }
}


.dog-cycle-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
}

.dog-cycle-wrap img.dog-cycle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: dogCycleFade 18s infinite, dogBreath 7s ease-in-out infinite;
}

.dog-cycle-wrap img.dog-cycle:nth-child(1) { animation-delay: 0s; }
.dog-cycle-wrap img.dog-cycle:nth-child(2) { animation-delay: 6s; }
.dog-cycle-wrap img.dog-cycle:nth-child(3) { animation-delay: 12s; }

@keyframes dogCycleFade {
  0%, 100% { opacity: 0; }
  4%, 30% { opacity: 1; }
  34% { opacity: 0; }
}

@keyframes dogBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.dynamic-title {
  font-family: 'Cooper LT Std', 'Cooper', Georgia, serif;
  font-size: 32px;
  font-weight: 300;
  color: #002121;
  margin-bottom: 20px;
  text-align: center;
  animation: slideDownIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
  transition: opacity 0.9s ease;
}

body.theme-london .dynamic-title.nudge-glow {
  animation: nudgeGlow 4s ease forwards;
}

@keyframes nudgeGlow {
  0% { text-shadow: 0 0 0px rgba(255, 255, 240, 0); }
  25% { text-shadow: 0 0 8px rgba(255, 255, 240, 0.5), 0 0 18px rgba(255, 255, 235, 0.25); }
  50% { text-shadow: 0 0 10px rgba(255, 255, 240, 0.4), 0 0 22px rgba(255, 255, 235, 0.2); }
  100% { text-shadow: 0 0 0px rgba(255, 255, 240, 0); }
}
}

@media (min-width: 601px) {
  .dynamic-title {
    font-size: 38px;
    margin-bottom: 28px;
  }
}

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

.start-screen img.features {
  max-width: 100%;
  width: 620px;
  animation: slideUpIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@media (min-width: 601px) {
  .start-screen img.features {
    width: 720px;
  }
}

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

.start-screen img.features.mobile { display: none; }
.start-screen img.features.desktop { display: block; }

@media (max-width: 600px) {
  .start-screen img.features.mobile { display: block; width: 100%; }
  .start-screen img.features.desktop { display: none; }
  .dog-cycle-wrap { width: 60px; height: 60px; }
  .dynamic-title { font-size: 24px; margin-bottom: 14px; }
  .start-screen { min-height: auto; justify-content: flex-start; padding-top: 48px; }
}

.chat-area {
  padding: 20px 16px;
  padding-bottom: 300px;
  display: none;
}

.chat-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 0 30px 0;
  text-align: left;
  animation: fadeInUp 0.5s ease;
}

.chat-start img {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.chat-start-title {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.65);
  margin: 0 0 4px 0;
}

.chat-start-sub {
  font-size: 12px;
  color: rgba(0, 33, 33, 0.45);
  margin: 0;
}

.chat-start-disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin: 8px 0 0 0;
}

.chat-start-disclaimer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
}

.message { margin-bottom: 20px; }

.user-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-bubble {
  background: #002121;
  color: white;
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 80%;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.user-bubble .feature-tag {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.bot-msg {
  color: #002121;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Cooper', Georgia, serif;
}

.bot-msg p {
  margin-bottom: 4px;
}

.bot-msg p:last-child {
  margin-bottom: 0;
}

.bot-msg a {
  color: #002121;
  text-decoration: underline;
}

.bot-msg a:hover {
  opacity: 0.7;
}

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

.bot-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  animation: fadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.bot-footer img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.bot-footer img:hover {
  transform: rotate(10deg) scale(1.1);
}

.actions { display: flex; gap: 2px; align-items: center; position: relative; }

.action-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 33, 33, 0.3);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 20px;
}

.action-btn:hover:not(.disabled) {
  color: rgba(0, 33, 33, 0.6);
  background: rgba(0, 33, 33, 0.05);
  transform: scale(1.15);
}

.action-btn:active:not(.disabled) { transform: scale(0.85); }
.action-btn.active { color: #002121; }
.action-btn.disabled { opacity: 0.2; pointer-events: none; }

.sources-wrapper {
  position: relative;
  display: inline-block;
}

.sources-btn {
  background: transparent;
  border: 1px solid rgba(0, 33, 33, 0.25);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  color: rgba(0, 33, 33, 0.5);
  font-family: Helvetica, Arial, sans-serif;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-left: 4px;
}

.sources-btn:hover {
  background: transparent;
  border-color: rgba(0, 33, 33, 0.4);
  color: rgba(0, 33, 33, 0.7);
}

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

.sources-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 33, 33, 0.12), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  padding: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
}

.sources-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sources-dropdown.dropdown-down {
  bottom: auto;
  top: calc(100% + 8px);
}

.sources-dropdown-title {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.5);
  margin-bottom: 10px;
}

.sources-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-item {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  text-decoration: none;
  color: #002121;
  font-size: 12px;
  line-height: 1.4;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 33, 33, 0.15);
}

.source-item:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 33, 33, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 33, 33, 0.06), 0 0 12px rgba(0, 33, 33, 0.06), inset 0 0 8px rgba(255, 255, 255, 0.5);
  animation: edgePulse 2.5s ease-in-out infinite;
}

@keyframes edgePulse {
  0% { box-shadow: 0 0 0 1px rgba(0, 33, 33, 0.06), 0 0 8px rgba(0, 33, 33, 0.04), inset 0 0 6px rgba(255, 255, 255, 0.3); }
  50% { box-shadow: 0 0 0 1px rgba(0, 33, 33, 0.1), 0 0 16px rgba(0, 33, 33, 0.08), inset 0 0 12px rgba(255, 255, 255, 0.6); }
  100% { box-shadow: 0 0 0 1px rgba(0, 33, 33, 0.06), 0 0 8px rgba(0, 33, 33, 0.04), inset 0 0 6px rgba(255, 255, 255, 0.3); }
}

.source-item-type {
  display: none;
}

.thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  animation: fadeInUp 0.3s ease;
}

.thinking img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  animation: thinking-bounce 1s ease-in-out infinite;
}

@keyframes thinking-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.thinking span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.input-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px;
  padding-bottom: 20px;
}

.input-container {
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 601px) {
  .input-container {
    max-width: 800px;
  }
}

.input-box {
  background: #002121;
  position: relative;
  border-radius: 24px;
  padding: 16px 14px 12px 14px;
  border: 1px solid rgba(255,255,255,0.1);
}

.input-alert {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,140,0,0.08) 0%, rgba(255,140,0,0.04) 50%, rgba(255,140,0,0.06) 100%);
  backdrop-filter: blur(20px);
  border-radius: 50px;
  border: 1.5px dashed rgba(255, 140, 0, 0.6);
}

.input-alert.show { display: flex; }

.input-alert-icon {
  color: #ff8c00;
  flex-shrink: 0;
}

.input-alert-text {
  color: #ff8c00;
  font-size: 12px;
  line-height: 1.4;
}

.message-limit-warning {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.message-limit-warning .limit-share-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}
.message-limit-warning.show { display: flex; margin-bottom: 14px; }

.message-limit-warning svg {
  stroke: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.input-box textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #ffffff;
  outline: none;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 18px;
  resize: none;
  overflow: hidden;
  min-height: 22px;
  max-height: 120px;
  line-height: 1.4;
}

.input-box textarea::placeholder { color: rgba(255,255,255,0.5); }

.input-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feature-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.feature-btn {
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(60px) saturate(180%);
  -webkit-backdrop-filter: blur(60px) saturate(180%);
  box-shadow:
    inset 0 0.5px 0 0 rgba(255,255,255,0.15),
    0 1px 2px rgba(0,0,0,0.06);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-family: Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.feature-btn:hover:not(.disabled):not(.active) {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 0.5px 0 0 rgba(255,255,255,0.45),
    0 2px 8px rgba(0,0,0,0.1);
  color: rgba(255, 255, 255, 0.95);
}

.feature-btn:active:not(.disabled) { transform: scale(0.95); }

.feature-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 0.5px 0 0 rgba(255,255,255,0.15),
    0 1px 2px rgba(0,0,0,0.06);
}

.feature-btn.disabled { opacity: 0.25; pointer-events: none; }
.feature-btn.hidden { display: none; }
.feature-btn .icon { font-size: 12px; }

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(60px) saturate(180%);
  -webkit-backdrop-filter: blur(60px) saturate(180%);
  box-shadow:
    inset 0 0.5px 0 0 rgba(255,255,255,0.15),
    0 1px 2px rgba(0,0,0,0.06);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.send-btn.active {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 0 rgba(255,255,255,1),
    0 2px 10px rgba(0,0,0,0.08);
  cursor: pointer;
}

.send-btn:hover.active {
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 0 rgba(255,255,255,1),
    0 4px 16px rgba(0,0,0,0.12);
}
.send-btn:hover.active svg { transform: scale(1.15); }
.send-btn:active.active { transform: scale(0.9); }

@keyframes send-burst {
  0% { transform: scale(1); }
  20% { transform: scale(0.82); }
  50% { transform: scale(1.1); box-shadow: inset 0 1px 0 0 rgba(255,255,255,1), 0 0 30px rgba(255,255,255,0.4); }
  100% { transform: scale(1); box-shadow: inset 0 1px 0 0 rgba(255,255,255,1), 0 2px 10px rgba(0,0,0,0.08); }
}

.send-btn.sending {
  animation: send-burst 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.send-btn svg { transition: transform 0.25s ease; }
.send-btn svg path { stroke: rgba(255, 255, 255, 0.35); transition: stroke 0.2s ease; }
.send-btn.active svg path { stroke: #002121; }

.input-content { display: block; }
.input-content.hidden { display: none; }

.chat-ended {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  text-align: center;
  background: #002121;
  border-radius: 24px;
  margin: 0;
}

.chat-ended.show { display: flex; }

.chat-ended .restart-btn {
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.12) 100%);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0.5px 0 0 rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  color: white;
  font-size: 14px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 500;
}

.chat-ended .restart-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.2) 100%);
  transform: scale(1.05);
  box-shadow: inset 0 0.5px 0 0 rgba(255,255,255,0.4), 0 4px 16px rgba(0,0,0,0.2);
}

.chat-ended .restart-btn svg { stroke: white; }

.chat-ended p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.5;
  max-width: 320px;
  margin: 0;
}

.disclaimer {
  text-align: center;
  font-size: 9px;
  color: rgba(0, 33, 33, 0.45);
  margin-top: 8px;
}

.disclaimer a { color: rgba(0, 33, 33, 0.45); text-decoration: underline; }

@media (max-width: 480px) {
  .feature-btn { padding: 5px 10px; font-size: 11px; }
  .feature-btn .icon { font-size: 10px; }
  .sources-dropdown {
    min-width: 240px;
    max-width: 280px;
  }
}
/* Memory overlay */
.memory-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.memory-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Memory popup */
.memory-popup {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 48px rgba(0, 33, 33, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 380px;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.memory-overlay.show .memory-popup {
  transform: translateY(0) scale(1);
}

/* Close button - top right prominent */
.memory-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 33, 33, 0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: #002121;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 1;
}
.memory-popup-close:hover {
  background: rgba(0, 33, 33, 0.18);
}

/* Popup header */
.memory-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-right: 32px;
}
.memory-popup-icon svg { color: #002121; flex-shrink: 0; }
.memory-popup-title {
  font-family: 'Cooper', Georgia, serif;
  font-size: 20px;
  color: #002121;
  margin: 0;
}

/* Toggle row */
.memory-popup-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.memory-popup-toggle-label {
  font-size: 11px;
  color: rgba(0, 33, 33, 0.7);
  line-height: 1.5;
  font-family: 'Cooper', Georgia, serif;
  flex-grow: 1;
}
.memory-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.memory-toggle input { opacity: 0; width: 0; height: 0; }
.memory-toggle-slider {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #b0b0b0;
  border-radius: 24px;
  overflow: hidden;
  transition: background 0.3s ease;
}
.memory-toggle-slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.memory-toggle input:checked + .memory-toggle-slider { background: #002121; }
.memory-toggle input:checked + .memory-toggle-slider:before { transform: translateX(20px); }
.memory-popup-summary-section {
  background: rgba(0, 33, 33, 0.04);
  border-radius: 12px;
  padding: 16px;
}
.memory-popup-summary-label {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0.5px;
  color: rgba(0, 33, 33, 0.4);
  margin-bottom: 8px;
  font-family: 'Cooper', Georgia, serif;
}
.memory-popup-summary-text {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.7);
  line-height: 1.5;
  font-family: 'Cooper', Georgia, serif;
  margin-bottom: 14px;
}

/* Add memory row */
.memory-popup-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.memory-popup-add-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 33, 33, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-family: 'Cooper', Georgia, serif;
  color: #002121;
  outline: none;
  transition: border-color 0.2s ease;
}
.memory-popup-add-input::placeholder { color: rgba(0, 33, 33, 0.35); }
.memory-popup-add-input:focus { border-color: rgba(0, 33, 33, 0.4); }
.memory-popup-add-btn {
  background: #002121;
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 12px;
  font-family: 'Cooper', Georgia, serif;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-popup-add-btn:hover { background: rgba(0, 33, 33, 0.85); }

/* Remove btn */
.memory-popup-remove-btn {
  background: none;
  border: 1px solid rgba(0, 33, 33, 0.2);
  color: rgba(0, 33, 33, 0.6);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Cooper', Georgia, serif;
  transition: all 0.2s ease;
  width: 100%;
}
.memory-popup-remove-btn:hover {
  background: rgba(0, 33, 33, 0.06);
  color: #002121;
  border-color: rgba(0, 33, 33, 0.35);
}

/* Note text */
.memory-popup-note {
  font-size: 8px;
  color: rgba(0, 33, 33, 0.35);
  font-family: 'Cooper', Georgia, serif;
  margin: 16px 0 0;
  line-height: 1.4;
  text-align: center;
}

/* Memory footer button */







/* Privacy lock */
.memory-privacy-lock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(0, 33, 33, 0.4);
  font-family: 'Cooper', Georgia, serif;
  margin-bottom: 18px;
}
.memory-privacy-lock svg { color: rgba(0, 33, 33, 0.4); flex-shrink: 0; }

/* Confirm overlay */
.memory-confirm-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}
.memory-confirm-box {
  text-align: center;
}
.memory-confirm-title {
  font-family: 'Cooper', Georgia, serif;
  font-size: 17px;
  color: #002121;
  margin: 0 0 10px;
}
.memory-confirm-text {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.7);
  font-family: 'Cooper', Georgia, serif;
  line-height: 1.5;
  margin: 0 0 8px;
}
.memory-confirm-warning {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.4);
  font-family: 'Cooper', Georgia, serif;
  margin: 0 0 18px;
}
.memory-confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.memory-confirm-cancel {
  background: #002121;
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Cooper', Georgia, serif;
  transition: background 0.2s ease;
}
.memory-confirm-cancel:hover { background: rgba(0, 33, 33, 0.85); }
.memory-confirm-yes {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(0, 33, 33, 0.12) 40%, rgba(0, 33, 33, 0.18) 60%, rgba(255, 255, 255, 0.2) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 0 rgba(0, 33, 33, 0.08), 0 4px 12px rgba(0, 33, 33, 0.12);
  color: #002121;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Cooper', Georgia, serif;
  transition: all 0.2s ease;
}
.memory-confirm-yes:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(0, 33, 33, 0.15) 40%, rgba(0, 33, 33, 0.22) 60%, rgba(255, 255, 255, 0.25) 100%);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 0 rgba(0, 33, 33, 0.1), 0 6px 16px rgba(0, 33, 33, 0.18);
}

/* Deactivated state */
.memory-deactivated {
  text-align: center;
  padding: 10px 0;
}
.memory-deactivated-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.memory-deactivated-title {
  font-family: 'Cooper', Georgia, serif;
  font-size: 15px;
  color: #002121;
  margin: 0 0 6px;
}
.memory-deactivated-text {
  font-size: 12px;
  color: rgba(0, 33, 33, 0.5);
  font-family: 'Cooper', Georgia, serif;
  margin: 0 0 16px;
}
.memory-reactivate-btn {
  background: #002121;
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 13px;
  font-family: 'Cooper', Georgia, serif;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-reactivate-btn:hover { background: rgba(0, 33, 33, 0.85); }

/* Memory progress bar */
.memory-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.memory-progress-bar {
  flex-grow: 1;
  height: 4px;
  background: rgba(0, 33, 33, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.memory-progress-fill {
  height: 100%;
  width: 0%;
  background: #002121;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.memory-progress-text {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.4);
  font-family: 'Cooper', Georgia, serif;
  flex-shrink: 0;
  width: 32px;
  text-align: right;
}

/* Memory items list */
.memory-items-list {
  margin-bottom: 14px;
}
.memory-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 33, 33, 0.06);
}
.memory-item:last-child { border-bottom: none; }
.memory-item-text {
  flex-grow: 1;
  font-size: 12px;
  color: rgba(0, 33, 33, 0.7);
  font-family: 'Cooper', Georgia, serif;
  line-height: 1.4;
  border: 1px solid rgba(255,255,255,0.1);
  background: none;
  outline: none;
  resize: none;
  padding: 4px 6px;
  border-radius: 6px;
  width: 100%;
  transition: background 0.2s ease;
}
.memory-item-text:focus {
  background: rgba(0, 33, 33, 0.04);
}
.memory-item-remove {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(0, 33, 33, 0.25);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}
.memory-item-remove:hover {
  color: rgba(0, 33, 33, 0.6);
  background: rgba(0, 33, 33, 0.06);
}

.memory-item-empty {
  font-size: 12px;
  color: rgba(0, 33, 33, 0.35);
  font-family: 'Cooper', Georgia, serif;
  padding: 6px 0;
}

/* Memory bulb button */
.mem-bulb-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(0, 33, 33, 0.4);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}
.mem-bulb-btn:hover {
  color: #002121;
  background: rgba(0, 33, 33, 0.06);
}

/* Memory bulb popup */
#memBulbPopup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}
.mem-bulb-popup-inner {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 48px rgba(0, 33, 33, 0.18);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 340px;
  text-align: center;
}
.mem-bulb-popup-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: #002121;
}
.mem-bulb-popup-title {
  font-family: "Cooper LT Std", "Cooper", Georgia, serif;
  font-size: 18px;
  font-weight: 300;
  color: #002121;
  margin-bottom: 6px;
}
.mem-bulb-popup-desc {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.5);
  line-height: 1.4;
  margin-bottom: 18px;
}
.mem-bulb-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 33, 33, 0.08);
  border: 1px solid rgba(255,255,255,0.1);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  color: #002121;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mem-bulb-popup-close:hover {
  background: rgba(0, 33, 33, 0.14);
}
.mem-bulb-popup-inner { position: relative; }
.mem-bulb-items {
  background: rgba(0, 33, 33, 0.04);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}
.mem-bulb-item {
  font-size: 13px;
  color: #002121;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 33, 33, 0.07);
}
.mem-bulb-item:last-child {
  border-bottom: none;
}
.mem-bulb-loading,
.mem-bulb-empty {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.45);
  padding: 10px 0;
}
.mem-bulb-privacy {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.38);
  margin-top: 14px;
  text-align: center;
}

/* One-time Magic Memory usage alert */
.memory-used-alert {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.15) 100%);
  backdrop-filter: blur(20px);
  color: rgba(0, 33, 33, 0.5);
  font-size: 9px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  z-index: 9999;
  animation: memory-alert-in 0.3s ease-out;
  cursor: pointer;
}

.memory-used-alert:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.22) 100%);
  color: rgba(255, 255, 255, 0.85);
}

@keyframes memory-alert-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === Magic Memory UI Upgrade === */

/* Character warning */
.memory-char-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-top: 8px;
  font-size: 10px;
  color: #002121;
  font-family: 'Cooper', Georgia, serif;
  line-height: 1.3;
}
.memory-char-warning svg { flex-shrink: 0; }

/* Limit exceeded overlay */
.memory-limit-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 33, 33, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}
.memory-limit-overlay { cursor: pointer; }
.memory-limit-overlay .memory-limit-msg::after { content: '\A\ATap to dismiss'; white-space: pre; font-size: 10px; color: rgba(0, 33, 33, 0.35); }
.memory-limit-msg {
  font-family: 'Cooper', Georgia, serif;
  font-size: 13px;
  color: #002121;
  text-align: center;
  line-height: 1.5;
}

/* Add button error state */
.memory-popup-add-btn.memory-add-error {
  background: rgba(160, 30, 30, 0.85);
  transition: background 0.2s ease;
}

/* Delete button text override */
.memory-item .memory-item-remove {
  font-size: 10px;
  padding: 2px 8px;
  font-family: 'Cooper', Georgia, serif;
}

/* Archive button */
.memory-archive-btn {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  width: 100%;
  background: none;
  border: 1px solid rgba(0, 33, 33, 0.1);
  color: rgba(0, 33, 33, 0.45);
  font-size: 13px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Cooper', Georgia, serif;
  transition: all 0.2s ease;
  margin-top: 10px;
  text-align: center;
}
.memory-archive-btn:hover {
  border-color: rgba(0, 33, 33, 0.25);
  color: rgba(0, 33, 33, 0.7);
}

/* Archive section */
.memory-archive-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 33, 33, 0.06);
}
.memory-archive-label {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0.5px;
  color: rgba(0, 33, 33, 0.35);
  margin-bottom: 8px;
  font-family: 'Cooper', Georgia, serif;
}
.memory-archive-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 33, 33, 0.04);
}
.memory-archive-item:last-child { border-bottom: none; }
.memory-archive-item-text {
  flex-grow: 1;
  font-size: 13px;
  color: rgba(0, 33, 33, 0.5);
  font-family: 'Cooper', Georgia, serif;
  line-height: 1.4;
}
.memory-archive-restore {
  background: none;
  border: 1px solid rgba(0, 33, 33, 0.12);
  color: rgba(0, 33, 33, 0.45);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Cooper', Georgia, serif;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.memory-archive-restore:hover {
  border-color: rgba(0, 33, 33, 0.3);
  color: #002121;
}
.memory-archive-remove {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(0, 33, 33, 0.2);
  font-size: 10px;
  padding: 3px 6px;
  cursor: pointer;
  font-family: 'Cooper', Georgia, serif;
  transition: color 0.2s ease;
  flex-shrink: 0;
}
.memory-archive-remove:hover {
  color: rgba(0, 33, 33, 0.6);
}
/* === Memory UI v2 styles === */

/* Archive popup overlay */
.memory-archive-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  padding: 20px;
  overflow-y: auto;
}
.memory-archive-popup {
  width: 100%;
  max-height: 80%;
  overflow-y: auto;
}
.memory-archive-desc {
  font-size: 12px;
  color: rgba(0, 33, 33, 0.5);
  font-family: 'Cooper', Georgia, serif;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Error popup overlay */
.memory-error-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  padding: 20px;
}
.memory-error-box {
  text-align: center;
}
.memory-error-icon {
  margin-bottom: 12px;
}
.memory-error-title {
  font-family: 'Cooper', Georgia, serif;
  font-size: 16px;
  color: #002121;
  margin: 0 0 8px;
}
.memory-error-text {
  font-size: 12px;
  color: rgba(0, 33, 33, 0.6);
  font-family: 'Cooper', Georgia, serif;
  line-height: 1.5;
  margin: 0 0 16px;
}
.memory-error-dismiss {
  background: #002121;
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 8px 24px;
  font-size: 13px;
  font-family: 'Cooper', Georgia, serif;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-error-dismiss:hover { background: rgba(0, 33, 33, 0.85); }

/* Deactivated SVG icon */
.memory-deactivated-icon svg {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  margin: 0 auto;
}
/* Memory tag on user messages */
.memory-tag {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.memory-tag-hint {
  font-size: 9px;
  color: rgba(255,255,255,0.15);
  font-style: italic;
}

/* Desktop horizontal layout for Magic Memory */
@media (min-width: 768px) {
  .memory-popup {
    max-width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
  }
  .memory-popup-close {
    position: absolute;
    right: 16px;
    top: 16px;
  }
  .memory-popup-left {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .memory-popup-right {
    flex: 1.3;
    min-width: 260px;
    border-left: 1px solid rgba(0, 33, 33, 0.08);
    padding-left: 28px;
  }
  .memory-popup-summary-section {
    margin-top: 0 !important;
  }
}

/* Add button disabled/greyed state */
.memory-popup-add-btn.memory-add-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* Char limit exceeded state (red tint) */
.memory-char-warning.memory-char-limit {
  color: rgba(160, 30, 30, 0.8);
}
.memory-char-warning.memory-char-limit svg {
  stroke: rgba(160, 30, 30, 0.8);
}

/* Archive limit notice */
.memory-archive-limit-notice {
  font-size: 10px;
  color: rgba(0, 33, 33, 0.4);
  text-align: center;
  margin-top: 10px;
  font-family: 'Cooper', Georgia, serif;
}

/* Archive popup horizontal layout for desktop */
@media (min-width: 768px) {
  .memory-archive-popup {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
    max-width: 700px;
  }
  .memory-archive-popup .memory-popup-close {
    position: absolute;
    right: 16px;
    top: 16px;
  }
  .memory-archive-left {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .memory-archive-right {
    flex: 1.3;
    min-width: 260px;
    border-left: 1px solid rgba(0, 33, 33, 0.08);
    padding-left: 28px;
  }
}

/* Mobile: stack archive vertically */
@media (max-width: 767px) {
  .memory-archive-left,
  .memory-archive-right {
    width: 100%;
  }
}

/* Center deactivated state in right panel */
.memory-deactivated {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
}

/* Confirm dialog warning icon */
.memory-confirm-warning-icon {
  text-align: center;
  margin-bottom: 12px;
  opacity: 0.7;
}

/* Footer memory link on start page */
.memory-footer-link {
  cursor: pointer;
  color: rgba(0, 33, 33, 0.5);
  font-size: 9px;
  font-family: 'Cooper', Georgia, serif;
  transition: color 0.2s ease;
}
.memory-footer-link:hover {
  color: #002121;
}
/* Hide footer link when chat is active */
.chat-active .memory-footer-link {
  display: none !important;
}

/* Pill fade in */


/* Memory input bar button */
.memory-input-btn {
  cursor: pointer;
  gap: 4px !important;
  order: 99;
}
.memory-input-btn.active {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.6) !important;
}
.memory-input-btn.answering svg {
  animation: memory-icon-spin 1.5s linear infinite;
}
@keyframes memory-icon-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.mem-btn-text-short { display: none; }
.mem-btn-text-full { display: inline; }
@media (max-width: 480px) {
  .mem-btn-text-short { display: inline; }
  .mem-btn-text-full { display: none; }
}

/* Keyboard shortcut hints in memory popup */
.memory-shortcuts-section {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.memory-shortcut-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.memory-shortcut-keys {
  display: flex;
  gap: 4px;
}
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 3px 8px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(0, 33, 33, 0.5);
  font-size: 11px;
  font-family: -apple-system, system-ui, sans-serif;
  box-shadow: 0 2px 0 #0a0a0a, inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
}
.memory-shortcut-label {
  color: rgba(0, 33, 33, 0.4);
  font-size: 10px;
  font-family: Helvetica, Arial, sans-serif;
}
/* Make left panel flex column so shortcuts stick to bottom */
.memory-popup-left {
  display: flex !important;
  flex-direction: column !important;
}
@media (max-width: 1024px) {
  .memory-shortcuts-section { display: none; }
}

.memory-archive-left {
  display: flex !important;
  flex-direction: column !important;
}

/* === SAFETY STOP SYSTEM === */
.safety-stop-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  margin: 12px 0;
  background: rgba(0, 33, 33, 0.95);
  border-radius: 28px;
  animation: ss-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.safety-stop-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 50%);
  border-radius: 24px;
  pointer-events: none;
}
@keyframes ss-slide-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ss-banner-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
  flex-shrink: 0;
}
.ss-banner-icon svg {
  width: 24px;
  height: 24px;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1.5;
}
.ss-banner-body {
  flex: 1;
  min-width: 0;
}
.ss-banner-title {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
}
.ss-banner-text {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
}
.ss-learn-more {
  flex-shrink: 0;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
  font-weight: 500;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 3px rgba(0,0,0,0.2);
}
.ss-learn-more:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.3);
}

/* Banned state */
.ss-banned-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  margin: 16px;
  background: rgba(255, 60, 60, 0.04);
  border: 1px solid rgba(255, 60, 60, 0.15);
  border-radius: 18px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}
.ss-banned-icon {
  color: rgba(200, 40, 40, 0.6);
  margin-bottom: 12px;
}
.ss-banned-icon svg {
  width: 36px;
  height: 36px;
}
.ss-banned-text {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.6);
  line-height: 1.6;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 16px;
}
.ss-banned-text strong {
  color: rgba(0, 33, 33, 0.85);
}
.ss-appeal-btn {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(0, 33, 33, 0.08);
  border: 1px solid rgba(0, 33, 33, 0.15);
  border-radius: 12px;
  color: rgba(0, 33, 33, 0.7);
  font-size: 12px;
  font-family: Helvetica, Arial, sans-serif;
  text-decoration: none;
  transition: all 0.2s ease;
}
.ss-appeal-btn:hover {
  background: rgba(0, 33, 33, 0.15);
  color: rgba(0, 33, 33, 0.9);
}

/* Safety Stop Banned Block */
.ss-banned-block {
  z-index: 100;
  animation: ss-ban-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 100%;
}
@keyframes ss-ban-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.ss-banned-inner {
  background: rgba(0, 33, 33, 0.95);
  border-radius: 20px;
  padding: 32px 24px 28px;
  text-align: center;
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ss-banned-stop-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  margin: 0 auto 18px;
}
.ss-banned-stop-icon svg {
  stroke: rgba(255, 255, 255, 0.45);
}
.ss-banned-heading {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  margin-bottom: 10px;
}
.ss-banned-body {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  max-width: 380px;
  margin: 0 auto 22px;
}
.ss-banned-appeal-btn {
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 4px rgba(0,0,0,0.2);
}
.ss-banned-appeal-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Appeal Overlay */

/* Safety Stop Restricted Card (in-chat) */
.ss-restricted-message {
  background: none !important;
  padding: 0 !important;
}
.ss-restricted-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 26px;
  background: rgba(0, 33, 33, 0.95);
  border-radius: 28px;
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
}
.ss-restricted-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
}
.ss-restricted-icon svg {
  stroke: rgba(255, 255, 255, 0.5);
}
.ss-restricted-title {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  margin-bottom: 6px;
}
.ss-restricted-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
}

/* Safety Stop Memory Flag */
.ss-memory-flag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}
.ss-flag-icon {
  font-size: 14px;
}
.ss-flag-label {
  font-size: 11px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
}


/* Safety Stop Morphed Input */
.ss-banned-morphed {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  cursor: default !important;
}
.ss-banned-morph-inner {
  text-align: center;
  padding: 24px 20px;
  width: 100%;
  animation: ss-morph-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ss-morph-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.ss-banned-morph-inner .ss-banned-stop-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  margin: 0 auto 14px;
}
.ss-banned-morph-inner .ss-banned-stop-icon svg {
  stroke: rgba(255, 255, 255, 0.4);
}
.ss-banned-morph-inner .ss-banned-heading {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  margin-bottom: 8px;
}
.ss-banned-morph-inner .ss-banned-body {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.6;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  max-width: 340px;
  margin: 0 auto 16px;
}
.ss-banned-morph-inner .ss-banned-appeal-btn {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}
.ss-banned-morph-inner .ss-banned-appeal-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Safety Stop Banner Mobile */
@media (max-width: 600px) {
  .safety-stop-banner {
    flex-wrap: wrap;
    padding: 18px 20px;
  }
  .ss-banner-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .ss-banner-icon svg {
    width: 18px;
    height: 18px;
  }
  .ss-banner-body {
    flex: 1;
    min-width: 0;
  }
  .ss-learn-more {
    width: 100%;
    text-align: center;
    margin-top: 14px;
  }
}

/* Safety Stop Appeal - Liquid Glass (matches Magic Memory) */
.ss-appeal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 33, 33, 0.35);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ss-appeal-popup {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 48px rgba(0, 33, 33, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 380px;
  transform: translateY(12px) scale(0.96);
  animation: ss-popup-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes ss-popup-in {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.ss-appeal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 33, 33, 0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: #002121;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}
.ss-appeal-close:hover {
  background: rgba(0, 33, 33, 0.18);
}
.ss-appeal-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 33, 33, 0.06);
  border: 1px solid rgba(0, 33, 33, 0.08);
  border-radius: 50%;
  margin-bottom: 16px;
}
.ss-appeal-icon svg {
  stroke: #002121;
  opacity: 0.6;
}
.ss-appeal-title {
  font-family: 'Cooper', Georgia, serif;
  font-size: 18px;
  color: #002121;
  margin-bottom: 8px;
}
.ss-appeal-desc {
  font-size: 13px;
  color: rgba(0, 33, 33, 0.5);
  line-height: 1.6;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  margin-bottom: 16px;
}
.ss-appeal-email-btn {
  display: inline-block;
  padding: 10px 22px;
  background: rgba(0, 33, 33, 0.06);
  border: 1px solid rgba(0, 33, 33, 0.1);
  border-radius: 100px;
  color: #002121;
  font-size: 12.5px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 3px rgba(0, 33, 33, 0.08);
}
.ss-appeal-email-btn:hover {
  background: rgba(0, 33, 33, 0.12);
}
.ss-appeal-divider {
  height: 1px;
  background: rgba(0, 33, 33, 0.08);
  margin: 22px 0;
}
.ss-reauth-title {
  font-size: 15px;
  color: #002121;
}
.ss-reauth-row {
  display: flex;
  gap: 10px;
}
.ss-reauth-input {
  flex: 1;
  padding: 10px 16px;
  background: rgba(0, 33, 33, 0.04);
  border: 1px solid rgba(0, 33, 33, 0.1);
  border-radius: 14px;
  color: #002121;
  font-size: 13px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.ss-reauth-input:focus {
  border-color: rgba(0, 33, 33, 0.25);
}
.ss-reauth-input::placeholder {
  color: rgba(0, 33, 33, 0.3);
}
.ss-reauth-btn {
  padding: 10px 20px;
  background: rgba(0, 33, 33, 0.06);
  border: 1px solid rgba(0, 33, 33, 0.1);
  border-radius: 14px;
  color: #002121;
  font-size: 12.5px;
  font-weight: 500;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.ss-reauth-btn:hover {
  background: rgba(0, 33, 33, 0.12);
}
.ss-reauth-msg {
  font-size: 12px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  color: rgba(0, 33, 33, 0.5);
  margin-top: 10px;
  min-height: 16px;
}


/* Safety Stop Banner Padding Fix */
.ss-banned-morphed {
  min-height: auto !important;
}
.ss-banned-morph-inner {
  padding: 28px 24px 24px;
}

/* Appeal Popup - Horizontal Desktop Layout */
.ss-appeal-layout {
  display: flex;
  gap: 0;
}
.ss-appeal-left {
  flex: 1;
  padding-right: 24px;
}
.ss-appeal-right {
  flex: 0 0 220px;
  padding-left: 24px;
}
.ss-appeal-divider-v {
  width: 1px;
  background: rgba(0, 33, 33, 0.08);
  align-self: stretch;
}
.ss-appeal-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ss-appeal-header-row .ss-appeal-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  margin-bottom: 0;
}
.ss-appeal-header-row .ss-appeal-title {
  margin-bottom: 0;
  font-size: 20px;
}
.ss-appeal-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.ss-appeal-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(0, 33, 33, 0.55);
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
.ss-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: rgba(0, 33, 33, 0.06);
  border: 1px solid rgba(0, 33, 33, 0.08);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #002121;
}
.ss-step-link {
  color: #002121;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ss-appeal-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 33, 33, 0.05);
  border: 1px solid rgba(0, 33, 33, 0.12);
  border-radius: 8px;
  color: #002121;
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", "Cooper LT", monospace;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 33, 33, 0.06), inset 0 -1px 0 rgba(0, 33, 33, 0.04);
}
.ss-appeal-email-btn:hover {
  background: rgba(0, 33, 33, 0.1);
  box-shadow: 0 1px 3px rgba(0, 33, 33, 0.1), inset 0 -1px 0 rgba(0, 33, 33, 0.06);
}
.ss-appeal-email-btn svg {
  stroke: #002121;
  opacity: 0.5;
}

/* Desktop popup wider */
.ss-appeal-popup {
  max-width: 640px;
}

/* Reauth button states */
.ss-reauth-btn {
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.ss-reauth-btn.ss-reauth-fail {
  background: rgba(220, 50, 50, 0.12) !important;
  border-color: rgba(220, 50, 50, 0.3) !important;
  color: #c0392b !important;
}
.ss-reauth-btn.ss-reauth-fail svg {
  stroke: #c0392b;
}
.ss-reauth-btn.ss-reauth-success {
  background: rgba(0, 33, 33, 0.12) !important;
  border-color: rgba(0, 33, 33, 0.3) !important;
  color: #002121 !important;
}
.ss-reauth-btn.ss-reauth-success svg {
  stroke: #002121;
}
.ss-reauth-msg-success {
  color: #002121 !important;
  font-weight: 500;
}
.ss-reauth-msg-fail {
  color: #c0392b !important;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
  .ss-appeal-popup {
    max-width: 380px;
  }
  .ss-appeal-layout {
    flex-direction: column;
  }
  .ss-appeal-left {
    padding-right: 0;
    padding-bottom: 20px;
  }
  .ss-appeal-right {
    flex: none;
    padding-left: 0;
    padding-top: 20px;
  }
  .ss-appeal-divider-v {
    width: 100%;
    height: 1px;
  }
}

/* SS Countdown */
.ss-countdown {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  color: #002121;
  font-weight: 600;
  letter-spacing: 0.02em;
}


.ss-reauth-key-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 33, 33, 0.05);
  border: 1px solid rgba(0, 33, 33, 0.08);
  border-radius: 50%;
  margin: 0 auto 14px;
}
.ss-reauth-key-icon svg {
  stroke: #002121;
  opacity: 0.5;
}


/* Smaller safety stop icon on mobile */
@media (max-width: 600px) {
  .ss-banned-morph-inner .ss-banned-stop-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }
  .ss-banned-morph-inner .ss-banned-stop-icon svg {
    width: 20px;
    height: 20px;
  }
  .ss-banned-morph-inner .ss-banned-heading {
    font-size: 13px;
  }
  .ss-banned-morph-inner .ss-banned-body {
    font-size: 11px;
  }
}

/* SS Countdown */
.ss-countdown {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  color: #002121;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Reauth key icon */
.ss-reauth-key-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 33, 33, 0.05);
  border: 1px solid rgba(0, 33, 33, 0.08);
  border-radius: 50%;
  margin-bottom: 14px;
}
.ss-reauth-key-icon svg {
  stroke: #002121;
  opacity: 0.5;
}

/* Smaller safety stop icon on mobile */
@media (max-width: 600px) {
  .ss-banned-morph-inner .ss-banned-stop-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }
  .ss-banned-morph-inner .ss-banned-stop-icon svg {
    width: 20px;
    height: 20px;
  }
  .ss-banned-morph-inner .ss-banned-heading {
    font-size: 13px;
  }
  .ss-banned-morph-inner .ss-banned-body {
    font-size: 11px;
  }
}

/* Safety Stop Status Bar */
.ss-status-bar {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 33, 33, 0.08);
  font-size: 12px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  color: rgba(0, 33, 33, 0.4);
}
.ss-status-label {
  color: rgba(0, 33, 33, 0.5);
}
.ss-status-restricted {
  color: #c0392b;
  font-weight: 600;
}
.ss-status-clear {
  color: #002121;
  font-weight: 600;
}




/* SS Appeal - Clean horizontal layout */
.ss-appeal-layout {
  display: flex !important;
  flex-direction: row !important;
  gap: 0;
}
.ss-appeal-left {
  flex: 1;
  padding-right: 24px !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}
.ss-appeal-right {
  flex: 0 0 240px !important;
  padding-left: 24px !important;
  padding-top: 0 !important;
  text-align: left !important;
}
.ss-appeal-right .ss-reauth-title,
.ss-appeal-right .ss-appeal-desc {
  text-align: left !important;
}
.ss-appeal-divider-v {
  display: block !important;
  width: 1px !important;
  background: rgba(0, 33, 33, 0.08) !important;
  align-self: stretch;
}
.ss-appeal-popup {
  max-width: 640px;
}
.ss-countdown {
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #002121;
}

@media (max-width: 600px) {
  .ss-appeal-layout {
    flex-direction: column !important;
  }
  .ss-appeal-left {
    padding-right: 0 !important;
    padding-bottom: 20px !important;
  }
  .ss-appeal-right {
    flex: none !important;
    padding-left: 0 !important;
    padding-top: 20px !important;
  }
  .ss-appeal-divider-v {
    width: 100% !important;
    height: 1px !important;
  }
}


/* SS Banner - Learn More left aligned, less gap */
.ss-learn-row {
  width: 100%;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ss-learn-more {
  font-size: 12px !important;
  padding: 6px 14px !important;
  display: inline-block !important;
  min-width: 0 !important;
  width: auto !important;
  text-align: left !important;
}


/* SS Banner structure fix */
.ss-banner-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}


/* SS Warning Banner alignment fix */
.ss-warning-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 20px 24px;
  gap: 0;
}
.ss-banner-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
}
.ss-banner-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 2px 0 0 0;
}
.ss-banner-icon svg {
  width: 24px;
  height: 24px;
}
.ss-banner-body {
  flex: 1;
}
.ss-banner-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}
.ss-banner-text {
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.7;
}
.ss-learn-row {
  margin-left: auto;
  flex-shrink: 0;
}

/* SS Banned bar - no circle on icon */
.ss-banned-stop-icon {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  width: 28px !important;
  height: 28px !important;
  margin-bottom: 12px;
}
.ss-banned-stop-icon svg {
  width: 28px;
  height: 28px;
}

/* Fix banned morph inner padding */
.ss-banned-morph-inner {
  padding: 24px;
  text-align: center;
}
.ss-banned-heading {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.ss-banned-body {
  font-size: 12.5px;
  opacity: 0.65;
  line-height: 1.5;
  margin-bottom: 16px;
}


/* SS BANNER MASTER FIX */
.ss-warning-banner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 20px 24px !important;
  gap: 16px !important;
}
.ss-banner-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 14px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.ss-banner-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.ss-banner-icon svg {
  width: 24px !important;
  height: 24px !important;
}
.ss-banner-body {
  flex: 1 !important;
  min-width: 0 !important;
}
.ss-banner-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  margin-bottom: 4px !important;
  line-height: 1.3 !important;
  white-space: normal !important;
}
.ss-banner-text {
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  opacity: 0.7 !important;
  white-space: normal !important;
}
.ss-learn-row {
  flex-shrink: 0 !important;
  margin-left: 0 !important;
  align-self: center !important;
}

/* Safety Stop Banner - Desktop + Mobile Final Fix */
.safety-stop-banner {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 22px 24px !important;
}
.safety-stop-banner .ss-banner-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 14px !important;
  width: 100% !important;
}
.safety-stop-banner .ss-banner-body {
  flex: 1 !important;
  min-width: 0 !important;
}
.safety-stop-banner .ss-banner-title {
  font-weight: 400 !important;
}
.safety-stop-banner .ss-learn-row {
  border-top: none !important;
  margin-top: 12px !important;
  padding-top: 0 !important;
  width: auto !important;
}
.safety-stop-banner .ss-learn-row {
  text-align: left !important;
  padding-left: 42px !important;
}
.safety-stop-banner .ss-learn-row {
  align-self: flex-start !important;
  margin-left: 42px !important;
  padding-left: 0 !important;
}
.safety-stop-banner {
  padding: 26px 28px !important;
}
.safety-stop-banner .ss-learn-row {
  margin-top: 6px !important;
}

/* Welfare Protection Banner */
.welfare-banner {
  display: flex;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 26px 28px !important;
  margin: 12px 0;
  background: rgba(0, 33, 33, 0.95);
  border-radius: 28px;
  animation: ss-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.welfare-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 50%);
  border-radius: 28px;
  pointer-events: none;
}
.welfare-banner .ss-banner-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 14px !important;
  width: 100% !important;
}
.welfare-banner .ss-banner-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  background: none !important;
  border: none !important;
}
.welfare-banner .ss-banner-icon svg {
  width: 24px;
  height: 24px;
  stroke: rgba(255, 255, 255, 0.6);
}
.welfare-banner .ss-banner-body {
  flex: 1 !important;
  min-width: 0 !important;
}
.welfare-banner .ss-banner-title {
  font-size: 14px;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
}
.welfare-banner .ss-banner-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
}
.welfare-banner .ss-learn-row {
  border-top: none !important;
  margin-top: 6px !important;
  padding-top: 0 !important;
  width: auto !important;
  align-self: flex-start !important;
  margin-left: 42px !important;
  padding-left: 0 !important;
}
.welfare-banner .welfare-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
  font-weight: 500;
  font-family: "Cooper LT", Helvetica, Arial, sans-serif;
  text-decoration: none;
  padding: 6px 14px;
  transition: all 0.25s ease;
}
.welfare-banner .welfare-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
/* Welfare Protection inline link */
.welfare-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.welfare-link:hover {
  color: #fff;
}

/* Version indicator */

.send-area {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Fix memory label font */
.memory-popup-summary-label{font-family:'Cooper',Georgia,serif !important;font-style:normal !important;}

/* Fix memory summary label font to match rest */
.memory-popup-summary-label{font-family:'Cooper',Georgia,serif !important;letter-spacing:normal !important;text-transform:none !important;font-size:12px !important;}

/* Memory progress header */
.memory-progress-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.memory-progress-label{display:flex;align-items:center;gap:6px;}
.memory-progress-icon{flex-shrink:0;}
.memory-progress-name{font-family:'Cooper',Georgia,serif;font-size:12px;color:#002121;font-weight:500;}
.memory-progress-used{font-family:'Cooper',Georgia,serif;font-size:12px;color:rgba(0,33,33,0.45);}
.memory-progress-row{margin-bottom:8px;}
.memory-progress-bar{height:6px;border-radius:3px;background:rgba(0,33,33,0.08);overflow:hidden;}
.memory-progress-fill{height:100%;border-radius:3px;background:linear-gradient(90deg,#002121,#003333);position:relative;transition:width 0.6s cubic-bezier(0.34,1.56,0.64,1);}
.memory-progress-fill::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0) 100%);animation:progressShimmer 2s ease-in-out infinite;}
@keyframes progressShimmer{0%{transform:translateX(-100%);}100%{transform:translateX(100%);}}

/* Close pill button above popup */
.memory-close-pill{position:absolute !important;top:-44px !important;right:0 !important;background:rgba(0,33,33,0.6) !important;backdrop-filter:blur(20px) !important;-webkit-backdrop-filter:blur(20px) !important;border:none !important;border-radius:50px !important;color:rgba(255,255,255,0.9) !important;font-size:11px !important;font-family:'Cooper',Georgia,serif !important;width:auto !important;height:auto !important;padding:8px 16px !important;display:flex !important;align-items:center !important;gap:4px !important;cursor:pointer !important;transition:all 0.2s ease !important;z-index:10 !important;}
.memory-close-pill:hover{background:rgba(0,33,33,0.8) !important;}

/* Liquid glass close pill */
.memory-close-pill{background:rgba(255,255,255,0.25) !important;backdrop-filter:blur(40px) saturate(180%) !important;-webkit-backdrop-filter:blur(40px) saturate(180%) !important;border:1px solid rgba(255,255,255,0.4) !important;box-shadow:0 4px 16px rgba(0,33,33,0.12),inset 0 1px 0 rgba(255,255,255,0.5) !important;color:rgba(0,33,33,0.7) !important;}
.memory-close-pill:hover{background:rgba(255,255,255,0.4) !important;color:#002121 !important;box-shadow:0 6px 20px rgba(0,33,33,0.16),inset 0 1px 0 rgba(255,255,255,0.6) !important;}





/* Scroll to bottom FAB */
#scrollBottomFab{position:fixed;bottom:140px;left:50%;transform:translateX(-50%) scale(0.8);opacity:0;visibility:hidden;pointer-events:none;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,0.2);backdrop-filter:blur(40px) saturate(180%);-webkit-backdrop-filter:blur(40px) saturate(180%);border:1px solid rgba(255,255,255,0.35);color:rgba(255,255,255,0.8);display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:50;transition:all 0.3s cubic-bezier(0.34,1.56,0.64,1);animation:fabGlow 3s ease-in-out infinite;}
#scrollBottomFab.show{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) scale(1);}
#scrollBottomFab:hover{background:rgba(255,255,255,0.35);transform:translateX(-50%) scale(1.1);}
#scrollBottomFab:active{transform:translateX(-50%) scale(0.9);}
@keyframes fabGlow{0%,100%{box-shadow:0 2px 12px rgba(0,0,0,0.1),0 0 8px rgba(255,140,0,0.1);}50%{box-shadow:0 2px 12px rgba(0,0,0,0.1),0 0 16px rgba(255,140,0,0.25);}}


/* Hide suggestions on mobile */
@media(max-width:600px){.suggestions-wrapper{display:none !important;}}

@media(max-width:600px){.suggestions-wrapper{display:none !important;}}

/* Magic Suggestions */
.suggestions-wrapper{position:fixed;bottom:158px;left:0;right:0;max-width:600px;margin:0 auto;z-index:9;width:100%;text-align:center;opacity:0;visibility:hidden;transition:all 0.6s ease;transform:translateY(6px);padding:0 16px;}
.suggestions-wrapper.show{opacity:1;visibility:visible;transform:translateY(0);}
.suggestions-label{font-size:10px;color:rgba(255,255,255,0.85);margin-bottom:8px;font-family:'Geist',Helvetica,Arial,sans-serif;}
.suggestions-list{display:flex;flex-direction:column;gap:2px;align-items:center;}
.suggestion-item{padding:4px 12px;color:rgba(255,255,255,0.3);font-size:13px;font-family:'Geist',Helvetica,Arial,sans-serif;cursor:pointer;transition:color 0.6s ease;text-align:center;opacity:0;line-height:1.4;transform:translateY(4px);}
.suggestion-item.show{opacity:1;transform:translateY(0);transition:opacity 0.6s ease,transform 0.6s ease,color 0.3s ease;}
.suggestion-item:hover{color:rgba(255,255,255,0.95);}
body.theme-garden .suggestions-label{color:rgba(0,33,33,0.6);}
body.theme-garden .suggestion-item{color:rgba(0,33,33,0.3);}
body.theme-garden .suggestion-item:hover{color:rgba(0,33,33,0.85);}
.chat-active .suggestions-wrapper{display:none !important;}
@media(max-width:600px){.suggestions-wrapper{display:none !important;}}
@media(min-width:601px){.suggestions-wrapper{max-width:800px;}}

/* Gradient text on hover */
.suggestion-item:hover{background:linear-gradient(90deg,rgba(255,255,255,0.4),rgba(255,255,255,0.95),rgba(255,255,255,0.4));-webkit-background-clip:text !important;-webkit-text-fill-color:transparent !important;background-size:200% 100%;animation:textShimmer 3s ease infinite;}
body.theme-garden .suggestion-item:hover{background:linear-gradient(90deg,rgba(0,33,33,0.3),rgba(0,33,33,0.85),rgba(0,33,33,0.3));-webkit-background-clip:text !important;-webkit-text-fill-color:transparent !important;background-size:200% 100%;animation:textShimmer 3s ease infinite;}
@keyframes textShimmer{0%{background-position:200% 0;}100%{background-position:-200% 0;}}

/* Align send button and input */
.input-bottom{align-items:center !important;}
.input-box textarea{margin-bottom:12px !important;}

/* Fix textarea and send alignment */
.input-box{display:flex !important;flex-direction:column !important;}
.input-bottom{margin-top:auto !important;}
.send-btn{flex-shrink:0 !important;align-self:center !important;}

/* Close pill - white in dark themes */
body.theme-london .memory-close-pill,
body.theme-device.theme-dark-active .memory-close-pill{background:rgba(255,255,255,0.12) !important;border:1px solid rgba(255,255,255,0.2) !important;color:rgba(255,255,255,0.9) !important;box-shadow:0 4px 16px rgba(0,0,0,0.2),inset 0 1px 0 rgba(255,255,255,0.1) !important;}
body.theme-london .memory-close-pill:hover,
body.theme-device.theme-dark-active .memory-close-pill:hover{background:rgba(255,255,255,0.2) !important;}




/* Beta top bar */

/* Disclaimer switcher */
.disclaimer-wrapper{text-align:center;margin-top:4px;position:relative;height:14px;}
.disclaimer-settings,.disclaimer-text{position:absolute;left:0;right:0;transition:opacity 0.2s ease;}
.disclaimer-settings{opacity:0;visibility:hidden;}
.disclaimer-settings.show{opacity:1;visibility:visible;}
.disclaimer-text{opacity:0;visibility:hidden;font-size:9px;color:rgba(0,33,33,0.45);}
.disclaimer-text a{color:rgba(0,33,33,0.45);text-decoration:underline;}
.disclaimer-text.show{opacity:1;visibility:visible;}

/* Settings button text styling */
.settings-gear-btn{font-family:'Cooper',Georgia,serif !important;font-size:9px !important;}
.disclaimer-text{font-family:'Cooper',Georgia,serif !important;font-size:9px !important;color:#002121 !important;}
.disclaimer-text a{color:#002121 !important;}

/* London Night mode disclaimer */
body.theme-london .disclaimer-text,
body.theme-device.theme-dark-active .disclaimer-text{color:rgba(255,255,255,0.4) !important;}
body.theme-london .disclaimer-text a,
body.theme-device.theme-dark-active .disclaimer-text a{color:rgba(255,255,255,0.4) !important;}

/* Remove outlines from action buttons */
.action-btn{outline:none !important;border:none !important;box-shadow:none !important;}
.action-btn:focus{outline:none !important;border:none !important;box-shadow:none !important;}
.action-btn:focus-visible{outline:none !important;border:none !important;box-shadow:none !important;}

.memory-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.memory-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 33, 33, 0.55);
  margin-bottom: 6px;
}

.memory-empty-sub {
  font-size: 12px;
  color: rgba(0, 33, 33, 0.4);
}

.memory-item-empty {
  text-align: center;
  padding: 40px 20px;
}

@keyframes shimmer {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

/* Skeleton Loader v2 */
.skeleton-loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #002121;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease;
}
.skeleton-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
  height: 28px;
  background: rgba(255,255,255,0.04);
  width: 100%;
}
.skeleton-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.skeleton-greeting {
  width: 90%;
  max-width: 600px;
}
.skeleton-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 16px;
  animation: shimmer 1.5s infinite;
}
.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 8px;
  animation: shimmer 1.5s infinite;
}
.skeleton-w50 { width: 50%; }
.skeleton-w70 { width: 70%; animation-delay: 0.2s; }
.skeleton-w60 { width: 60%; animation-delay: 0.4s; }
.skeleton-bottom {
  padding: 16px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.skeleton-inputbar {
  width: 90%;
  max-width: 600px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px;
}
.skeleton-textarea {
  height: 20px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  margin-bottom: 12px;
  animation: shimmer 1.5s infinite;
  animation-delay: 0.3s;
}
.skeleton-buttons-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.skeleton-btn {
  width: 80px;
  height: 28px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  animation: shimmer 1.5s infinite;
  animation-delay: 0.5s;
}
.skeleton-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  margin-left: auto;
  animation: shimmer 1.5s infinite;
  animation-delay: 0.7s;
}
.skeleton-settings-line {
  width: 60px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  margin-top: 10px;
  animation: shimmer 1.5s infinite;
  animation-delay: 0.8s;
}

.skeleton-cards-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}
.skeleton-card {
  flex: 1;
  height: 140px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  animation: shimmer 1.5s infinite;
}
.skeleton-card:nth-child(2) { animation-delay: 0.2s; }
.skeleton-card:nth-child(3) { animation-delay: 0.4s; }

body.theme-london .bot-msg,
body.theme-london .bot-msg a {
  color: rgba(255, 255, 255, 0.85);
}
body.theme-london .bot-msg a:hover {
  opacity: 0.7;
}

body:not(.theme-london) .chat-start-disclaimer,
body:not(.theme-london) .chat-start-disclaimer a {
  color: rgba(0, 33, 33, 0.45);
}


/* High Contrast Dark Theme - Pure Black WCAG AAA */
body.theme-contrast-dark {
  background: #000000 !important;
  color: #FFFFFF !important;
}
body.theme-contrast-dark #chatArea,
body.theme-contrast-dark .start-screen,
body.theme-contrast-dark .input-box {
  background: #000000 !important;
}
body.theme-contrast-dark .user-bubble {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 3px solid #FFFFFF !important;
}
body.theme-contrast-dark .bot-msg {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 3px solid #FFFFFF !important;
}
body.theme-contrast-dark .input-box,
body.theme-contrast-dark #msgInput {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 3px solid #FFFFFF !important;
}
body.theme-contrast-dark .feature-btn,
body.theme-contrast-dark .send-btn {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 3px solid #FFFFFF !important;
}
body.theme-contrast-dark .thinking span {
  color: #FFFFFF !important;
}
body.theme-contrast-dark .feature-btn,
body.theme-contrast-dark .send-btn {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 3px solid #FFFFFF !important;
}
body.theme-contrast-dark .thinking span {
  color: #FFFFFF !important;
}
