@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --primary: #4a5568;
    --accent: #d4a574;
    --light-bg: #fafaf9;
    --border: #e7e5e4;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --white: #ffffff;
    --error: #dc2626;
    --serif: 'Playfair Display', serif;
    --sans: 'Inter', sans-serif;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--sans);
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--white);
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 880px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.brand {
    text-align: left;
}

.app-header h1 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.app-header h1 a {
    text-decoration: none;
    color: inherit;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-lighter);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation */
.main-nav {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
    justify-content: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 4px 0;
}

.nav-links a:hover {
    color: var(--text-dark);
}

.nav-links a.active {
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.2s ease;
}

/* Container */
.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 20px;
    flex: 1;
    width: 100%;
}

/* Footer */
.app-footer {
    background: var(--light-bg);
    padding: 48px 20px 32px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-content {
    max-width: 880px;
    margin: 0 auto;
}

.footer-tagline {
    font-family: var(--serif);
    font-size: 1rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.footer-nav {
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8125rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-dark);
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-lighter);
}

/* Home Page */
.home-page {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.hero {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 56px 48px;
    text-align: center;
}

.hero h2 {
    font-family: var(--serif);
    font-size: 2.25rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.intro-text:last-of-type {
    margin-bottom: 0;
}

.cta-section {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 2px;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #3f4556;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--light-bg);
}

/* Progress Bar */
.progress-bar {
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    transition: width 0.4s ease;
}

.step-counter {
    color: var(--text-lighter);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 28px;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Step/Review Cards */
.step-card,
.review-card,
.success-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 48px;
}

.step-card h2,
.review-card h2 {
    font-family: var(--serif);
    color: var(--text-dark);
    margin-bottom: 28px;
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.review-subtitle {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

/* Forms */
.step-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.required {
    color: var(--error);
}

input[type="text"],
input[type="email"],
textarea,
select {
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    font-family: var(--sans);
    background: var(--white);
    color: var(--text-dark);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Options */
.options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.small-text {
    font-size: 0.8125rem;
    color: var(--text-lighter);
    margin-bottom: 8px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 11px 12px;
    background: var(--light-bg);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    font-size: 0.9375rem;
}

.option-label:hover {
    background: #f3f0ed;
}

.option-label input {
    margin-right: 10px;
    accent-color: var(--primary);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.option-label span {
    flex: 1;
}

/* Form Actions */
.form-actions,
.review-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    justify-content: flex-end;
}

.form-actions .btn,
.review-actions .btn {
    flex: 1;
}

/* Review Page */
.review-section {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-section h3 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.review-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-item {
    display: flex;
    gap: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
}

.review-value {
    color: var(--text-light);
    flex: 1;
}

/* Profile Created Page */
.profile-created-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.success-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.success-card h2 {
    margin-bottom: 12px;
}

.success-message {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.profile-summary {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px;
}

.profile-summary h3 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.json-output {
    background: var(--light-bg);
    padding: 16px;
    border-radius: 2px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-dark);
    border-left: 2px solid var(--primary);
    font-family: 'Monaco', 'Courier New', monospace;
}

.profile-framing {
    text-align: center;
    margin-bottom: 32px;
}

.profile-framing p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.next-steps {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.next-steps .btn {
    min-width: 160px;
}

/* Recipe Page */
.recipe-page {
    animation: fadeIn 0.3s ease;
}

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

.recipe-intro {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 48px;
    text-align: center;
    margin-bottom: 32px;
}

.recipe-intro h1 {
    font-family: var(--serif);
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.recipe-feeling {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 12px;
}

.recipe-source {
    color: var(--text-lighter);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    font-style: normal;
}

.recipe-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 48px;
    margin-bottom: 32px;
}

.dish-header {
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.dish-header h2 {
    font-family: var(--serif);
    color: var(--text-dark);
    font-size: 2.25rem;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.dish-context {
    color: var(--text-light);
    font-size: 0.9375rem;
    font-style: italic;
}

.recipe-section {
    margin-bottom: 52px;
}

.recipe-section h3 {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ingredient-group {
    margin-bottom: 18px;
}

.ingredient-group:last-child {
    margin-bottom: 0;
}

.ingredient-group-name {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.ingredient-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ingredient-list li {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.6;
    padding-left: 12px;
    position: relative;
}

.ingredient-list li:before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-lighter);
}

.method-list {
    list-style: none;
    counter-reset: method-counter;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.method-list li {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.7;
    padding-left: 28px;
    position: relative;
}

.method-list li:before {
    content: counter(method-counter);
    counter-increment: method-counter;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8125rem;
}

.why-section {
    background: rgba(248, 247, 246, 0.5);
    padding: 24px 20px;
    margin: 0 -20px 52px -20px;
}

.recipe-card .why-section {
    margin: 0 -48px 52px -48px;
    padding: 28px 48px;
}

.why-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.why-list li {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.6;
    padding-left: 12px;
    position: relative;
}

.why-list li:before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-lighter);
}

.version-text {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.recipe-closing {
    text-align: center;
    margin-bottom: 44px;
    padding-bottom: 44px;
    border-bottom: 1px solid var(--border);
}

.recipe-closing p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.8;
    font-style: italic;
}

.recipe-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    text-align: center;
}

.recipe-footer p {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.8;
}

.recipe-footer p:first-child {
    font-weight: 500;
}

/* Saved Session */
.saved-session {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px;
    margin-bottom: 32px;
    border-left: 2px solid var(--primary);
}

.saved-session h3 {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.session-description {
    color: var(--text-lighter);
    font-size: 0.8125rem;
    margin-bottom: 12px;
}

.session-json {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 12px;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-dark);
    overflow-x: auto;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.btn-copy {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 2px;
    font-size: 0.8875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-copy:hover {
    background: #3f4556;
}

.btn-copy:active {
    opacity: 0.95;
}

.recipe-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.recipe-actions .btn {
    min-width: 160px;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    color: var(--error);
    padding: 12px 16px;
    border-radius: 2px;
    margin-bottom: 20px;
    border-left: 2px solid var(--error);
    font-size: 0.9375rem;
}

/* Content Pages (About, How It Works, Privacy, Contact) */
.content-page {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.page-header {
    text-align: center;
    margin-bottom: 16px;
}

.page-header h2 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

.content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 48px;
}

.content-section {
    margin-bottom: 36px;
}

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

.content-section h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.content-section p {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

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

.content-section a {
    color: var(--primary);
    text-decoration: underline;
}

.content-section a:hover {
    color: var(--text-dark);
}

.privacy-list,
.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.privacy-list li,
.contact-list li {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
}

.privacy-list li:before,
.contact-list li:before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-lighter);
}

.text-link {
    color: var(--primary);
    text-decoration: underline;
}

.text-link:hover {
    color: var(--text-dark);
}

.page-cta {
    text-align: center;
    margin-top: 16px;
}

/* How It Works Steps */
.steps-overview {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-item {
    display: flex;
    gap: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 32px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--serif);
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h3 {
    font-family: var(--serif);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Recipe Library */
.recipe-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.library-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.library-card-header {
    margin-bottom: 16px;
}

.library-card-header h3 {
    font-family: var(--serif);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.recipe-feeling {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

.library-card-body {
    flex: 1;
    margin-bottom: 20px;
}

.recipe-context {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-card-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.recipe-rating-indicator {
    font-size: 0.75rem;
    color: var(--text-lighter);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.library-actions {
    margin-top: 32px;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 48px;
}

.empty-icon {
    color: var(--text-lighter);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto 24px;
}

.empty-cta {
    margin-top: 8px;
}

/* Feedback Section */
.feedback-section {
    margin-top: 48px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.feedback-section h3 {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
}

.feedback-form {
    max-width: 480px;
    margin: 0 auto;
}

.rating-scale {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 2px;
    transition: background 0.2s ease;
}

.rating-option:hover {
    background: var(--light-bg);
}

.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-option input[type="radio"]:checked + .rating-value {
    background: var(--primary);
    color: var(--white);
}

.rating-value {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.rating-option .rating-label {
    font-size: 0.6875rem;
    color: var(--text-lighter);
    text-align: center;
    white-space: nowrap;
}

.feedback-note-field {
    margin-bottom: 16px;
}

.feedback-note-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: var(--sans);
    font-size: 0.8125rem;
    color: var(--text-dark);
    resize: vertical;
    background: var(--white);
}

.feedback-note-field textarea::placeholder {
    color: var(--text-lighter);
}

.feedback-note-field textarea:focus {
    outline: none;
    border-color: var(--text-light);
}

.btn-feedback {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: var(--sans);
    font-size: 0.8125rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-feedback:hover {
    background: var(--light-bg);
    border-color: var(--text-light);
    color: var(--text-dark);
}

.feedback-saved {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.feedback-confirmation {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 16px;
}

.feedback-display {
    padding: 16px;
    background: var(--light-bg);
    border-radius: 2px;
}

.feedback-rating-display {
    font-size: 0.8125rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.feedback-rating-display .rating-label {
    color: var(--text-lighter);
    margin-left: 8px;
}

.feedback-note-display {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 32px 16px;
    }

    .app-header h1 {
        font-size: 1.5rem;
    }

    /* Mobile Navigation */
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        border-top: none;
        padding-top: 0;
    }

    .main-nav.open {
        display: block;
        border-top: 1px solid var(--border);
        padding-top: 16px;
        margin-top: 16px;
    }

    .nav-links {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .nav-links a {
        padding: 8px 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        padding: 36px 28px;
    }

    .hero h2 {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }

    .step-card,
    .review-card,
    .success-card,
    .recipe-card,
    .recipe-intro,
    .content-card {
        padding: 32px 24px;
    }

    .step-card h2,
    .review-card h2 {
        font-size: 1.5rem;
    }

    .dish-header h2 {
        font-size: 1.5rem;
    }

    .form-actions,
    .review-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn,
    .review-actions .btn {
        width: 100%;
    }

    .recipe-actions .btn {
        min-width: 120px;
        width: 100%;
    }

    .review-item {
        flex-direction: column;
    }

    .review-label {
        min-width: auto;
        font-weight: 600;
    }

    .saved-session {
        padding: 20px 16px;
    }

    .session-json {
        font-size: 0.7rem;
        max-height: 240px;
    }

    .step-item {
        flex-direction: column;
        gap: 16px;
    }

    .recipe-library-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 24px 12px;
    }

    .app-header {
        padding: 24px 16px;
    }

    .app-header h1 {
        font-size: 1.25rem;
    }

    .intro-text,
    .review-subtitle {
        font-size: 0.9375rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .recipe-intro h1 {
        font-size: 1.25rem;
    }

    .dish-header h2 {
        font-size: 1.375rem;
    }
}

/* iOS-like Card Interactions */
.library-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1), 
                box-shadow 0.15s cubic-bezier(0.2, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    padding: 24px;
}

.library-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.library-card.pressed {
    transform: scale(0.985);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.library-card.navigating {
    opacity: 0.7;
}

.library-card.navigating::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 0.4s ease-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Recipe chips */
.recipe-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.recipe-chip {
    display: inline-block;
    padding: 3px 10px;
    background: var(--light-bg);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
}

.recipe-chip.diet {
    background: #e8f5e9;
    color: #2e7d32;
}

.recipe-chip.vibe {
    background: #fff3e0;
    color: #e65100;
}

/* Improved card typography */
.library-card-header h3 {
    font-size: 1.1875rem;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-card .recipe-feeling {
    font-size: 0.8125rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.library-card-body {
    margin-bottom: 16px;
}

.library-card .recipe-context {
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
    color: var(--text-lighter);
}

/* Card footer with hairline divider */
.library-card-footer {
    border-top: 0.5px solid var(--border);
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.recipe-rating-indicator {
    margin-bottom: 0;
    color: #f59e0b;
    font-size: 0.8125rem;
}

/* Ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Button polish */
.library-card .btn-secondary {
    padding: 10px 20px;
    font-size: 0.8125rem;
    border-radius: 8px;
    font-weight: 600;
    min-height: 40px;
}

/* Sticky CTA button */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 20px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: none;
}

.sticky-cta .btn {
    width: 100%;
    border-radius: 12px;
    font-weight: 600;
}

/* Scroll fade overlay */
.scroll-fade-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, var(--white) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 50;
}

.scroll-fade-top.visible {
    opacity: 1;
}

/* Library actions spacing */
.library-actions {
    margin-top: 40px;
    margin-bottom: 80px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .library-card {
        transition: none;
    }
    
    .library-card.pressed {
        transform: none;
    }
    
    .library-card.navigating::after {
        animation: none;
    }
    
    .ripple {
        animation: none;
    }
}

/* Mobile sticky CTA */
@media (max-width: 768px) {
    .sticky-cta {
        display: block;
    }
    
    .library-actions {
        display: none;
    }
    
    .library-card {
        padding: 20px;
    }
    
    .library-card-footer .btn {
        padding: 12px 24px;
        min-height: 44px;
    }
    
    .content-page {
        padding-bottom: 100px;
    }
}
