:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background-dark: #0f172a;
    --background-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.logo i {
    color: var(--primary-color);
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 2rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Upload Card */
.upload-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 550px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.02);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-desc {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.browse-link {
    color: var(--primary-color);
    text-decoration: underline;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Checkbox */
.terms-check {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    text-align: left;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background-color: var(--background-dark);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.terms-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.terms-text a {
    color: var(--primary-color);
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--border-color);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

.btn.loading .spinner {
    display: block;
}

.btn.loading .btn-text {
    display: none;
}

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

/* Result Section */
.result-section {
    padding: 4rem 0;
    background-color: var(--background-dark);
    border-top: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
}

.score-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 1.5rem 2.5rem;
    border-radius: 1rem;
    text-align: center;
    color: white;
}

.score-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.score-max {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Issue Cards */
.issues-list {
    display: grid;
    gap: 1.5rem;
}

.issue-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.issue-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.issue-title-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-check {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-fix {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-ng {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.status-separate {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.issue-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.issue-confidence {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.issue-reason {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
}

.issue-suggestion {
    font-size: 0.95rem;
}

.suggestion-label {
    color: var(--success-color);
    font-weight: 600;
    margin-right: 0.5rem;
}

.suggestion-locked {
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px dashed rgba(59, 130, 246, 0.35);
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    color: #93c5fd;
    font-size: 0.9rem;
}

.suggestion-label-locked {
    color: #60a5fa;
    margin-right: 0.5rem;
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-top: 1rem;
    min-height: 1.5em;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

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

.footer-col h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

.footer-links li {
    margin-bottom: 0.3rem !important;
    white-space: nowrap !important;
    display: list-item !important;
}

.footer-links a {
    white-space: nowrap !important;
    display: block !important;
    color: #cbd5e1 !important;
    text-decoration: none !important;
    font-size: 0.75rem !important;
}

.footer-links a:hover {
    color: #93c5fd;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.75rem;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* New UI Styles */
/* Score Overview (Split layout) */
.score-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.score-card-large {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.score-value-large {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin: 1rem 0;
}

.score-status {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    background-color: rgba(255, 255, 255, 0.2);
}

.chart-container {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

/* Category Summary */
.category-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.category-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.cat-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cat-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.cat-status {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Accordion */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-section {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    background-color: var(--background-card);
}

.category-header {
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.category-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

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

.cat-header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.cat-header-rate {
    font-size: 0.9rem;
    color: var(--text-muted);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.cat-toggle-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.category-section.open .cat-toggle-icon {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.category-section.open .category-content {
    display: grid;
    gap: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Hamburger Menu ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #f8fafc;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.btn-login-mobile {
    font-size: 0.85rem;
    color: white !important;
    background: var(--primary-color);
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none !important;
    white-space: nowrap;
}

/* ===== Responsive ===== */

/* --- Tablet (768px以下) --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* 見出しサイズ縮小 */
    h1, .hero-title {
        font-size: 1.75rem !important;
    }
    h2, .section-title {
        font-size: 1.25rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* ハンバーガーメニュー */
    .hamburger {
        display: flex;
    }
    .header-actions {
        display: flex;
    }
    .header-container {
        position: relative;
    }
    .nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 0;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        z-index: 100;
        backdrop-filter: blur(10px);
    }
    .nav.nav-active {
        display: flex !important;
    }
    .nav .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.95rem;
        display: block;
    }
    .nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    .mobile-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
        border-bottom: 1px solid var(--border-color);
        z-index: 100;
        backdrop-filter: blur(10px);
    }
    .mobile-nav.nav-active {
        display: flex !important;
    }
    .mobile-nav a,
    .mobile-nav button {
        padding: 1rem 2rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.95rem !important;
        display: block;
        color: #e2e8f0 !important;
        text-decoration: none;
        background: none;
        border: none;
        text-align: left;
        width: 100%;
        cursor: pointer;
        font-family: inherit;
    }
    .mobile-nav a:hover,
    .mobile-nav button:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    /* 結果ヘッダー */
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .result-title-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .result-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    /* スコアカード */
    .score-overview {
        grid-template-columns: 1fr;
    }
    .score-value-large {
        font-size: 3.5rem;
    }

    /* カテゴリサマリー */
    .category-summary {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    /* CTA */
    .cta-section {
        padding: 1.5rem;
    }
    .cta-title {
        font-size: 1.25rem;
    }
    .cta-icon {
        font-size: 2rem;
    }

    /* 履歴リスト */
    .history-list {
        grid-template-columns: 1fr;
    }

    /* テーブル横スクロール */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ボタン・カード共通 */
    .upload-card {
        padding: 1rem;
    }
    .upload-area {
        padding: 1rem;
    }
    .upload-icon {
        font-size: 2rem;
    }

    /* モーダル */
    .consultation-modal {
        padding: 1.25rem;
    }
}

/* --- スマホ (480px以下) --- */
@media (max-width: 480px) {
    h1, .hero-title {
        font-size: 1.4rem !important;
    }
    h2, .section-title {
        font-size: 1.1rem !important;
    }

    .container {
        padding: 0 0.75rem;
    }

    /* スコア */
    .score-value-large {
        font-size: 2.5rem;
    }
    .score-card {
        padding: 1rem 1.5rem;
    }
    .score-value {
        font-size: 2rem;
    }

    /* カテゴリサマリー 2列 */
    .category-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    /* CTA */
    .cta-section {
        padding: 1rem;
    }
    .btn-cta {
        font-size: 0.95rem;
        padding: 0.75rem 1.5rem;
    }

    /* issue card */
    .issue-card {
        padding: 1rem;
    }
    .issue-title-lg {
        font-size: 1rem;
    }

    /* 結果セクション */
    .result-section {
        padding: 2rem 0;
    }
}

/* Export Buttons */
.result-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    transform: translateY(-1px);
}

/* History Section */
.history-section {
    margin-top: 4rem;
    padding-bottom: 4rem;
}

.history-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.history-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.history-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.history-score span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* New Issue Card Styles (Competitor Style) */
.issue-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.issue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-ng {
    border-left: 4px solid var(--danger-color);
}

.issue-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.issue-cat-tag {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.legal-tag {
    font-size: 0.75rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.issue-title-lg {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.relevant-articles-section {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ra-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ra-tag {
    font-size: 0.85rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.issue-section {
    margin-bottom: 1rem;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.issue-reason-text {
    color: var(--text-main);
    line-height: 1.6;
}

.suggestion-box {
    background-color: rgba(16, 185, 129, 0.05);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.label-suggestion {
    color: var(--success-color);
}

.suggestion-text {
    color: #d1fae5;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.snippet-details {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.snippet-details summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--primary-color);
    outline: none;
}

.snippet-content {
    margin-top: 0.5rem;
    background-color: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #ccc;
    font-family: monospace;
    max-height: 200px;
    overflow-y: auto;
}

.snippet-item {
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed #333;
    padding-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    margin-top: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.cta-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-cta {
    background: #fff;
    color: #059669;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-cta i {
    margin-right: 0.5rem;
}

/* Consultation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.consultation-modal {
    background: var(--background-card);
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--text-main);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.modal-title i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.consultation-modal .form-group {
    margin-bottom: 1rem;
}

.consultation-modal .form-group label {
    display: block;
    margin-bottom: 0.375rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.consultation-modal .form-group label .required {
    color: var(--danger-color);
}

.consultation-modal .form-group input,
.consultation-modal .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--background-dark);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.consultation-modal .form-group input:focus,
.consultation-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.consultation-modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.consultation-modal .form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.consultation-modal .form-actions .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.95rem;
}

.consultation-modal .message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.consultation-modal .message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.consultation-modal .message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Consultation Confirm View */
.confirm-content {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.confirm-list {
    display: grid;
    gap: 1rem;
}

.confirm-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.confirm-item dt {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.confirm-item dd {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
}

/* Flatpickr High Z-Index for Modal */
.flatpickr-calendar {
    z-index: 99999 !important;
}

/* ===== v4 修正: ヘッダー折り返し解消・step-card修正 ===== */

/* スマホでヘッダーサブタイトルを折り返さない */
@media (max-width: 768px) {
    .header-container,
    [class*="container"][class*="flex"][class*="justify-between"] {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    header a[href="/"] span[style*="0.875rem"],
    header a[href="/"] span[style*="color: #9ca3af"] {
        font-size: 0.7rem !important;
        white-space: nowrap;
    }
}

/* step-card 幅の固定 */
.step-card {
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* card-slider はみ出し防止 */
.card-slider {
    overflow: hidden;
    max-width: 100%;
}
.card-track {
    max-width: none;
}

/* diag-container はみ出し防止 */
.diag-container {
    overflow: hidden;
    box-sizing: border-box;
}

/* ===== ブログ記事詳細ページ (.article-content) リッチデザイン ===== */

.article-body {
    max-width: 800px;
    margin: -3rem auto 3rem;
    background: white;
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 20;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .article-body {
        padding: 1.5rem 1.25rem;
        margin: -1.5rem 0.75rem 2rem;
    }
}

.article-content {
    line-height: 1.85;
    font-size: 1.05rem;
    color: #334155;
    letter-spacing: 0.01em;
}

/* h2: ブランドカラー縦線 + 薄グレー背景 + 下線 */
.article-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding: 0.65rem 1rem 0.65rem 1.1rem;
    background-color: #f8f9fa;
    border-left: 5px solid #0d9488;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 6px 6px 0;
}

/* h3: ブランドカラー細縦線 */
.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-left: 0.85rem;
    border-left: 3px solid #0d9488;
}

/* h4 */
.article-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* p */
.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.85;
    letter-spacing: 0.01em;
}

/* ul / ol */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
    line-height: 1.8;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

/* li */
.article-content li {
    margin-bottom: 0.6rem;
    letter-spacing: 0.01em;
}

/* img */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 1.25rem auto;
    display: block;
}

/* blockquote */
.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #0d9488;
    background: #f0fdfa;
    border-radius: 0 6px 6px 0;
    color: #475569;
    font-style: italic;
}

/* code / pre */
.article-content code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.15em 0.4em;
    font-size: 0.9em;
    color: #0f766e;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* table */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.article-content th {
    background: #0d9488;
    color: white;
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 600;
}

.article-content td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.article-content tr:nth-child(even) td {
    background: #f8f9fa;
}

/* 水平線 */
.article-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5rem 0;
}

/* strong / em */
.article-content strong {
    color: #1e293b;
    font-weight: 700;
}

.article-content em {
    color: #0f766e;
    font-style: italic;
}