.scenario-card {
      background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 242, 234, 0.96));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-md);
      padding: 20px;
    }

    .scenario-card h3 {
      margin-bottom: 10px;
      font-size: 1.08rem;
    }

    .scenario-card p {
      margin-bottom: 14px;
    }

    .scenario-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 10px 14px;
      border-radius: var(--radius-pill);
      background: var(--surface);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: 0.18s ease;
    }

    .scenario-btn:hover {
      border-color: var(--border-strong);
      transform: translateY(-1px);
    }

    .ask-layout {
      display: grid;
      grid-template-columns: 1.35fr 0.85fr;
      gap: 24px;
      align-items: stretch;
    }

    .chat-shell {
      display: flex;
      flex-direction: column;
      height: 100%;
      background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(248, 242, 234, 0.96));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-md);
      overflow: hidden;
    }

    .chat-header {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 12px;
      padding: 16px 20px 14px;
      border-bottom: 1px solid rgba(203, 187, 167, 0.45);
      background: rgba(255, 253, 249, 0.7);
    }

    .chat-title {
      margin: 0;
      font-size: 1.08rem;
    }

    .chat-messages {
      display: flex;
      flex-direction: column;
      flex: 1;
      gap: 14px;
      padding: 18px 20px 14px;
      min-height: 250px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    }

    .message {
      max-width: 84%;
      padding: 14px 16px;
      border-radius: 18px;
      line-height: 1.55;
      white-space: pre-wrap;
      box-shadow: var(--shadow-sm);
    }

    .message.assistant {
      align-self: flex-start;
      background: linear-gradient(180deg, rgba(233, 243, 247, 0.98), rgba(246, 249, 250, 0.96));
      border: 1px solid rgba(29, 95, 122, 0.18);
      box-shadow: 0 12px 24px rgba(29, 95, 122, 0.08);
    }

    .message.error {
      background: linear-gradient(180deg, rgba(255, 247, 241, 0.98), rgba(255, 252, 248, 0.96));
      border: 1px solid rgba(177, 77, 42, 0.28);
      color: var(--text);
      box-shadow: 0 12px 24px rgba(177, 77, 42, 0.08);
    }

    .message.typing {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--text-soft);
      white-space: normal;
    }

    .typing-dots {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .typing-dots span {
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: currentColor;
      opacity: 0.38;
      animation: typingPulse 1.2s ease-in-out infinite;
    }

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

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

    @keyframes typingPulse {
      0%,
      80%,
      100% {
        opacity: 0.28;
        transform: translateY(0);
      }

      40% {
        opacity: 0.9;
        transform: translateY(-2px);
      }
    }

    .message.user {
      align-self: flex-end;
      background: var(--primary);
      color: #fff;
    }

    .chat-tools {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      padding: 0 20px 16px;
    }

    .quick-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 40px;
      padding: 9px 14px;
      border-radius: var(--radius-pill);
      background: rgba(255, 253, 249, 0.96);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: 0.18s ease;
    }

    .quick-chip:hover {
      border-color: var(--border-strong);
      transform: translateY(-1px);
    }

    .chat-form {
      margin-top: auto;
      padding: 18px 20px 20px;
      border-top: 1px solid rgba(203, 187, 167, 0.45);
      background: rgba(255, 253, 249, 0.78);
    }

    .chat-form textarea {
      width: 100%;
      min-height: 110px;
      resize: vertical;
      padding: 14px 16px;
      border-radius: 18px;
      border: 1px solid rgba(24, 57, 77, 0.12);
      background: #fff;
      box-shadow: inset 0 1px 2px rgba(22, 39, 52, 0.04);
      color: var(--text);
    }

    .chat-history-note {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 0.86rem;
      line-height: 1.45;
    }

    .chat-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 14px;
    }

    .side-stack {
      display: grid;
      gap: 18px;
      align-content: start;
      height: 100%;
    }

    .side-card {
      background: rgba(255, 253, 249, 0.92);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
      padding: 20px;
    }

    .side-card h3 {
      margin-bottom: 10px;
      font-size: 1.08rem;
    }

    .question-list {
      margin: 0;
      padding-left: 20px;
      color: var(--text-soft);
    }

    .question-list li {
      margin-bottom: 9px;
    }

    @media (max-width: 980px) {
      .ask-layout {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 520px) {
      .chat-actions {
        flex-direction: column;
      }

      .quick-chip,
      .scenario-btn {
        width: 100%;
      }

      .message {
        max-width: 100%;
      }
    }
