:root {
    --ink: #1c1c1c;
    --muted: #5c5c62;
    --panel: #ffffff;
    --border: #e4e4e4;
    --shadow: rgba(255, 77, 109, 0.08);
    --primary: #ff4d6d;
    --primary-dark: #cc3d57;
    --primary-light: rgba(255, 77, 109, 0.1);
    --accent: #ffb703;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    background: #fdfafb;
    min-height: 100vh;
}

.shell {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    gap: 20px;
}

.panel {
    background: var(--panel);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 16px 40px var(--shadow);
    border: 1px solid var(--border);
}

.hero {
    margin-bottom: 32px;
    text-align: center;
}

.hero h1 {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), #ff8fa3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.field {
    display: grid;
    gap: 10px;
}

label {
    font-weight: 600;
    color: #2b2b2b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
select {
    font-family: inherit;
    border: 1px solid var(--border);
    background: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.span-2 {
    grid-column: span 2;
}

.actions {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

button {
    font-family: inherit;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.3);
    flex: 1;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 77, 109, 0.4);
}

.secondary-btn {
    background: #f1f3f5;
    color: #495057;
}

.secondary-btn:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.output {
    display: grid;
    gap: 20px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.output h2 {
    font-size: 1.5rem;
    font-family: 'Fraunces', serif;
}

.meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
}

.result {
    min-height: 160px;
    border-radius: 20px;
    padding: 12px;
    background: #fdfdfd;
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }
}