/* CSS Variables */
:root {
    /* Colors */
    --c-cyan: hsl(188, 78%, 50%);
    --c-cyan-600: hsl(188, 82%, 42%);
    --c-cyan-700: hsl(188, 86%, 36%);
    --c-bg: #fafbfc;
    --c-surface: #ffffff;
    --c-surface-elevated: #ffffff;
    --c-text: #1a202c;
    --c-text-muted: #64748b;
    --c-border: #e2e8f0;
    --c-border-light: #f1f5f9;
    --c-white: #ffffff;
    
    /* Layout */
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 20px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 25px 50px rgba(0, 0, 0, 0.15);
    --container-width: 1200px;
    --section-padding: 4rem 0;
    
    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    background-color: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    font-size: var(--text-base);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--c-text);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.header-brand h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--c-cyan);
    margin: 0;
}
.brand-sub {
    margin: 0;
    padding: 0;
    font-size: var(--text-sm);
    color: var(--c-text-muted);
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--c-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--c-cyan);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--c-cyan);
    color: var(--c-white);
    box-shadow: var(--shadow-md);
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--c-cyan-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: var(--c-white);
    color: var(--c-cyan);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow);
}

.btn-ghost:hover {
    background: var(--c-cyan);
    color: var(--c-white);
    border-color: var(--c-cyan);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 5rem 0;
}

.key-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.key-point {
    background: var(--c-white);
    border: 1px solid var(--c-border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.key-point:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.key-point-icon {
    font-size: 60px;     /* 絵文字を大きく */
  line-height: 1.2;    /* 上下の余白を調整 */
    display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;  /* 下に少しスペース */
}

.key-point h3 {
    font-size: var(--text-xl);
    margin-bottom: 0.5rem;
    color: var(--c-cyan);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--c-text), var(--c-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--c-cyan);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--c-text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-mockup {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Features */
.features {
    background: var(--c-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--c-white);
    border: 1px solid var(--c-border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-border);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: var(--text-xl);
    margin-bottom: 1rem;
    color: var(--c-cyan);
}

/* Specifications */
.specifications {
    background: var(--c-bg);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.spec-table {
    width: 100%;
    background: var(--c-white);
    border-collapse: collapse;
    border: 1px solid var(--c-border-light);
}

.spec-table th,
.spec-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--c-border-light);
}

.spec-table th {
    background: var(--c-cyan);
    color: var(--c-white);
    font-weight: 600;
}

.spec-table tr:hover {
    background: var(--c-bg);
}

/* Pricing Calculator */
.pricing {
    background: var(--c-bg);
}

.pricing-calculator {
    background: var(--c-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--c-border-light);
}

.calculator-section {
    padding: 2rem;
    border-bottom: 1px solid var(--c-border);
}

.calculator-section:last-child {
    border-bottom: none;
}

.calculator-section h3 {
    font-size: var(--text-xl);
    margin-bottom: 1.5rem;
    color: var(--c-cyan);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--c-cyan);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.product-card.selected {
    border-color: var(--c-cyan);
    box-shadow: 0 0 0 2px rgba(34, 139, 230, 0.1);
    background: rgba(34, 139, 230, 0.02);
}

.product-card h4 {
    color: var(--c-cyan);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--c-white);
}

.product-specs {
    margin-top: 1rem;
    font-size: var(--text-sm);
    color: var(--c-text-muted);
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: var(--c-text);
}

.input-group input,
.input-group select {
    padding: 0.75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-text);
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--c-cyan);
    box-shadow: 0 0 0 3px rgba(34, 139, 230, 0.1);
    transform: translateY(-1px);
}

.input-unit {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-muted);
    pointer-events: none;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Quote Summary */
.quote-summary {
    background: var(--c-bg);
    border-top: 1px solid var(--c-border-light);
}

.quote-details {
    margin-bottom: 2rem;
}

.quote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--c-border);
}

.quote-row.total {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--c-cyan);
    border-bottom: 2px solid var(--c-cyan);
    background: rgba(34, 139, 230, 0.02);
    padding: 1rem 0;
    border-radius: var(--radius);
    margin-top: 0.5rem;
}

