/* ==========================================
   DX推進診断フローチャート - シンプルデザイン
   A4サイズ印刷対応
   ========================================== */

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

.page {
    background: white;
    max-width: 210mm; /* A4幅 */
    margin: 0 auto;
    padding: 20mm;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

/* ==========================================
   ヘッダー
   ========================================== */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.header h1 {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    margin-right: 8px;
}

.subtitle {
    font-size: 14px;
    color: #666;
}

/* ==========================================
   フローチャートコンテナ
   ========================================== */
.flowchart-container {
    min-height: 400px;
}

/* ==========================================
   ノード（共通スタイル）
   ========================================== */
.node {
    margin: 30px auto;
    max-width: 700px;
}

.node-content {
    background: white;
    border: 2px solid #333;
    border-radius: 4px;
    padding: 30px;
}

.node-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.node-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.node-number {
    display: inline-block;
    background: #333;
    color: white;
    padding: 6px 16px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* スタートノード */
.start-node .node-content {
    background: #333;
    color: white;
    border: none;
    text-align: center;
    padding: 40px 30px;
}

.start-node .node-title {
    color: white;
    font-size: 28px;
    margin-bottom: 20px;
}

.start-node p {
    color: #f5f5f5;
    font-size: 16px;
    margin-bottom: 30px;
}

/* 質問ノード */
.question-node .node-content {
    background: white;
}

/* ==========================================
   ボタン
   ========================================== */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 25px;
}

.button-group.vertical {
    flex-direction: column;
}

button {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 28px;
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #333;
}

button:hover {
    background: #333;
    color: white;
}

.btn-primary {
    background: white;
    color: #333;
    border: 3px solid white;
    font-size: 18px;
    font-weight: 700;
    padding: 18px 50px;
}

.btn-primary:hover {
    background: #f5f5f5;
    border-color: #f5f5f5;
    transform: scale(1.05);
}

.btn-restart {
    padding: 16px 40px;
    font-size: 16px;
}

/* ==========================================
   結果エリア
   ========================================== */
.result-area {
    animation: fadeIn 0.4s ease;
}

.result-card {
    border: 2px solid #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.result-summary {
    background: #f9f9f9;
    padding: 30px;
    border-bottom: 2px solid #333;
}

.phase-badge {
    display: inline-block;
    background: #333;
    color: white;
    padding: 6px 16px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
}

.result-summary h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.result-summary .description {
    font-size: 15px;
    color: #666;
}

.result-section {
    padding: 30px;
    border-bottom: 1px solid #e0e0e0;
}

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

.result-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.action-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px dashed #e0e0e0;
}

.action-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.action-item h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
}

.action-item p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.tools {
    font-size: 13px;
    color: #333;
}

.tools strong {
    display: block;
    margin-bottom: 8px;
}

.tool-tag {
    display: inline-block;
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 3px;
    margin-right: 6px;
    margin-bottom: 6px;
    font-size: 12px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-item h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
}

.info-item p {
    font-size: 15px;
    color: #666;
    font-weight: 600;
}

.tips {
    background: #f9f9f9;
}

.tips p {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
}

.next-step {
    background: #f9f9f9;
}

.next-step ol {
    padding-left: 24px;
}

.next-step li {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.8;
}

.restart-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-send-result {
    background: #333;
    color: white;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    min-width: 250px;
}

.btn-send-result:hover {
    background: #000;
}

.restart-area .btn-restart {
    flex: 1;
    min-width: 200px;
}

/* ==========================================
   フッター
   ========================================== */
.footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #333;
    text-align: center;
    font-size: 13px;
    color: #333;
}

.footer-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 25px;
}

.contact-info {
    background: #f9f9f9;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.company-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.contact-item {
    margin: 8px 0;
    font-size: 13px;
    color: #333;
}

.contact-item strong {
    display: inline-block;
    width: 50px;
    font-weight: 600;
}

.contact-info a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #333;
}

.contact-info a:hover {
    color: #666;
    border-bottom-color: #666;
}

/* ==========================================
   お問い合わせフォーム
   ========================================== */
.contact-form-area {
    animation: fadeIn 0.4s ease;
}

.form-card {
    border: 2px solid #333;
    border-radius: 4px;
    padding: 40px;
    background: white;
    max-width: 700px;
    margin: 0 auto;
}

