:root {
    --bg: #ffffff;
    --bg-accent: #ffffff;
    --card: #ffffff;
    --card-strong: #ffffff;
    --text: #1f2a1f;
    --muted: #5f6b5f;
    --line: rgba(46, 71, 46, 0.14);
    --primary: #4f883d;
    --primary-strong: #173929;
    --secondary: #edf4e9;
    --shadow: 0 18px 45px rgba(36, 50, 32, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background: var(--bg);
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0px 0 56px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.app-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
}

.panel {
    border-radius: var(--radius-xl);
    padding: 28px;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.4rem;
}

.panel-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.wishes-form {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 10px;
}

.field span {
    font-size: 0.92rem;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid rgba(36, 85, 58, 0.16);
    background: var(--card-strong);
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 15px 16px;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(36, 85, 58, 0.45);
    box-shadow: 0 0 0 4px rgba(36, 85, 58, 0.08);
    transform: translateY(-1px);
}

.field textarea {
    resize: vertical;
    min-height: 110px;
}

.choice-group {
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.choice-group legend {
    width: 100%;
    margin-bottom: 2px;
    font-size: 0.92rem;
    font-weight: 700;
}

.choice-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.choice-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(79, 136, 61, 0.18);
    background: #ffffff;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.choice-pill input:checked + span {
    background: rgba(79, 136, 61, 0.12);
    border-color: var(--primary);
    color: var(--primary-strong);
    box-shadow: 0 0 0 4px rgba(79, 136, 61, 0.08);
}

.choice-pill span:hover {
    transform: translateY(-1px);
}

.primary-button,
.secondary-button {
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.primary-button {
    padding: 16px 24px;
    background: #4f883d;
    color: #fffef8;
}

.secondary-button {
    width: 100%;
    max-width: 220px;
    padding: 13px 24px;
    background: var(--secondary);
    color: var(--primary-strong);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.conversation {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.message {
    padding: 18px 18px 20px;
    border-radius: 22px;
    line-height: 1.7;
    border: 1px solid var(--line);
}

.message-user {
    background: #f7fbf5;
}

.message-ai {
    background: #ffffff;
}

.message-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--primary);
}

.message p {
    margin: 0;
    white-space: pre-wrap;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.status-text {
    color: var(--muted);
    min-height: 24px;
    font-size: 0.95rem;
}

@media (max-width: 920px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 100%);
        padding-top: 20px;
    }

    .panel {
        padding: 22px;
        border-radius: 24px;
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
