:root {
    --primary-color: #0284c7;        /* Sky Blue / Ocean */
    --primary-hover: #0369a1;
    --primary-subtle: #f0f9ff;
    --primary-border: #bae6fd;
    --accent-emerald: #059669;
    --accent-indigo: #4f46e5;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sub: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans JP', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    flex: 1;
}

/* 🏢 HEADER */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    background: var(--primary-subtle);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    text-align: center;
    white-space: nowrap;
}

.company-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0369a1;
    line-height: 1.25;
}

.company-loc {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.2;
}

.system-title {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.system-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-print-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-print-top:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* FORM CONTROLS */
.form-select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--primary-color);
}

/* GRID LAYOUTS */
.sim-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 1.5rem;
}

@media (max-width: 960px) {
    .sim-grid {
        grid-template-columns: 1fr;
    }
}

/* CARDS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
    transition: all 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* KPI BANNERS */
.kpi-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
    .kpi-banner {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.kpi-card.highlight {
    border-color: var(--primary-border);
    background: var(--primary-subtle);
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.kpi-value.green { color: #059669; }
.kpi-value.blue { color: #0284c7; }
.kpi-value.cyan { color: #0891b2; }

.kpi-subtext {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* COMPARISON BAR */
.comparison-box {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-sub);
    border-radius: var(--radius-md);
}

.comp-row {
    margin-bottom: 0.5rem;
}

.comp-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.comp-bar-bg {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.comp-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.comp-bar-fill.raw { background: #94a3b8; }
.comp-bar-fill.processed { background: linear-gradient(90deg, #0284c7, #059669); }

/* CALL TO ACTION BUTTONS */
.cta-banner {
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-top: 1.25rem;
}

.cta-buttons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.cta-btn-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.cta-web-btn {
    background: #ffffff;
    border: 1.5px solid #0284c7;
    color: #0284c7;
}

.cta-web-btn:hover {
    background: #f0f9ff;
    transform: translateY(-1px);
}

.cta-tel-btn {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}

.cta-tel-btn:hover {
    border-color: #0284c7;
    background: #f8fafc;
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .cta-buttons-row {
        grid-template-columns: 1fr;
    }
}

/* 3大強み・実績グリッド */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-box {
    padding: 1rem;
    background: var(--bg-sub);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.feature-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
}

.feature-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.feature-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.badge-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-blue { background: #e0f2fe; color: #0369a1; }

/* 🖨️ PRINT RULES */
.print-only {
    display: none;
}

@media print {
    body {
        background: #ffffff !important;
    }
    .app-header,
    .main-content {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
}
