        @import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+Antique:wght@700;900&display=swap');

        * {
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Source Sans 3', sans-serif;
            background-color: #f4f5f6;
            color: #2B3034;
        }

        /* Brand header bar - #832C34 (El Salva) */
        .brand-header {
            background-color: #832C34;
            color: #ffffff;
            min-height: 72px;
            padding: 1.5rem 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 3px rgba(43, 48, 52, 0.15);
        }
        .brand-header a {
            color: #ffffff;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .brand-header a:hover {
            color: rgba(255, 255, 255, 0.95);
        }
        .brand-header-icon {
            width: 48px;
            height: 48px;
            border: 3px solid #ffffff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
        }
        .brand-header-icon svg {
            stroke-width: 2.5;
        }

        /* Blueprint grid background - like old drafting paper */
        .blueprint-grid {
            background-color: #f4f5f6;
            background-image: 
                linear-gradient(#eef0f2 1px, transparent 1px),
                linear-gradient(90deg, #eef0f2 1px, transparent 1px),
                linear-gradient(#e5e7eb 0.5px, transparent 0.5px),
                linear-gradient(90deg, #e5e7eb 0.5px, transparent 0.5px);
            background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
        }

        /* Decorative corner marks like architectural drawings */
        .corner-marks::before,
        .corner-marks::after {
            content: '';
            position: absolute;
            width: 40px;
            height: 40px;
            border-color: #9ca3af;
            opacity: 0.5;
        }
        .corner-marks::before {
            top: -1px;
            left: -1px;
            border-top: 2px solid;
            border-left: 2px solid;
        }
        .corner-marks::after {
            bottom: -1px;
            right: -1px;
            border-bottom: 2px solid;
            border-right: 2px solid;
        }

        /* Main card with paper texture feel */
        .paper-card {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f4f5f6 100%);
            box-shadow: 
                0 1px 3px rgba(43, 48, 52, 0.08),
                0 8px 32px rgba(43, 48, 52, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
        }

        /* Upload dropzone - like a drafting table area */
        .dropzone {
            border: 2px dashed #d1d5db;
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            transition: all 0.3s ease;
            position: relative;
        }
        
        .dropzone::before {
            content: '';
            position: absolute;
            inset: 8px;
            border: 1px solid #e5e7eb;
            pointer-events: none;
        }
        
        .dropzone:hover,
        .dropzone.dragover {
            border-color: #832C34;
            background: linear-gradient(135deg, #ffffff 0%, #f4f5f6 100%);
        }

        /* Hide file inputs only when they are used with custom dropzones */
        .dropzone input[type="file"] {
            display: none;
        }

        /* Loading Animation - compass style */
        .loader {
            width: 24px;
            height: 24px;
            border: 2px solid #e5e7eb;
            border-radius: 50%;
            border-top-color: #832C34;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Pulse animation for loading text */
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .animate-pulse {
            animation: pulse 2s ease-in-out infinite;
        }

        /* Button - brand accent (El Salva) */
        .btn-architectural {
            background: linear-gradient(135deg, #832C34 0%, #6b252c 100%);
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .btn-architectural::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 50%;
            background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
            pointer-events: none;
        }
        
        .btn-architectural:hover {
            background: linear-gradient(135deg, #9a3942 0%, #7a2d34 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(131, 44, 52, 0.3);
        }

        /* HTMX indicator - use opacity for HTMX compatibility */
        .htmx-indicator {
            opacity: 0;
            transition: opacity 200ms ease-in;
        }
        
        .htmx-request .htmx-indicator {
            opacity: 1;
        }
        
        .htmx-request.htmx-indicator {
            opacity: 1;
        }
        
        /* Hide text during request */
        .hide-on-request {
            transition: opacity 200ms ease-in;
        }
        
        .htmx-request .hide-on-request {
            opacity: 0;
        }

        /* Disable button during request */
        .htmx-request button[type="submit"],
        form.htmx-request button[type="submit"] {
            opacity: 0.7;
            cursor: not-allowed;
            pointer-events: none;
        }

        /* Typography for headings */
        .heading-serif {
            font-family: 'M PLUS 1p', 'Noto Sans JP', 'Source Sans 3', sans-serif;
            letter-spacing: 0.01em;
            font-variant-numeric: lining-nums tabular-nums;
            font-feature-settings: "lnum" 1, "tnum" 1;
        }

        .heading-brand {
            font-family: 'Zen Kaku Gothic Antique', 'M PLUS 1p', 'Noto Sans JP', 'Source Sans 3', sans-serif;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-shadow: 1px 1px 0 rgba(43, 48, 52, 0.28);
        }

        /* Result/Prose Styles - like technical documentation */
        .prose {
            line-height: 1.8;
            font-family: 'Source Sans 3', sans-serif;
        }
        .prose h1 { 
            font-family: 'M PLUS 1p', 'Noto Sans JP', 'Source Sans 3', sans-serif;
            font-size: 1.75rem; 
            font-weight: 600; 
            margin: 0 0 1rem; 
            color: #2B3034;
            border-bottom: 2px solid #832C34;
            padding-bottom: 0.5rem;
            font-variant-numeric: lining-nums tabular-nums;
        }
        .prose h2 { 
            font-family: 'M PLUS 1p', 'Noto Sans JP', 'Source Sans 3', sans-serif;
            font-size: 1.25rem; 
            font-weight: 600; 
            margin: 1.5rem 0 0.75rem; 
            color: #2B3034;
            font-variant-numeric: lining-nums tabular-nums;
        }
        .prose h3 { 
            font-size: 1rem; 
            font-weight: 600; 
            margin: 1rem 0 0.5rem; 
            color: #4b5563; 
        }
        .prose p { margin: 0 0 1rem; color: #4b5563; }
        .prose ul, .prose ol { margin: 0 0 1rem 1.5rem; color: #4b5563; }
        .prose li { margin-bottom: 0.5rem; }
        .prose strong { font-weight: 600; color: #2B3034; }

        /* Table styles - like specification sheets */
        .prose table,
        #result table,
        #customer-result table {
            width: 100%;
            border-collapse: collapse;
            background: #ffffff;
            border: 1px solid #d1d5db;
            margin: 1rem 0;
            font-size: 0.875rem;
        }
        
        .prose thead,
        #result thead,
        #customer-result thead {
            background: linear-gradient(135deg, #f4f5f6 0%, #eef0f2 100%);
        }
        
        .prose th,
        #result th,
        #customer-result th {
            padding: 0.875rem 1rem;
            text-align: left;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #2B3034;
            border-bottom: 2px solid #832C34;
            font-family: 'Source Sans 3', sans-serif;
        }

        /* M-E Check: サマリー5件を横並び（PCで1行、スマホで2列） */
        .customer-summary-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        @media (min-width: 768px) {
            .customer-summary-grid {
                grid-template-columns: repeat(5, 1fr);
            }
        }

        /* Keep customer comparison header centered even with global table th defaults. */
        #customer-result table.customer-compare-table th,
        #customer-table-modal-content table.customer-compare-table th {
            text-align: center;
        }
        
        .prose td,
        #result td,
        #customer-result td {
            padding: 0.875rem 1rem;
            color: #4b5563;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .prose tr:last-child td,
        #result tr:last-child td,
        #customer-result tr:last-child td {
            border-bottom: none;
        }
        
        .prose tbody tr:hover,
        #result tbody tr:hover,
        #customer-result tbody tr:hover {
            background: #f4f5f6;
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        ::-webkit-scrollbar-track {
            background: #eef0f2;
        }
        ::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        /* File name display */
        .file-name {
            max-width: 280px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Decorative divider */
        .divider-ornament {
            display: flex;
            align-items: center;
            gap: 1rem;
            color: #6b7280;
        }
        .divider-ornament::before,
        .divider-ornament::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, transparent, #d1d5db, transparent);
        }

        /* Stamp/seal decoration */
        .seal {
            width: 48px;
            height: 48px;
            border: 2px solid #832C34;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #ffffff 0%, #f4f5f6 100%);
        }