.quote-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Timeline */
.timeline {
    background: var(--c-bg);
}

.timeline-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--c-white);
    border: 1px solid var(--c-border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.timeline-icon {
    width: 4rem;
    height: 4rem;
    background: var(--c-cyan);
    color: var(--c-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    color: var(--c-cyan);
    margin-bottom: 0.5rem;
}

.timeline-duration {
    color: var(--c-cyan);
    font-weight: 600;
    font-size: var(--text-sm);
    margin-top: 0.5rem;
}

/* FAQ */
.faq {
    background: var(--c-bg);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--c-white);
    border: 1px solid var(--c-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item summary {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--c-cyan);
    border-bottom: 1px solid var(--c-border-light);
    list-style: none;
    transition: all 0.2s ease;
}

.faq-item summary:hover {
    background: var(--c-bg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    float: right;
    font-size: var(--text-xl);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 1.5rem;
    line-height: 1.7;
    color: var(--c-text-muted);
}

/* Fixed CTA */
.fixed-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--c-border-light);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform .25s ease, opacity .25s ease;
    padding: 1rem 0;
}

.cta-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-text {
    display: flex;
    flex-direction: column;
}

.cta-title {
    font-weight: 700;
    color: var(--c-white);
}

.cta-subtitle {
    font-size: var(--text-sm);
    color: var(--c-cyan);
}

.cta-button {
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: var(--c-bg);
    border-top: 1px solid var(--c-border-light);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--c-cyan);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a,
.footer-link {
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover,
.footer-link:hover {
    color: var(--c-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
    color: var(--c-text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--c-white);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--c-border-light);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--c-border-light);
    background: var(--c-bg);
}

.modal-header h2 {
    color: var(--c-cyan);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--text-3xl);
    color: var(--c-text-muted);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: 2rem;
    border-top: 1px solid var(--c-border-light);
    background: var(--c-bg);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Quote Form Styles */
.quote-form-section {
    padding: 1.5rem;
    background: var(--c-bg);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.quote-form-section h3 {
    color: var(--c-cyan);
    margin-bottom: 1.5rem;
    font-size: var(--text-xl);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quote-form-actions {
    text-align: center;
}

.quote-display-section {
    padding: 0;
}

/* Quote Document Styles */
.quote-document {
    font-family: var(--font-system);
    line-height: 1.6;
    padding: 2rem;
    background: var(--c-white);
    border-radius: var(--radius);
    margin: 1rem;
}

.quote-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--c-cyan);
}

.quote-header h2 {
    font-size: var(--text-3xl);
    color: var(--c-text);
    margin-bottom: 1rem;
}

.quote-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: var(--text-sm);
    color: var(--c-text-muted);
}

.quote-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--c-bg);
    border-radius: var(--radius);
}

.quote-client, .quote-issuer {
    text-align: left;
}

.quote-client h4, .quote-issuer h4 {
    color: var(--c-cyan);
    margin-bottom: 1rem;
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--c-border-light);
    padding-bottom: 0.5rem;
}

.client-info, .issuer-info {
    line-height: 1.8;
}

.client-info strong, .issuer-info strong {
    font-size: var(--text-lg);
    color: var(--c-text);
}

.quote-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--c-bg);
    border-radius: var(--radius);
}

.quote-summary h4 {
    color: var(--c-cyan);
    margin-bottom: 1rem;
    font-size: var(--text-lg);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    font-weight: 500;
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.quote-table th,
.quote-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--c-border-light);
}

.quote-table th {
    background: var(--c-cyan);
    color: var(--c-white);
    font-weight: 600;
}

.quote-table td {
    background: var(--c-white);
}

.quote-table tr:last-child td {
    border-bottom: none;
}

.quote-total {
    text-align: center;
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--c-cyan);
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(34, 139, 230, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(34, 139, 230, 0.1);
}

.quote-notes {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--c-bg);
    border-radius: var(--radius);
}

