/* LP お試しデモ */

:root {
    --demo-primary: #7c3aed;
    --demo-primary-dark: #6d28d9;
    --demo-bg: #f8fafc;
    --demo-text: #1e293b;
    --demo-muted: #64748b;
    --demo-border: #e2e8f0;
}

* { box-sizing: border-box; }

body.lp-demo-page {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--demo-bg);
    color: var(--demo-text);
    line-height: 1.5;
}

.lp-demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--demo-border);
}

.lp-demo-logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--demo-primary);
    text-decoration: none;
}

.lp-demo-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--demo-primary);
    background: rgba(124, 58, 237, 0.1);
    padding: 4px 10px;
    border-radius: 999px;
}

.lp-demo-main {
    padding: 32px 16px 64px;
}

.lp-demo-container {
    max-width: 560px;
    margin: 0 auto;
}

.lp-demo-container--wide {
    max-width: 1100px;
}

.lp-demo-title {
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 800;
    margin: 0 0 10px;
}

.lp-demo-lead {
    color: var(--demo-muted);
    font-size: 0.95rem;
    margin: 0 0 28px;
    line-height: 1.6;
}

.lp-demo-form {
    background: #fff;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.lp-demo-field {
    margin-bottom: 18px;
}

.lp-demo-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.lp-demo-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.lp-demo-field .req {
    color: #dc2626;
    font-size: 0.75rem;
    margin-left: 4px;
}

.lp-demo-field input[type="text"],
.lp-demo-field input[type="url"],
.lp-demo-field input[type="tel"],
.lp-demo-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--demo-border);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.lp-demo-field input[type="file"] {
    font-size: 0.875rem;
}

.lp-demo-hint {
    font-size: 0.8rem;
    color: var(--demo-muted);
    margin: 6px 0 0;
}

.lp-demo-hint.is-ok { color: #059669; }
.lp-demo-hint.is-warn { color: #d97706; }
.lp-demo-hint.is-error { color: #dc2626; }

.lp-demo-link-btn {
    margin-top: 8px;
    background: none;
    border: none;
    color: var(--demo-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.lp-demo-actions {
    margin-top: 24px;
}

.lp-demo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.lp-demo-btn--primary {
    background: var(--demo-primary);
    color: #fff;
}

.lp-demo-btn--primary:hover {
    background: var(--demo-primary-dark);
}

.lp-demo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* スクレイピングオーバーレイ（cast_data 同系） */
.scraping-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.scraping-overlay.show {
    display: flex;
}

.scraping-overlay-content {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.scraping-spinner {
    font-size: 2.5rem;
    color: var(--demo-primary);
    margin-bottom: 16px;
}

.scraping-overlay-title {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: pre-line;
    line-height: 1.5;
    margin-bottom: 12px;
}

.scraping-overlay-sites .site-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 4px;
}

.scraping-overlay-sites .site-chip.running {
    background: rgba(124, 58, 237, 0.12);
    color: var(--demo-primary);
}

.scraping-overlay-sites .site-chip.done {
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}

.scraping-overlay-progress {
    font-size: 0.85rem;
    color: var(--demo-muted);
    margin: 12px 0 0;
}

/* テンプレート選択（manage 同系） */
.tpl-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.tpl-info i {
    color: var(--demo-primary);
    margin-top: 2px;
}

.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tpl-card {
    background: #fff;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.tpl-preview {
    padding: 20px;
    min-height: 120px;
}

.tpl-color-sample {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tpl-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.tpl-fs-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.tpl-fs-label {
    opacity: 0.6;
    min-width: 48px;
}

.tpl-body {
    padding: 16px;
    border-top: 1px solid var(--demo-border);
}

.tpl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.tpl-name {
    font-weight: 700;
    font-size: 1rem;
}

.tpl-description {
    font-size: 0.85rem;
    color: var(--demo-muted);
    line-height: 1.5;
}

.tpl-preview-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--demo-border);
    border-radius: 8px;
    background: #fff;
    color: var(--demo-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    border-color: var(--demo-primary);
    color: var(--demo-primary);
}

.tpl-preview-mobile {
    border: 1px solid var(--demo-border);
    background: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.demo-show-mobile-only { display: none; }

@media (max-width: 768px) {
    .demo-show-desktop-only { display: none !important; }
    .demo-show-mobile-only { display: inline-flex !important; }
    .lp-demo-field-row {
        grid-template-columns: 1fr;
    }
}

/* LP CTA（#pricing 直上） */
.lp-section--demo-cta {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
}

.lp-demo-cta {
    text-align: center;
    padding: 8px 0;
}

.lp-demo-cta__title {
    font-size: clamp(1.35rem, calc((100vw - 48px) / 14), 1.85rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.lp-demo-cta__lead {
    max-width: 520px;
    margin: 0 auto 24px;
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.92;
}

.lp-demo-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: var(--demo-primary);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.lp-demo-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .lp-demo-cta__btn {
        display: flex;
        width: 100%;
        justify-content: center;
    }
}
