:root {
  color-scheme: light;
  --page: #eefbfb;
  --surface: #eaf7f7;
  --surface-strong: #fefdf9;
  --surface-soft: #eef8f8;
  --line: #c9e1df;
  --line-soft: #dceceb;
  --ink: #17353a;
  --muted: #5f7d80;
  --accent: #ff8600;
  --accent-soft: #fff0de;
  --success: #10a86c;
  --lavender: #e8f5ff;
  --mint: #dff8ea;
  --butter: #fff2c8;
  --blush: #ffe7db;
  --sky: #dff6f7;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 12px;
  --shadow: 0 12px 30px rgba(35, 31, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(4, 171, 183, 0.14), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(255, 134, 0, 0.16), transparent 22%),
    linear-gradient(180deg, #f4ffff 0%, #f3efe4 100%);
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

p,
h1,
h2,
ul,
li {
  margin: 0;
}

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

.app-shell {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(240px, 270px) minmax(0, 1fr);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  overflow: hidden;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.brand-block,
.assistant-header {
  min-height: 88px;
  display: flex;
  align-items: center;
}

.brand-block,
.sidebar-section,
.assistant-header,
.assistant-subhead,
.chat-form,
.quick-replies,
.assistant-body {
  padding-left: 16px;
  padding-right: 16px;
}

.brand-block {
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 8px 14px rgba(23, 53, 58, 0.14));
}

.logo-video {
  display: block;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
}

.logo-video-source {
  display: none;
}

.brand-logo.logo-video {
  border-radius: 0;
}

.brand-copy {
  display: grid;
}

.brand-word {
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0aa8b5;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.sidebar-section {
  padding-top: 16px;
  min-height: 0;
}

.sidebar-section-spaced {
  padding-bottom: 8px;
}

.new-search-button {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 2px solid #bbb4a7;
  background: transparent;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.provider-link-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefc;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.category-list {
  display: grid;
  gap: 2px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.category-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 10px 9px 12px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.category-item.is-active {
  background: #fffefc;
  border-left-color: #0aa8b5;
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.lavender {
  background: var(--lavender);
}

.mint {
  background: var(--mint);
}

.butter {
  background: var(--butter);
}

.blush {
  background: var(--blush);
}

.sky {
  background: var(--sky);
}

.sidebar-meta {
  display: grid;
  align-content: end;
  gap: 8px;
  padding-bottom: 16px;
  min-height: 0;
  overflow: auto;
}

.meta-card,
.scenario-list article,
.result-card,
.listing-card {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.meta-label,
.message-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.meta-list {
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.assistant-pane {
  background: #fcfbf8;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.assistant-header {
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.assistant-badge {
  display: none;
}

.assistant-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 10px 16px rgba(23, 53, 58, 0.16));
  transform-origin: 50% 90%;
  animation: mamu-greeting 3.8s ease-in-out infinite;
}

.assistant-logo.logo-video {
  border-radius: 0;
  object-fit: contain;
}

.assistant-logo.logo-canvas {
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
  animation: none;
  filter: none;
}

@keyframes mamu-greeting {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  18% {
    transform: translateY(-3px) rotate(-2deg);
  }
  32% {
    transform: translateY(0) rotate(2deg);
  }
  46% {
    transform: translateY(-2px) rotate(-1deg);
  }
  60% {
    transform: translateY(0) rotate(0deg);
  }
}

.assistant-title-block h1 {
  font-size: 1.5rem;
  line-height: 1.05;
  font-weight: 700;
  color: #0aa8b5;
}

.assistant-status {
  margin-top: 4px;
  color: var(--success);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--success);
  flex: 0 0 auto;
}

.assistant-subhead {
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  background: #f7f3ec;
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c0bcb4;
  transition: width 220ms ease, background 220ms ease;
}

.dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: #0aa8b5;
}

.subhead-copy {
  color: var(--muted);
  font-size: 0.92rem;
  transition: opacity 220ms ease;
}

.assistant-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  overflow: hidden;
}

.chat-thread {
  min-height: 0;
  height: 100%;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.message-row {
  display: flex;
}

.message-row.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(88%, 720px);
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(44, 37, 28, 0.04);
}

.message-row.user .chat-bubble {
  background: #f1edff;
  border-color: #d9d0ff;
}

.chat-bubble p,
.hint-card p,
.scenario-list p,
.result-card p {
  color: var(--muted);
  line-height: 1.6;
}

.typing-bubble {
  width: auto;
  min-width: 112px;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fa0a3;
  animation: typing-pulse 1.1s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.32s;
}

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

.insight-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.insight-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f4ee;
  padding: 12px;
}

.hint-panel {
  border: 0;
  background: linear-gradient(160deg, #ffffff 0%, #eefafa 56%, #fff6e8 100%);
  box-shadow: 0 16px 34px rgba(23, 53, 58, 0.1);
  overflow: hidden;
  position: relative;
}

.hint-panel::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -46px;
  top: -42px;
  border-radius: 50%;
  background: rgba(10, 168, 181, 0.14);
}

.hint-carousel {
  position: relative;
  min-height: 190px;
  margin-top: 6px;
}

.hint-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms ease, transform 360ms ease;
  pointer-events: none;
}

.hint-card.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hint-kicker {
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 134, 0, 0.12);
  color: #9d5a00;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hint-dots {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.hint-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #b9cdcb;
  transition: width 220ms ease, background 220ms ease;
}

.hint-dots span.is-active {
  width: 20px;
  background: #0aa8b5;
}

.scenario-list,
.listing-grid {
  display: grid;
  gap: 12px;
}

.scenario-list h2,
.result-card h3,
.hint-card h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
  padding-bottom: 6px;
  overflow-x: auto;
  overflow-y: hidden;
}

