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

:root {
    --green-dark: #1b4332;
    --green-mid: #2d6a4f;
    --green-light: #52b788;
    --green-pale: #d8f3dc;
    --bg: #f8faf9;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --white: #ffffff;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.app {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 2rem 0 1rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-dark);
}

header .accent {
    color: var(--green-light);
}

header .tagline {
    color: var(--text-light);
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    display: flex;
    gap: 0.5rem;
    max-width: 85%;
    animation: fadeIn 0.2s ease-out;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius);
    line-height: 1.5;
    font-size: 0.95rem;
}

.message.bot .message-content {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-top-left-radius: 4px;
}

.message.user .message-content {
    background: var(--green-mid);
    color: var(--white);
    border-top-right-radius: 4px;
}

.message-content p {
    margin-bottom: 0.5rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content .hint {
    color: var(--text-light);
    font-size: 0.875rem;
}

.message.user .message-content .hint {
    color: rgba(255, 255, 255, 0.8);
}

.message-content strong {
    font-weight: 600;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.message-content li {
    margin-bottom: 0.25rem;
}

.message-content a {
    color: var(--green-mid);
    text-decoration: underline;
}

.message.user .message-content a {
    color: var(--green-pale);
}

.message-content .status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.status-allowed { background: #d1fae5; color: #065f46; }
.status-conditional { background: #fef3c7; color: #92400e; }
.status-prohibited { background: #fee2e2; color: #991b1b; }
.status-unknown { background: #e5e7eb; color: #374151; }

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
    justify-content: center;
}

.chip {
    background: var(--white);
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--green-dark);
    cursor: pointer;
    transition: all 0.15s;
}

.chip:hover {
    background: var(--green-pale);
    border-color: var(--green-light);
}

.input-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0;
    position: sticky;
    bottom: 0;
    background: var(--bg);
}

.input-bar input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s;
}

.input-bar input:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.input-bar button {
    padding: 0.875rem 1rem;
    background: var(--green-mid);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-bar button:hover {
    background: var(--green-dark);
}

.input-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

footer {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-light);
}

footer a {
    color: var(--green-mid);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--green-light);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

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

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

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

@media (max-width: 600px) {
    .app { padding: 0.5rem; }
    header h1 { font-size: 1.5rem; }
    .message { max-width: 92%; }
}