.form-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.form-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.8;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.required {
    color: #d00;
    font-size: 12px;
    font-weight: 700;
    margin-left: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.btn-submit {
    background: #333;
    color: white;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    flex: 2;
    border: 2px solid #333;
}

.btn-submit:hover {
    background: #000;
    border-color: #000;
}

.btn-back {
    background: white;
    color: #333;
    padding: 16px 30px;
    font-size: 16px;
    flex: 1;
}

.btn-back:hover {
    background: #f5f5f5;
}

/* ==========================================
   送信完了メッセージ
   ========================================== */
.thank-you-area {
    animation: fadeIn 0.4s ease;
}

.thank-you-card {
    border: 2px solid #333;
    border-radius: 4px;
    padding: 60px 40px;
    background: white;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.check-icon {
    width: 80px;
    height: 80px;
    background: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto 30px;
}

.thank-you-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.thank-you-card p {
    font-size: 15px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.thank-you-card .btn-restart {
    margin-top: 30px;
}

/* ==========================================
   印刷ボタン
   ========================================== */
.print-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.btn-print {
    background: #333;
    color: white;
    padding: 15px 30px;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: #333;
}

.btn-print:hover {
    background: #555;
    border-color: #555;
}

/* ==========================================
   表示制御
   ========================================== */
.hidden {
    display: none;
}

.active {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   印刷用スタイル
   ========================================== */
@media print {
    @page {
        size: A4;
        margin: 15mm;
    }

    body {
        background: white;
        padding: 0;
    }

    .page {
        max-width: 100%;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .subtitle {
        font-size: 12px;
    }

    .result-card {
        page-break-inside: avoid;
        box-shadow: none;
    }

    .result-summary {
        padding: 20px;
    }

    .result-summary h2 {
        font-size: 20px;
    }

    .result-section {
        padding: 20px;
    }

    .result-section h3 {
        font-size: 16px;
    }

    .action-item h4 {
        font-size: 14px;
    }

    .action-item p {
        font-size: 12px;
    }

    .tool-tag {
        font-size: 11px;
    }

    button {
        font-size: 13px;
        padding: 10px 20px;
    }

    .no-print {
        display: none !important;
    }

    .restart-area {
        display: none !important;
    }

    .contact-form-area,
    .thank-you-area {
        display: none !important;
    }

    .question-node.hidden {
        display: none !important;
    }

    .start-node.hidden {
        display: none !important;
    }

    .footer {
        margin-top: 30px;
        padding-top: 15px;
    }

    .footer-note {
        font-size: 11px;
        margin-bottom: 15px;
    }

    .contact-info {
        padding: 15px;
    }

    .contact-info h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .company-name {
        font-size: 12px;
    }

    .contact-item {
        font-size: 11px;
    }

    .contact-item strong {
        width: 40px;
    }
}

/* ==========================================
   レスポンシブデザイン
   ========================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .page {
        padding: 20px;
    }

    .header h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 13px;
    }

    .node-content {
        padding: 25px;
    }

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

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .result-summary {
        padding: 25px;
    }

    .result-summary h2 {
        font-size: 20px;
    }

    .result-section {
        padding: 25px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .print-button {
        bottom: 20px;
        right: 20px;
    }

    .btn-print {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .node-content {
        padding: 20px;
    }

    .node-title {
        font-size: 16px;
    }

    button {
        font-size: 14px;
        padding: 12px 20px;
    }

    .result-summary {
        padding: 20px;
    }

    .result-summary h2 {
        font-size: 18px;
    }

    .result-section {
        padding: 20px;
    }

    .result-section h3 {
        font-size: 16px;
    }

    .contact-info {
        padding: 15px;
    }

    .contact-item strong {
        display: block;
        margin-bottom: 3px;
    }

    .restart-area {
        flex-direction: column;
    }

    .btn-send-result,
    .restart-area .btn-restart {
        width: 100%;
        min-width: auto;
    }

    .form-card {
        padding: 25px;
    }

    .form-card h2 {
        font-size: 20px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .btn-submit,
    .btn-back {
        width: 100%;
    }

    .thank-you-card {
        padding: 40px 25px;
    }

    .thank-you-card h2 {
        font-size: 24px;
    }

    .check-icon {
        width: 70px;
        height: 70px;
        font-size: 42px;
    }
}