.reply-chip,
.tag,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.reply-chip {
  border: 1px solid #d8e6e4;
  background: rgba(255, 255, 255, 0.72);
  color: #416367;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
}

.chat-form {
  border-top: 1px solid var(--line);
  position: relative;
  display: block;
  padding-top: 12px;
  padding-bottom: 12px;
  min-width: 0;
  width: 100%;
}

.chat-input-wrap {
  width: calc(100% - 140px);
  min-width: 0;
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffefc;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.chat-form input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  outline: 0;
}

.chat-form input::placeholder {
  color: #2b2b2b;
}

.voice-button,
.send-button {
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 60px;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
  cursor: pointer;
}

.unused-position-button::before {
  content: "PIN";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
}

.voice-button {
  right: 84px;
  border: 1px solid var(--line);
  background: #fffefc;
}

.voice-button::before {
  content: "🎙";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.18rem;
}

.voice-button.is-listening {
  border-color: #0aa8b5;
  background: #e8fbfb;
  box-shadow: 0 0 0 4px rgba(10, 168, 181, 0.12);
}

.send-button {
  right: 16px;
  border: 2px solid #f6b14f;
  background: linear-gradient(135deg, #fff2de 0%, #ffe7c0 100%);
}

.send-button::before {
  content: "➜";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--ink);
}

.result-card {
  margin-top: 10px;
}

.expert-nudge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #6d8082;
  font-size: 0.78rem;
}

.expert-nudge button {
  border: 0;
  background: transparent;
  color: #0a7f88;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.provider-results {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.provider-result-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefc;
  padding: 12px;
}

.provider-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-result-head h3 {
  margin: 0;
}

.provider-rank {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.result-meta,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quality-meta .tag {
  background: #fff7e8;
  border-color: #f0dfbd;
  color: #6f5623;
}

.category-dropdown-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.category-dropdown-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
}

.tag {
  padding: 7px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.74rem;
}

.comparison-summary {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.fallback-banner {
  margin-top: 14px;
  border: 1px solid #e6d8a5;
  border-radius: 14px;
  background: #fff7db;
  padding: 12px 13px;
}

.fallback-banner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.fallback-banner p {
  color: #75653a;
  line-height: 1.55;
}

.listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.action-button {
  border: 0;
  padding: 9px 13px;
  background: linear-gradient(135deg, #ff9d2a 0%, #ff7b00 100%);
  color: #fff;
  cursor: pointer;
}

.action-button.secondary {
  background: transparent;
  color: #557174;
  border: 1px solid #d7e4e2;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .assistant-body {
    grid-template-columns: 1fr;
  }

  .insight-column {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .sidebar {
    grid-template-rows: auto auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }

  .brand-block {
    min-height: 42px;
    padding-top: 6px;
    padding-bottom: 4px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  .brand-word {
    font-size: 1.22rem;
  }

  .brand-subtitle {
    display: none;
  }

  .sidebar-section {
    padding-top: 8px;
  }

  .sidebar-section-spaced {
    display: none;
  }

  .section-label {
    display: none;
  }

  .new-search-button,
  .provider-link-button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 42px;
    margin-top: 0;
    border-radius: 12px;
  }

  .category-list {
    display: flex;
    gap: 6px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .category-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    padding: 6px 9px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.56);
  }

  .category-item.is-active {
    border-left-color: transparent;
    border-bottom-color: #0aa8b5;
  }

  .category-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 0.78rem;
  }

  .assistant-pane {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    min-height: 0;
    max-width: 100vw;
    overflow: hidden;
  }

  .assistant-header {
    min-height: 44px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .assistant-logo {
    width: 36px;
    height: 36px;
  }

  .assistant-title-block h1 {
    font-size: 1.1rem;
  }

  .assistant-status {
    font-size: 0.76rem;
    margin-top: 2px;
  }

  .assistant-subhead {
    display: flex;
    min-height: 34px;
    gap: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    overflow: hidden;
  }

  .progress-dots {
    display: none;
  }

  .subhead-copy {
    min-width: 0;
    width: 100%;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .assistant-body {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .chat-bubble {
    max-width: 94%;
    padding: 10px 12px;
  }

  body {
    overflow: hidden;
  }

  .sidebar-meta {
    display: none;
  }

  .chat-form {
    background: #fcfbf8;
  }
}

@media (max-width: 640px) {
  .brand-block,
  .sidebar-section,
  .assistant-header,
  .assistant-subhead,
  .assistant-body,
  .quick-replies,
  .chat-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-block,
  .sidebar-section,
  .assistant-header,
  .assistant-subhead {
    padding-left: 10px;
    padding-right: 10px;
  }

  .chat-form {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 8px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .chat-input-wrap {
    width: calc(100% - 103px);
    min-height: 50px;
    border-radius: 12px;
  }

  .voice-button {
    right: 61px;
    width: 44px;
  }

  .send-button {
    right: 10px;
    width: 44px;
  }

  .chat-form input {
    font-size: 1rem;
  }

  .category-dropdown-card {
    grid-template-columns: 1fr;
  }
}