.quote-notes h4 {
    color: var(--c-cyan);
    margin-bottom: 1rem;
    font-size: var(--text-lg);
}

.quote-notes ul {
    margin-left: 1.5rem;
    line-height: 1.8;
}

.quote-notes li {
    margin-bottom: 0.5rem;
    color: var(--c-text-muted);
}

.quote-contact {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--c-border-light);
    margin-top: 2rem;
}

.quote-contact p {
    margin-bottom: 0.5rem;
}

.quote-contact a {
    color: var(--c-cyan);
    font-weight: 600;
    text-decoration: none;
}

.quote-contact a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .key-points {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
    
    .cta-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .quote-actions {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .timeline-container {
        grid-template-columns: 1fr;
    }
    
    .quote-parties {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quote-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .quote-document {
        padding: 1rem;
        margin: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .modal-content {
        width: 95%;
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 0.5rem;
    }
    
    .quote-document {
        padding: 0.5rem;
        margin: 0;
    }
    
    .quote-header h2 {
        font-size: var(--text-2xl);
    }
    
    .quote-total {
        font-size: var(--text-xl);
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .fixed-cta,
    .footer,
    .modal-footer {
        display: none;
    }
    
    .modal {
        position: static;
        background: none;
        display: block !important;
    }
    
    .modal-content {
        box-shadow: none;
        max-width: none;
        width: 100%;
    }
}

/* --- Choice Cards --- */
.choice-card {
  display:flex; align-items:center; gap:14px;
  padding:12px 14px; border:1px solid #e5e7eb; border-radius:12px;
  background:#fff; cursor:pointer; transition:border-color .15s, box-shadow .15s, background .15s;
  user-select:none;
}
.choice-card + .choice-card { margin-top:10px; }
.choice-card input { position:absolute; opacity:0; pointer-events:none; }
.choice-card .choice-img {
  width:72px; height:72px; object-fit:cover; border-radius:10px; border:1px solid #eef2f7;
  background:#f8fafc;
}
.choice-card .choice-body { display:flex; flex-direction:column; gap:4px; }
.choice-title { font-weight:600; }
.choice-sub { font-size:12px; color:#6b7280; }
.badge {
  margin-left:8px; font-size:11px; padding:2px 6px; border-radius:999px;
  border:1px solid #d1fae5; color:#059669; background:#ecfdf5;
}

/* selected/hover */
.choice-card:hover { border-color:#cdeffd; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.choice-card.selected { border-color:#06b6d4; box-shadow:0 0 0 3px rgba(6,182,212,.15); }
.choice-card.radio.selected { background:#f0fdff; }
.choice-card.checkbox.selected { background:#f8feff; }

/* レイアウト（スマホ=1列, PC=2列） */
.hardware-group, .addons-group { display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width: 768px){
  .hardware-group, .addons-group { grid-template-columns:1fr 1fr; }
}

/* Fixed CTA metrics */
.fixed-cta .cta-metrics{
  display:flex; align-items:center; gap:1.25rem;
  padding:0.25rem 0.5rem; border-radius:9999px;
  background:rgba(255,255,255,0.7); backdrop-filter:saturate(180%) blur(8px);
}
.fixed-cta .metric{display:flex; gap:.5rem; align-items:baseline; white-space:nowrap;}
.fixed-cta .metric-label{font-size:.85rem; color:#64748b;}
.fixed-cta .metric-value{font-weight:600; color:#0f172a;}
.fixed-cta .metric-value.strong{font-weight:800; color:#0891b2;}
@media (max-width: 640px){
  .fixed-cta .cta-content{gap:.75rem}
  .fixed-cta .cta-metrics{gap:.75rem; padding:.2rem .5rem}
  .fixed-cta .metric-label{display:none;} /* モバイルは数値だけにして省スペース */
}


/* --- Print: quote only --- */
@media print {
  /* まず全て隠す */
  body * { visibility: hidden !important; }

  /* モーダル内の見積書だけ表示対象にする */
  #quoteModal, 
  #quoteModal .quote-display-section,
  #quoteModal .quote-document,
  #quoteModal .quote-document * {
    visibility: visible !important;
  }

  /* 画面中央固定のレイアウトを解除して紙面に合わせる */
  #quoteModal { position: static !important; inset: auto !important; }
  #quoteModal .modal-content { 
    box-shadow: none !important; 
    border: 0 !important;
    width: auto !important;
    margin: 0 !important;
  }

  /* 余白と用紙サイズ（A4想定） */
  @page { size: A4; margin: 12mm; }

  /* 改ページ最適化（必要に応じて） */
  .quote-header, .quote-summary, .quote-table, .quote-notes { 
    break-inside: avoid; 
    page-break-inside: avoid;
  }
}


/* モーダルが開いている間は下に退避＆クリック無効 */
.modal-open .fixed-cta{
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

/* ==== Fixed CTA（壊れた時用に強制上書き）==== */
.fixed-cta{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid #e6eef5;
  box-shadow: 0 -8px 24px rgba(16,24,40,.08);
  padding: 12px 16px;
}

/* 横並びを強制 */
.fixed-cta .cta-content{
  max-width: 1200px;
  margin: 0 auto;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* 左側の数値ブロック */
.fixed-cta .cta-metrics{
  display: flex !important;
  align-items: baseline;
  gap: 32px;
  flex-wrap: wrap;
}

.fixed-cta .metric{
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.fixed-cta .metric .label{
  color: #667085;
  font-weight: 600;
  font-size: 14px;
}

.fixed-cta .metric .value{
  color: #0F172A;
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
}

.fixed-cta .metric .value.total{
  color: #06b6d4; /* 合計はアクセント */
}

/* 右のボタン */
.fixed-cta .cta-button{
  white-space: nowrap;
}

/* モバイル最適化 */
@media (max-width: 640px){
  .fixed-cta .cta-content{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .fixed-cta .cta-metrics{
    gap: 16px;
    justify-content: space-between;
  }
}

/* 印刷時は非表示 */
@media print{
  .fixed-cta{ display: none !important; }
}

/* 本文がCTAに隠れないよう下余白 */
body.has-fixed-cta{
  padding-bottom: 84px;
}
/* ======= Mobile fine-tuning ======= */
@media (max-width: 480px) {

  /* --- ヘッダー（タイトル & タブ） --- */
  .site-header .title,
  .site-header h1,
  .hero h1 {
    font-size: clamp(18px, 5.4vw, 22px);
    line-height: 1.15;
    letter-spacing: .02em;
  }
  .site-header .subtitle,
  .hero .subtitle {
    font-size: 12px;
    opacity: .9;
  }
  .site-header .nav,
  .hero .nav {
    gap: 14px;
  }
  .site-header .nav a,
  .hero .nav a {
    font-size: 14px;
    padding: 6px 2px;
  }

  /* --- 固定フッター CTA --- */
  .fixed-cta {
    padding: 10px 12px;
  }
  .fixed-cta .cta-content {
    gap: 10px;
  }

  /* 単価・数量・合計を1行に収める */
  .fixed-cta .cta-metrics {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    white-space: nowrap;
  }
  .fixed-cta .cta-metrics .item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0; /* 省スペース */
  }
  .fixed-cta .cta-metrics .label {
    font-size: 12px;
    color: #6b7280; /* gray-500 */
    letter-spacing: .02em;
  }
  .fixed-cta .cta-metrics .value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
  }
  /* 値（合計など）が長いとき省略しないように */
  .fixed-cta .value { overflow: visible; text-overflow: clip; }

  /* ボタンは高さを少しだけ控えめに */
  .fixed-cta .cta-button {
    padding: 12px 14px;
    font-size: 16px;
    min-height: 44px; /* タップしやすさ確保 */
  }
}

/* もう少し詰めたいとき（超小画面用） */
@media (max-width: 360px) {
  .fixed-cta .cta-metrics .label { font-size: 11px; }
  .fixed-cta .cta-metrics .value { font-size: 16px; }
  .site-header .nav a { font-size: 13px; }
}
