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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f7fafc;
    color: #2d3748;
    font-size: 15px;
    line-height: 1.6;
}

.how-header {
    background: #3498db;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.how-header h1 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.how-header .version {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #4f46e5;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: #6b7280;
    transition: color .2s;
}

.nav-links a:hover {
    color: #4f46e5;
}

.nav-cta {
    background: #4f46e5;
    color: #fff;
    padding: .5rem 1.25rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .9rem;
    transition: background .2s, transform .2s;
}

.nav-cta:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.how-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.section {
    margin-bottom: 56px;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    border-left: 4px solid #3498db;
    padding-left: 14px;
    margin-bottom: 20px;
}

.section-intro {
    color: #4a5568;
    margin-bottom: 24px;
    font-size: 15px;
}

.seco-callout {
    background: linear-gradient(135deg, #ebf8ff 0%, #e9d8fd 100%);
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.seco-callout .seco-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #3498db;
    margin-bottom: 6px;
}

.seco-callout p {
    color: #2d3748;
    font-size: 14px;
    margin-bottom: 8px;
}

.seco-callout p:last-child {
    margin-bottom: 0;
}

.seco-callout .pro-tip {
    background: rgba(255, 255, 255, 0.6);
    border-left: 3px solid #3498db;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #2b6cb0;
    font-weight: 600;
}

.seco-callout .pro-tip span {
    font-weight: 400;
    color: #2d3748;
}

.walkthrough {
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.walkthrough-title {
    background: #3498db;
    color: white;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.walkthrough-title .step-badge {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
}

.step {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
    align-items: flex-start;
}

.step:last-child {
    border-bottom: none;
}

.step-num {
    width: 26px;
    height: 26px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: #2d3748;
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.step-content p {
    color: #4a5568;
    font-size: 13px;
}

.step-content .tip {
    display: inline-block;
    background: #ebf8ff;
    color: #2b6cb0;
    border-radius: 4px;
    font-size: 12px;
    padding: 2px 8px;
    margin-top: 6px;
    font-weight: 600;
}

.step-content .warn {
    display: inline-block;
    background: #fff5e6;
    color: #c05621;
    border-radius: 4px;
    font-size: 12px;
    padding: 2px 8px;
    margin-top: 6px;
    font-weight: 600;
}

.ui-mock {
    background: #f7fafc;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 10px;
    font-size: 13px;
    color: #4a5568;
}

.ui-mock .mock-btn {
    display: inline-block;
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    color: #3498db;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 3px 3px 3px 0;
}

.ui-mock .mock-btn.active {
    background: #3498db;
    color: white;
}

.ui-mock .mock-btn.green {
    border-color: #27ae60;
    background: #27ae60;
    color: white;
}

.ui-mock .mock-btn.orange {
    border-color: #e67e22;
    background: #e67e22;
    color: white;
}

.ui-mock .mock-btn.red {
    border-color: #e74c3c;
    color: #e74c3c;
}

.ui-mock .mock-input {
    display: inline-block;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    color: #a0aec0;
    margin: 3px;
}

.ui-mock .mock-tag {
    display: inline-block;
    background: #edf2f7;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    color: #4a5568;
    margin: 2px;
}

.ui-mock .mock-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.ui-mock .mock-item {
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ui-mock .mock-item-icon {
    font-size: 18px;
    width: 26px;
    text-align: center;
}

.ui-mock .mock-item-name {
    font-weight: 600;
    font-size: 13px;
    flex: 1;
}

.ui-mock .mock-qty {
    background: #3498db;
    color: white;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.feature-card {
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    padding: 16px;
}

.feature-card .fc-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    color: #4a5568;
}

.ai-examples {
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
}

.ai-bubble {
    padding: 12px 16px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    gap: 4px;
    align-items: flex-start;
    flex-direction: column;
}

.ai-bubble:last-child {
    border-bottom: none;
}

.ai-bubble .bubble-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 60px;
    padding-top: 2px;
    min-width: unset;
}

.ai-bubble.user .bubble-label {
    color: #3498db;
}

.ai-bubble.ai .bubble-label {
    color: #27ae60;
}

.ai-bubble .bubble-text {
    font-size: 13px;
    color: #2d3748;
    flex: 1;
}

.ai-bubble .bubble-action {
    display: inline-block;
    background: #e8f5e9;
    color: #1b5e20;
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 8px;
    margin-top: 4px;
    font-weight: 600;
}

.ai-bubble.user {
    background: #f8faff;
}

.ai-bubble {
    padding: 16px;
    gap: 6px;
}

.ai-bubble .bubble-label {
    font-size: 10px;
    margin-bottom: 2px;
}

.ai-bubble .bubble-text {
    font-size: 14px;
    line-height: 1.6;
}

.ai-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
}

.ai-bubble {
    border-bottom: none;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

.divider {
    border: none;
    border-top: 2px solid #edf2f7;
    margin: 48px 0;
}

.pantry-guide-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#pantryGuideCloseBtn {
    display: none;
}

@media (max-width: 768px) {
    .how-nav a {
        padding: 10px 12px;
        font-size: 12px;
    }

    .section-title {
        font-size: 18px;
    }

    .nav-links {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 1rem;
        padding: 0 .75rem;
        white-space: nowrap;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .feature-close-btn {
        flex-shrink: 0;
    }
}