﻿body {
            font-family: 'Noto Sans JP', 'MS PGothic', sans-serif;
            background: linear-gradient(135deg, #f8fafb 0%, #f1f3f5 100%);
            position: relative;
            z-index: 1;
            min-height: 100vh;
        }
        body::before {
            content: '相続税試算';
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-30deg);
            font-size: 12vw;
            font-weight: 900;
            color: rgba(30, 58, 138, 0.025); /* ネイビー系の上品な色 */
            z-index: -1;
            pointer-events: none;
            white-space: nowrap;
        }

        /* Main Tab Styles */
        .main-tab-button {
            padding: 0.875rem 1.5rem;
            cursor: pointer;
            font-weight: 600;
            color: #64748b;
            background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
            border: 1px solid #cbd5e1;
            border-bottom: none;
            border-radius: 0.75rem 0.75rem 0 0;
            margin-right: 2px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        .main-tab-button:hover {
            background: linear-gradient(to bottom, #e2e8f0, #cbd5e1);
            color: #475569;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        .main-tab-button.active {
            color: #1e3a5f;
            background: #ffffff;
            border-color: #1e40af;
            border-bottom: 1px solid #ffffff;
            position: relative;
            z-index: 10;
            box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        .main-tab-button.active::before {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #1e40af, #2563eb);
        }
        .main-tab-button:focus {
            outline: 2px solid rgba(30, 64, 175, 0.3);
            outline-offset: 2px;
        }
        .main-tab-content {
            border: 1px solid #cbd5e1;
            background-color: #ffffff;
            border-radius: 0 0.75rem 0.75rem 0.75rem;
            margin-top: -1px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        /* Input Form Styles */
        .input-field {
            border: 1.5px solid #cbd5e1;
            border-radius: 0.5rem;
            padding: 0.625rem 0.875rem;
            width: 100%;
            font-size: 0.9375rem;
            transition: all 0.2s ease;
            background-color: #ffffff;
        }
        .input-field:focus {
            outline: none;
            border-color: #1e40af;
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
            background-color: #fafbfc;
        }
        .input-field:hover:not(:focus) {
            border-color: #94a3b8;
            background-color: #fafbfc;
        }
        .input-field::placeholder {
            color: #94a3b8;
            opacity: 0.7;
        }
        .section-title {
            font-weight: 700;
            font-size: 1.5rem;
            color: #1e3a5f;
            border-bottom: 3px solid #1e40af;
            padding-bottom: 0.75rem;
            margin-bottom: 2rem;
            letter-spacing: -0.02em;
        }
        .input-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 600;
            color: #1e40af;
            margin-bottom: 0.5rem;
            letter-spacing: 0.01em;
        }
        
        /* Accordion Styles for Declaration Forms */
        .accordion-header {
            background: linear-gradient(to right, #f8fafc, #f1f5f9);
            border: 1px solid #e2e8f0;
            padding: 1rem 1.5rem;
            font-size: 1.125rem;
            font-weight: 600;
            cursor: pointer;
            margin-top: -1px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: #1e3a5f;
        }
        .accordion-header.disabled {
            background: linear-gradient(to right, #f9fafb, #f3f4f6);
            color: #9ca3af;
            cursor: not-allowed;
        }
        .accordion-header:not(.disabled):hover {
            background: linear-gradient(to right, #f1f5f9, #e2e8f0);
            transform: translateX(4px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
        .accordion-header:focus {
            outline: 2px solid rgba(30, 41, 59, 0.3);
            outline-offset: -2px;
        }
        .accordion-header.open {
            background: linear-gradient(to right, #ffffff, #f8fafc);
            border-color: #1e40af;
        }
        .accordion-header .arrow {
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            color: #64748b;
        }
        .accordion-header.open .arrow {
            transform: rotate(90deg);
            color: #1e40af;
        }
        .accordion-content {
            border: 1px solid #e2e8f0;
            border-top: none;
            padding: 2rem;
            overflow-x: auto;
            background-color: #ffffff;
        }

        /* Vertical Summary Table Styles */
        .summary-table-vertical {
            width: 100%;
            table-layout: fixed;
            border-collapse: separate;
            border-spacing: 0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            border-radius: 0.5rem;
            overflow: hidden;
        }
        .summary-table-vertical th, .summary-table-vertical td {
             border: 1px solid #e2e8f0;
             padding: 1rem;
             text-align: right;
             vertical-align: middle;
        }
        .summary-table-vertical th:first-child {
            background: linear-gradient(to right, #f8fafc, #f1f5f9);
            font-weight: 600;
            text-align: left;
            width: 30%;
            color: #0f172a;
        }
        .summary-table-vertical td {
            white-space: nowrap;
            background-color: #ffffff;
            font-weight: 500;
        }
        .summary-table-vertical tr:hover td {
            background-color: #f8fafc;
        }
        .summary-table-vertical .header-row th {
            text-align: center;
            background: linear-gradient(to bottom, #1e40af, #2563eb);
            color: #ffffff;
            width: auto;
            font-weight: 600;
            letter-spacing: 0.05em;
        }
        .summary-table-vertical .header-row th:nth-child(2) {
            width: 20%;
        }
        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(30, 58, 138, 0.6);
            backdrop-filter: blur(4px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            animation: fadeIn 0.2s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .modal-content {
            background-color: white;
            border-radius: 1rem;
            max-width: 600px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
            animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* ★追加: 詳細モーダル用のサイズ指定 */
        #secondary-detail-modal .modal-content {
            max-width: 800px; /* 既存の600pxを上書き */
        }
        .modal-content h2 { text-align: center; }
        .modal-content p { text-align: left; }
        
        /* Gemini Chat Modal Styles */
        #gemini-chat-modal {
            align-items: flex-end;
            justify-content: flex-end;
            padding: 2rem;
        }
        #gemini-chat-container {
            width: 100%;
            max-width: 500px;
            height: 70vh;
            max-height: 600px;
            background-color: #f9fafb;
            border-radius: 0.5rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
        }
        #gemini-response-area {
            flex-grow: 1;
            overflow-y: auto;
            padding: 1rem;
            line-height: 1.6;
            color: #374151;
        }
        #gemini-response-area h3 {
             font-size: 1.1em;
             font-weight: bold;
             margin-top: 1em;
             margin-bottom: 0.5em;
             border-bottom: 1px solid #e5e7eb;
             padding-bottom: 0.25em;
        }
        #gemini-response-area ul {
            list-style-type: disc;
            margin-left: 1.5rem;
            margin-bottom: 1rem;
        }
         #gemini-response-area strong {
            font-weight: bold;
        }
        #gemini-response-area a {
            color: #2563eb;
            text-decoration: underline;
        }
        .gemini-source {
            font-size: 0.8rem;
            color: #6b7280;
        }
        #gemini-input-area {
            border-top: 1px solid #d1d5db;
            padding: 1rem;
            display: flex;
            gap: 0.5rem;
        }
        #gemini-input {
            flex-grow: 1;
            border-radius: 0.25rem;
            border: 1px solid #d1d5db;
            padding: 0.5rem;
            resize: none;
        }
        /* Secondary Succession Table */
        .secondary-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1.5rem;
        }
        .secondary-table th, .secondary-table td {
            border: 1px solid #e2e8f0;
            padding: 0.75rem 1.25rem;
            text-align: right;
        }
        .secondary-table th {
            background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
            font-weight: 600;
            color: #0f172a;
        }
        .secondary-table tr:hover td {
            background-color: #f8fafc;
        }
        .secondary-table .highlight {
            background-color: #fef9c3; /* yellow-100 */
            font-weight: bold;
        }
        .secondary-table .current-input-highlight {
            background-color: #e0f2fe; /* sky-100 */
        }

        /* ★★★ ここから追加 ★★★ */
        /* スケジュールモーダル用のスタイル */
        #schedule-modal .modal-content {
            max-width: 800px; /* 横幅を広げる */
        }
        #schedule-modal-content {
            max-height: 70vh; /* 高さを制限 */
            overflow-y: auto; /* 縦スクロールを許可 */
            padding-right: 1rem; /* スクロールバー用の余白 */
        }
        .schedule-group {
            margin-bottom: 1.5rem;
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 1rem;
        }
        .schedule-group h4 {
            font-size: 1.1rem;
            font-weight: 600;
            color: #1e293b; /* slate-800 */
            margin-bottom: 1rem;
        }
        .schedule-item {
            display: grid;
            /* ★★★ ここから変更 ★★★ */
            grid-template-columns: 1fr 130px 150px; /* カラム幅を調整 */
            gap: 0.75rem;
            align-items: center;
            padding: 0.75rem; /* パディングを調整 */
            border-bottom: 1px solid #e5e7eb; /* dottedからsolidに変更 */
        } /* ★★★ ここで閉じ括弧を追加 ★★★ */
        
        /* ★★★ ここから追加 ★★★ */
        .schedule-item label {
            word-break: keep-all; /* できるだけ折り返さない */
        }
        .schedule-item:last-child {
            border-bottom: none; /* グループの最後の項目は下線を消す */
        }
        .input-field-sm {
            padding: 0.35rem 0.5rem;
            font-size: 0.875rem;
        }
        /* ★★★ ここまで追加 ★★★ */

        /* ★★★ ここから変更 ★★★ */
        .usage-tab-button {
            padding: 0.75rem 1.25rem;
            cursor: pointer;
            font-weight: 500;
            color: #64748b;
            background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
            border: 1px solid #cbd5e1;
            border-bottom: 1px solid #cbd5e1;
            margin-right: -1px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            z-index: 1;
            margin-bottom: -1px;
        }
        .usage-tab-button:first-child {
            border-radius: 0.5rem 0 0 0;
        }
        .usage-tab-button:last-child {
            border-radius: 0 0.5rem 0 0;
            margin-right: 0;
        }
        .usage-tab-button.active {
            color: #1e3a5f;
            background: #ffffff;
            border-bottom: 1px solid #ffffff;
            font-weight: 600;
            z-index: 3;
            box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        }
        .usage-tab-button.active::before {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, #1e40af, #2563eb);
        }
        .usage-tab-button:focus {
            outline: 2px solid rgba(30, 64, 175, 0.3);
            outline-offset: 2px;
        }
        .usage-tab-button:not(.active):hover {
            background: linear-gradient(to bottom, #e2e8f0, #cbd5e1);
            color: #475569;
            transform: translateY(-1px);
        }
        .usage-tab-content {
            border: 1px solid #cbd5e1;
            border-radius: 0.5rem;
            padding: 1.5rem;
            margin-top: 0;
            position: relative;
            z-index: 2;
            background-color: #ffffff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        /* ★★★ ここまで変更 ★★★ */

        /* 簡易サマリー（常時表示） */
        #sticky-summary {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
            backdrop-filter: blur(10px);
            border: 1px solid rgba(226, 232, 240, 0.8);
            border-radius: 1rem;
            padding: 1rem 1.25rem;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5);
            z-index: 900;
            width: 300px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        #sticky-summary:hover {
            transform: translateY(-4px);
            box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5);
        }
        #sticky-summary h4 {
            font-size: 0.875rem;
            font-weight: 700;
            color: #1e3a5f;
            text-align: center;
            border-bottom: 2px solid #e2e8f0;
            padding-bottom: 0.5rem;
            margin-bottom: 0.75rem;
            letter-spacing: 0.05em;
        }
        #sticky-summary .summary-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.875rem;
            margin-top: 0.5rem;
            padding: 0.25rem 0;
        }
         #sticky-summary .summary-item span:first-child {
            font-weight: 600;
            color: #475569;
         }
        #sticky-summary .summary-item span:last-child {
            font-weight: 700;
            color: #1e3a5f;
            font-size: 1rem;
            letter-spacing: -0.02em;
        }
        #sticky-summary .summary-item.total-tax span:last-child {
             color: #dc2626;
             font-size: 1.25rem;
             font-weight: 800;
        }

        /* スマホでの簡易サマリー */
        @media (max-width: 768px) {
            #sticky-summary {
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                border-radius: 1rem 1rem 0 0;
                border-bottom: none;
                padding: 0.75rem 1rem;
            }
            #sticky-summary .summary-container {
                display: flex;
                justify-content: space-around;
                align-items: center;
            }
             #sticky-summary h4 {
                display: none; /* スマホではタイトル非表示 */
             }
             #sticky-summary .summary-item {
                flex-direction: column;
                font-size: 0.7rem;
             }
             #sticky-summary .summary-item span:last-child {
                font-size: 0.9rem;
             }
             #sticky-summary .summary-item.total-tax span:last-child {
                font-size: 1.0rem;
             }
        }
        /* ★★★ ここまで追加 ★★★ */

        /* ヘッダーとボタンのスタイル改善 */
        #header-container h1 {
            background: linear-gradient(135deg, #1e3a5f, #1e40af);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -0.02em;
        }
        #header-container p {
            color: #475569;
            font-weight: 500;
        }
        button[onclick*="openPrintModal"],
        button[onclick*="toggleGeminiModal"],
        button[onclick*="toggleHistoryModal"] {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        button[onclick*="openPrintModal"]:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        }
        button[onclick*="toggleGeminiModal"],
        button[onclick*="toggleHistoryModal"] {
            transition: all 0.2s ease;
        }
        button[onclick*="toggleGeminiModal"]:hover,
        button[onclick*="toggleHistoryModal"]:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* ボタンの共通スタイル改善 */
        button {
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        button:not(:disabled):hover {
            transform: translateY(-1px);
        }
        button:not(:disabled):active {
            transform: translateY(0);
        }

        /* セクション背景の改善 */
        .bg-white {
            background-color: #ffffff;
            border-radius: 0.75rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }

        /* ボタンの統一スタイル改善（ネイビー系） */
        button.bg-slate-800,
        button.bg-slate-700,
        button.bg-slate-600,
        button.bg-blue-700 {
            background: linear-gradient(135deg, #1e40af, #2563eb) !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
            border: none;
        }
        button.bg-slate-800:hover,
        button.bg-slate-700:hover,
        button.bg-slate-600:hover,
        button.bg-blue-700:hover {
            background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
        }
        button.bg-blue-600 {
            background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
            border: none;
        }
        button.bg-blue-600:hover {
            background: linear-gradient(135deg, #1e40af, #2563eb) !important;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
        }
        button.bg-red-600 {
            background: linear-gradient(135deg, #dc2626, #ef4444) !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
            border: none;
        }
        button.bg-red-600:hover {
            background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
        }
        button.bg-amber-500 {
            background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
            border: none;
        }
        button.bg-amber-500:hover {
            background: linear-gradient(135deg, #d97706, #f59e0b) !important;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
        }
        button.bg-gray-300 {
            background: linear-gradient(135deg, #e5e7eb, #d1d5db) !important;
            transition: all 0.2s ease;
            border: 1px solid #9ca3af;
        }
        button.bg-gray-300:hover {
            background: linear-gradient(135deg, #d1d5db, #cbd5e1) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        /* モーダル内ボタンの改善 */
        .modal-content button {
            border-radius: 0.5rem;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        /* スケジュールアイテムの改善 */
        .schedule-item.bg-gray-50 {
            background: linear-gradient(to right, #f8fafc, #f1f5f9);
            border-bottom: 2px solid #e2e8f0;
        }

        /* スマホでのテーブル表示調整 */
        @media (max-width: 768px) {
            .summary-table-vertical th, .summary-table-vertical td {
                 padding: 0.75rem 0.5rem;
                 font-size: 0.85rem;
                 white-space: normal;
            }
            .summary-table-vertical th:first-child {
                width: 35%;
            }
            .summary-table-vertical .header-row th:nth-child(2) {
                width: 25%;
            }
            .main-tab-button {
                padding: 0.625rem 1rem;
                font-size: 0.875rem;
            }
            .main-tab-content {
                padding: 1rem;
            }
        }
        /* ★★★ ここまで追加 ★★★ */

/* ... existing code ... -->
        #history-modal-content .text-lg {
            font-size: 1.05rem;
        }

        /* ★★★ リサーチリンクボタン ★★★ */
        .research-link-button {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 2rem 1.5rem;
            background: linear-gradient(135deg, #ffffff, #f8fafc);
            border: 1.5px solid #e2e8f0;
            border-radius: 0.75rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
            color: #1e3a5f;
            text-align: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        .research-link-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.5s;
        }
        .research-link-button:hover::before {
            left: 100%;
        }
        .research-link-button:hover {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-color: #1e40af;
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(30, 64, 175, 0.1);
            transform: translateY(-4px);
        }
        .research-link-button .text-sm {
            color: #64748b;
            margin-top: 0.5rem;
            font-weight: 500;
        }
        .research-link-button .font-bold {
            font-weight: 700;
            letter-spacing: -0.01em;
        }

        /* ★★★ サマリーダッシュボードの洗練されたスタイル ★★★ */
        #content-summary .space-y-8 > div {
            margin-bottom: 2.5rem;
        }
        .summary-card {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            border-radius: 1.25rem;
            padding: 2.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        .summary-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #1e40af, #2563eb, #3b82f6);
        }
        .summary-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
        }
        .summary-card h3 {
            font-size: 1.75rem;
            font-weight: 700;
            color: #1e3a5f;
            border-bottom: 4px solid #1e40af;
            padding-bottom: 1.25rem;
            margin-bottom: 2rem;
            letter-spacing: -0.03em;
            position: relative;
        }
        .summary-card h3::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #1e40af, transparent);
        }

        /* サマリーテーブルの改善 */
        .summary-card table {
            border-collapse: separate;
            border-spacing: 0;
            width: 100%;
            border-radius: 0.5rem;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        .summary-card table thead th {
            background: linear-gradient(to bottom, #1e40af, #2563eb);
            color: #ffffff;
            font-weight: 600;
            letter-spacing: 0.05em;
            padding: 1.25rem 1.5rem;
            border: none;
            text-align: left;
            font-size: 0.875rem;
            text-transform: uppercase;
        }
        .summary-card table thead th:first-child {
            border-top-left-radius: 0.5rem;
        }
        .summary-card table thead th:last-child {
            border-top-right-radius: 0.5rem;
        }
        .summary-card table tbody tr {
            transition: background-color 0.2s ease;
            background-color: #ffffff;
        }
        .summary-card table tbody tr:nth-child(even) {
            background-color: #fafbfc;
        }
        .summary-card table tbody tr:hover {
            background-color: #f1f5f9;
            transform: scale(1.01);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        .summary-card table tbody td {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid #e2e8f0;
            color: #334155;
        }
        .summary-card table tbody tr:last-child td {
            border-bottom: none;
        }
        .summary-card table tfoot th,
        .summary-card table tfoot td {
            background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
            font-weight: 700;
            padding: 1.5rem 1.5rem;
            border-top: 3px solid #cbd5e1;
            font-size: 1.125rem;
            color: #0f172a;
        }
        .summary-card table tfoot th:first-child {
            border-bottom-left-radius: 0.5rem;
        }
        .summary-card table tfoot td:last-child {
            border-bottom-right-radius: 0.5rem;
        }

        /* 重要な数値のハイライト - マーカーで強調 */
        .summary-highlight {
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            border-left: 4px solid #f59e0b;
            padding: 1.5rem;
            border-radius: 0.75rem;
            margin: 1.5rem 0;
        }
        .summary-highlight-value {
            font-size: 1.125rem; /* text-lg に統一 */
            font-weight: 700;
            color: #0f172a;
        }
        .summary-highlight-label {
            font-size: 1rem;
            font-weight: 600;
            color: #475569;
            margin-bottom: 0.5rem;
        }
        /* テーブル行のマーカー強調 */
        .summary-highlight-row {
            background: linear-gradient(to right, #fef3c7, #fde68a) !important;
            position: relative;
        }
        .summary-highlight-row::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: #f59e0b;
        }
        /* 最重要情報（相続税の総額など）のマーカー */
        .summary-highlight-important {
            background: linear-gradient(to right, #dbeafe, #bfdbfe) !important;
            border-top: 3px solid #3b82f6 !important;
        }
        .summary-highlight-important::before {
            background: #3b82f6;
            width: 5px;
        }

        /* 純資産価額セクションの改善 */
        .net-asset-section {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        }
        .net-asset-section .bg-gray-50 {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border: 2px solid #e2e8f0;
            border-radius: 1rem;
            padding: 2rem;
        }
        .net-asset-section hr {
            border: none;
            border-top: 2px solid #cbd5e1;
            margin: 1.5rem 0;
        }
        .net-asset-section .text-2xl {
            font-size: 1.125rem; /* text-lg に統一 */
            font-weight: 700;
            color: #0f172a;
        }

        /* 相続税計算セクションの改善 */
        .tax-calculation-section {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        }
        .tax-calculation-section .text-2xl.text-blue-700 {
            font-size: 1.125rem; /* text-lg に統一 */
            font-weight: 700;
            color: #1e40af;
        }
        .tax-calculation-section .summary-table-vertical tr.border-t-2 {
            border-top: 3px solid #cbd5e1;
        }
        .tax-calculation-section .summary-table-vertical tr.border-t-2 th,
        .tax-calculation-section .summary-table-vertical tr.border-t-2 td {
            background: linear-gradient(to right, #f8fafc, #f1f5f9);
            font-weight: 700;
        }

        /* サマリーシートセクションの改善 */
        .summary-sheet-section {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        }

        /* グラフコンテナの改善 */
        /* グラフコンテナの洗練されたスタイル */
        .chart-container-wrapper {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border-radius: 1rem;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
            transition: all 0.3s ease;
        }
        .chart-container-wrapper:hover {
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
            transform: translateY(-2px);
        }
        #asset-chart-container-wrapper {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            border-radius: 1rem;
            padding: 2rem;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        }

        /* アセットグループのスタイル改善 */
        .asset-group tr.bg-gray-50 {
            background: linear-gradient(to right, #f8fafc, #f1f5f9) !important;
            border-bottom: 2px solid #cbd5e1 !important;
        }
        .asset-group tr.bg-gray-50 td {
            font-weight: 700;
            color: #0f172a;
            padding: 1.25rem 1.5rem;
            font-size: 1rem;
            letter-spacing: 0.02em;
        }
        .asset-group tr.bg-white {
            transition: all 0.2s ease;
        }
        .asset-group tr.bg-white:hover {
            background-color: #f8fafc !important;
        }

        /* 数値表示の改善 */
        .summary-card .text-lg,
        .summary-card .text-2xl {
            font-family: 'Noto Sans JP', sans-serif;
            font-weight: 700;
            letter-spacing: -0.02em;
        }
        .summary-card .text-red-600 {
            color: #dc2626;
            font-weight: 700;
        }

        /* セクションタイトルの改善 */
        #content-summary .section-title {
            font-size: 1.5rem; /* text-xl に統一 */
            font-weight: 700;
            color: #1e3a5f;
            border-bottom: 3px solid #1e40af;
            padding-bottom: 1rem;
            margin-bottom: 2rem;
            position: relative;
        }
        #content-summary .section-title::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, #1e40af, transparent);
        }
        #content-summary p.text-gray-600 {
            color: #64748b;
            font-size: 1.0625rem;
            line-height: 1.8;
            font-weight: 500;
            padding: 1rem 1.5rem;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-left: 4px solid #cbd5e1;
            border-radius: 0.5rem;
            margin-bottom: 2rem;
        }

        /* ★★★ 情報入力セクションの洗練されたスタイル ★★★ */
        #content-input .space-y-8 > section {
            margin-bottom: 3rem;
        }
        #content-input section {
            position: relative;
        }
        #content-input .section-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #1e3a5f;
            border-bottom: 4px solid #1e40af;
            padding-bottom: 1rem;
            margin-bottom: 2rem;
            letter-spacing: -0.02em;
            position: relative;
        }
        #content-input .section-title::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #1e40af, transparent);
        }

        /* 入力セクションカード */
        #content-input .bg-white {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            border-radius: 1rem;
            padding: 2rem;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        #content-input .bg-white::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #1e40af, #2563eb, #3b82f6);
        }
        #content-input .bg-white:hover {
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        }

        /* 入力項目カード（相続人、財産、債務など） */
        #content-input .input-item-card,
        #content-input .bg-white.p-4.rounded-lg.shadow-sm.border {
            background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
            border: 1.5px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            transition: all 0.2s ease;
            margin-bottom: 1rem;
            position: relative;
        }
        #content-input .input-item-card::before,
        #content-input .bg-white.p-4.rounded-lg.shadow-sm.border::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 3px;
            height: 100%;
            background: linear-gradient(180deg, #1e40af, #2563eb);
            border-radius: 0.75rem 0 0 0.75rem;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        #content-input .input-item-card:hover::before,
        #content-input .bg-white.p-4.rounded-lg.shadow-sm.border:hover::before {
            opacity: 1;
        }
        #content-input .input-item-card:hover,
        #content-input .bg-white.p-4.rounded-lg.shadow-sm.border:hover {
            border-color: #cbd5e1;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }

        /* サブセクションタイトル */
        #content-input h3.font-bold {
            font-size: 1.25rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid #e2e8f0;
            letter-spacing: -0.01em;
        }

        /* ボタンの改善 */
        #content-input button.bg-slate-700,
        #content-input button.bg-slate-600,
        #content-input button.bg-slate-500,
        #content-input button.bg-slate-400,
        #content-input button.bg-slate-800,
        #content-input button.bg-blue-600 {
            background: linear-gradient(135deg, #1e40af, #2563eb) !important;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 600;
            letter-spacing: 0.02em;
            border-radius: 0.5rem;
            border: none;
        }
        #content-input button.bg-slate-500 {
            background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
        }
        #content-input button.bg-slate-400 {
            background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
        }
        #content-input button.bg-slate-700:hover,
        #content-input button.bg-slate-600:hover,
        #content-input button.bg-slate-500:hover,
        #content-input button.bg-slate-400:hover,
        #content-input button.bg-slate-800:hover,
        #content-input button.bg-blue-600:hover {
            background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(30, 64, 175, 0.25);
        }
        #content-input button.bg-red-500,
        #content-input button.bg-red-600 {
            background: linear-gradient(135deg, #dc2626, #ef4444) !important;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 600;
            letter-spacing: 0.02em;
            border-radius: 0.5rem;
            border: none;
        }
        #content-input button.bg-red-500:hover,
        #content-input button.bg-red-600:hover {
            background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
        }

        /* エクスポート/インポートボタンエリア */
        #content-input .flex.flex-wrap.gap-2 {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            padding: 1.5rem;
            border-radius: 1rem;
            border: 1px solid #e2e8f0;
            margin-bottom: 2rem;
        }
        #content-input .flex.flex-wrap.gap-2 button,
        #content-input .flex.flex-wrap.gap-2 label {
            transition: all 0.2s ease;
        }
        #content-input .flex.flex-wrap.gap-2 button:hover,
        #content-input .flex.flex-wrap.gap-2 label:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* チェックボックスのスタイル改善 */
        #content-input .form-checkbox {
            border-radius: 0.25rem;
            border-color: #cbd5e1;
            transition: all 0.2s ease;
        }
        #content-input .form-checkbox:checked {
            background-color: #1e40af;
            border-color: #1e40af;
        }
        #content-input .form-checkbox:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
        }

        /* セレクトボックスの改善 */
        #content-input select.input-field {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
            background-position: right 0.5rem center;
            background-repeat: no-repeat;
            background-size: 1.5em 1.5em;
            padding-right: 2.5rem;
            appearance: none;
        }
        #content-input select.input-field:focus {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%231e40af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
        }

        /* 区切り線の改善 */
        #content-input hr {
            border: none;
            border-top: 2px solid #e2e8f0;
            margin: 2rem 0;
        }

        /* 説明文の改善 */
        #content-input p.text-gray-600 {
            color: #64748b;
            font-size: 0.9375rem;
            line-height: 1.7;
            font-weight: 500;
            padding: 1rem 1.25rem;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-left: 3px solid #cbd5e1;
            border-radius: 0.5rem;
            margin-bottom: 1.5rem;
        }
        #content-input p.text-xs.text-gray-500 {
            color: #94a3b8;
            font-size: 0.8125rem;
            line-height: 1.6;
        }

        /* グリッドレイアウトの改善 */
        #content-input .grid {
            gap: 1rem;
        }
        @media (min-width: 768px) {
            #content-input .grid {
                gap: 1.25rem;
            }
        }

        /* テキストエリアの改善 */
        #content-input textarea.input-field {
            min-height: 80px;
            resize: vertical;
            font-family: 'Noto Sans JP', sans-serif;
        }

        /* 削除ボタンの改善 */
        #content-input button.bg-red-500 {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            border: none;
            font-weight: 600;
            transition: all 0.2s ease;
        }
        #content-input button.bg-red-500:hover {
            background: linear-gradient(135deg, #dc2626, #b91c1c);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
        }

        /* 追加ボタンの改善 */
        #content-input button[onclick*="addAsset"],
        #content-input button[onclick*="addLiability"],
        #content-input button[onclick*="addGift"],
        #content-input button[onclick*="addSettlementGift"],
        #content-input button[onclick*="addHeir"] {
            position: relative;
            overflow: hidden;
        }
        #content-input button[onclick*="addAsset"]::before,
        #content-input button[onclick*="addLiability"]::before,
        #content-input button[onclick*="addGift"]::before,
        #content-input button[onclick*="addSettlementGift"]::before,
        #content-input button[onclick*="addHeir"]::before {
            content: '+';
            position: absolute;
            left: 0.75rem;
            font-size: 1.25rem;
            font-weight: 700;
        }

        /* テンプレートボタンの改善 */
        #content-input button[onclick*="addHeirTemplate"] {
            background: linear-gradient(135deg, #1e40af, #2563eb) !important;
            border: none;
        }
        #content-input button[onclick*="addHeirTemplate"]:hover {
            background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
        }

        /* インポートステータスの改善 */
        #import-status {
            padding: 0.75rem 1rem;
            background: linear-gradient(135deg, #d1fae5, #a7f3d0);
            border-left: 4px solid #10b981;
            border-radius: 0.5rem;
            font-weight: 600;
            color: #065f46;
        }

        /* 空の状態メッセージ */
        #content-input p.text-gray-500 {
            padding: 1.5rem;
            text-align: center;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border: 1px dashed #cbd5e1;
            border-radius: 0.75rem;
            color: #94a3b8;
            font-style: italic;
        }

        /* フォームグループの改善 */
        #content-input .space-y-4 > div {
            margin-bottom: 1.25rem;
        }

        /* チェックボックスラベルの改善 */
        #content-input label.inline-flex.items-center {
            padding: 0.5rem 0.75rem;
            border-radius: 0.5rem;
            transition: background-color 0.2s ease;
        }
        #content-input label.inline-flex.items-center:hover {
            background-color: #f8fafc;
        }

        /* 日付表示の改善 */
        #content-input .wareki-display {
            display: block;
            margin-top: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-radius: 0.375rem;
            font-weight: 500;
            color: #64748b;
        }

        /* 利用区分タブの改善（情報入力セクション内） */
        #content-input .usage-tab-button {
            font-weight: 600;
        }
        #content-input .usage-tab-content {
            background: linear-gradient(135deg, #ffffff, #fafbfc);
        }

        /* 計算結果表示の改善 */
        #content-input .bg-gray-100,
        #content-input .bg-blue-50 {
            background: linear-gradient(135deg, #f1f5f9, #e2e8f0) !important;
            border: 1px solid #cbd5e1;
            border-radius: 0.5rem;
            font-weight: 600;
        }
        #content-input .bg-blue-50 {
            background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
            border-color: #93c5fd;
            color: #1e40af;
        }

        /* 小規模宅地の特例セクション */
        #content-input .border-t {
            border-top: 2px solid #e2e8f0;
            padding-top: 1.5rem;
            margin-top: 1.5rem;
        }
        #content-input h4.text-sm.font-semibold {
            font-size: 1rem;
            font-weight: 700;
            color: #1e3a5f;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid #e2e8f0;
        }

        /* 控除額表示の改善 */
        #content-input .bg-gray-50.rounded {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
            border: 1px solid #e2e8f0;
            border-radius: 0.5rem;
            padding: 1rem;
        }
        #content-input .text-red-600,
        #content-input .text-orange-600,
        #content-input .text-green-600 {
            font-weight: 700;
        }

        /* レスポンシブ改善 */
        @media (max-width: 768px) {
            #content-input .section-title {
                font-size: 1.5rem;
            }
            #content-input .bg-white {
                padding: 1.5rem;
            }
            #content-input .input-item-card {
                padding: 1.25rem;
            }
        }
        /* ★★★ 備忘録 ★★★ */
        #memo-textarea {
            width: 100%;
            height: 65vh;
            border: 1.5px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 1.25rem;
            font-family: 'Noto Sans JP', sans-serif;
            font-size: 0.9375rem;
            line-height: 1.7;
            resize: vertical;
            background-color: #ffffff;
            transition: all 0.2s ease;
        }
        #memo-textarea:focus {
            outline: none;
            border-color: #1e40af;
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
            background-color: #fafbfc;
        }
        #memo-textarea:hover:not(:focus) {
            border-color: #cbd5e1;
            background-color: #fafbfc;
        }
        #memo-textarea::placeholder {
            color: #94a3b8;
            opacity: 0.7;
        }