:root {
    --primary: #F59E0B; /* りするんオレンジ */
    --primary-gradient: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    --secondary: #10B981; /* 安心のグリーン */
    --bg-light: #FAFAFA;
    --text-main: #1F2937;
    --text-sub: #6B7280;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-primary: 0 10px 25px -5px rgba(245, 158, 11, 0.4);
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: #E5E7EB;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* レスポンシブコンテナ (PC & スマホ) */
.app-container {
    max-width: 1000px; /* PC表示用に幅を拡張 */
    margin: 0 auto;
    background: var(--bg-light);
    min-height: 100vh;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .app-container {
        margin: 40px auto;
        min-height: calc(100vh - 80px);
        border-radius: var(--radius-lg);
    }
}

/* 背景の装飾 (オーブ) */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}
.orb-1 {
    width: 300px;
    height: 300px;
    background: #FDE68A;
    top: -100px;
    right: -100px;
}
.orb-2 {
    width: 250px;
    height: 250px;
    background: #A7F3D0;
    bottom: 20%;
    left: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* 共通コンテンツラッパー */
.content {
    position: relative;
    z-index: 10;
    flex: 1;
}

/* ヘッダー (グラスモーフィズム) */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-icon { font-size: 1.2rem; }

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    transition: transform 0.2s;
}
.menu-btn:hover { transform: scale(1.1); }

/* ヒーローエリア */
.hero {
    padding: 40px 24px 30px;
    text-align: center;
}

.badge-safe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.hero-visual .badge-safe {
    position: absolute;
    top: 12px;
    right: 12px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
@media (max-width: 380px) {
    .badge-text-en { display: none; }
}

.hero h1 {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #111827;
}

.hero h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero p {
    font-size: 0.95rem;
    color: var(--text-sub);
    margin-bottom: 32px;
    font-weight: 600;
}

/* キャラクターメッセージ (グラスモーフィズム) */
.risurun-box {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(253, 230, 138, 0.6);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    gap: 16px;
    text-align: left;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.risurun-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.risurun-icon {
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    animation: bounce 2.5s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.risurun-text {
    font-size: 1rem;
    font-weight: 700;
    color: #4B5563;
    line-height: 1.6;
}
.risurun-text span {
    color: #DC2626;
    background: rgba(220, 38, 38, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* アクションボタン (メインビジュアル上) */
.hero-visual {
    position: relative;
    margin: 20px 24px;
    container-type: inline-size;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-visual img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-buttons {
    position: absolute;
    top: 40%;
    left: 5%;
    width: 48%;
    display: flex;
    flex-direction: column;
    gap: 2cqw;
}

.hero-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    text-decoration: none;
    line-height: 1.3;
    transition: transform 0.2s;
}
.hero-buttons .btn:hover {
    transform: scale(1.02);
}

.hero-btn-main {
    background: var(--primary-gradient);
    color: white;
    font-size: clamp(12.5px, 2.9cqw, 24px);
    font-weight: 900;
    padding: clamp(8px, 1.8cqw, 16px) clamp(6px, 1cqw, 14px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    border: none;
}

.hero-btn-sub {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: var(--text-main);
    font-size: clamp(9.5px, 1.8cqw, 15px);
    font-weight: 700;
    padding: clamp(6px, 1.2cqw, 12px) clamp(6px, 1cqw, 12px);
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 3つの特徴 */
.features {
    padding: 40px 24px;
    background: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255,255,255,0.8);
}
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.section-title {
    font-size: 1.4rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 28px;
    color: #111827;
    line-height: 1.3;
}

.st-sub {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #4B5563;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.st-main {
    display: block;
    font-size: 1.45rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.02em;
}

.st-num {
    color: #F59E0B;
    font-size: 1.7rem;
    font-weight: 900;
    margin: 0 1px;
}

.feature-card {
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(229, 231, 235, 0.6);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-card:nth-child(1) { background: rgba(254, 243, 199, 0.45); border-color: rgba(245, 158, 11, 0.15); }
.feature-card:nth-child(2) { background: rgba(236, 253, 245, 0.45); border-color: rgba(16, 185, 129, 0.15); }
.feature-card:nth-child(3) { background: rgba(239, 246, 255, 0.45); border-color: rgba(59, 130, 246, 0.15); }

.bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    color: #ffffff; /* 白抜き */
    opacity: 0.55;
    stroke-width: 1.5;
    /* 背景の白・グレーと同化しないよう、暗めのシャドウで輪郭（コントラスト）をつける */
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2)) drop-shadow(0 0 10px rgba(0,0,0,0.08));
    z-index: 0;
    pointer-events: none;
}

.f-text {
    position: relative;
    z-index: 1;
}

.f-text h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #1F2937;
    /* ハッキリとした白フチ（白囲み） */
    text-shadow:
        -2px -2px 0 #fff, 2px -2px 0 #fff,
        -2px  2px 0 #fff, 2px  2px 0 #fff,
        -2px  0   0 #fff, 2px  0   0 #fff,
         0   -2px 0 #fff, 0    2px 0 #fff,
         0 4px 8px rgba(255,255,255,0.8);
}
.f-text p {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-sub);
    line-height: 1.6;
    /* ハッキリとした白フチ（やや細め） */
    text-shadow:
        -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff,
        -1.5px  1.5px 0 #fff, 1.5px  1.5px 0 #fff,
        -1.5px  0     0 #fff, 1.5px  0     0 #fff,
         0     -1.5px 0 #fff, 0      1.5px 0 #fff,
         0 2px 4px rgba(255,255,255,0.8);
}

/* 3つの理由 直下 無料入力CTA */
.features-cta-box {
    margin-top: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 5;
}
.features-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #F59E0B 0%, #EA580C 100%);
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 900;
    text-decoration: none;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -4px rgba(245, 158, 11, 0.45), 0 4px 10px rgba(0,0,0,0.06);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-sizing: border-box;
}
.features-cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 32px -4px rgba(245, 158, 11, 0.55), 0 6px 14px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #FBBF24 0%, #F97316 100%);
    color: #FFFFFF;
}
.features-cta-btn:active {
    transform: translateY(1px) scale(0.98);
}
.features-cta-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 800;
    flex-wrap: wrap;
}
.features-cta-trust .dot-sep {
    color: #CBD5E1;
}

@media (max-width: 640px) {
    .features-cta-box {
        margin-top: 24px;
        gap: 10px;
    }
    .features-cta-btn {
        font-size: 1.02rem;
        padding: 14px 20px;
        max-width: 100%;
    }
    .features-cta-trust {
        font-size: 0.72rem;
        gap: 6px;
    }
}

/* ブログ・FAQエリア */
.blog-area {
    background: #374151;
    padding: 40px 24px;
    color: var(--white);
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
    position: relative;
}

.blog-area .section-title {
    color: var(--white);
}

.search-bar-wrap {
    max-width: 540px;
    margin: 0 auto 24px;
}

.search-bar {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    padding: 6px 8px 6px 16px;
    border-radius: var(--radius-full);
    width: 100%;
    font-size: 0.9rem;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FCD34D;
    box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.3), 0 6px 20px rgba(0, 0, 0, 0.15);
}

.blog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 8px 0;
}
.blog-search-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.84rem;
}

.search-clear-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #FFFFFF;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}
.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.search-submit-btn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border: none;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}
.search-submit-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
}

/* 検索結果カード */
.blog-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}
.blog-results-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #FEF3C7;
}
.blog-results-count {
    font-size: 0.8rem;
    color: #CBD5E1;
}

/* 一覧を閉じる・畳むボタン */
.blog-collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #F1F5F9;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.blog-collapse-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #FCA5A5;
    color: #FECACA;
    transform: scale(1.04);
}

.blog-collapse-bottom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #FDE68A;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 8px 20px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    margin: 8px auto 0;
}
.blog-collapse-bottom-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #FCD34D;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.blog-result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.blog-result-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}
.blog-result-card:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #FCD34D;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.blog-card-tag {
    display: inline-block;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid #FCD34D;
    color: #FDE68A;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-bottom: 6px;
}
.blog-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.45;
    margin-bottom: 6px;
}
.blog-card-lead {
    font-size: 0.8rem;
    color: #CBD5E1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #FCD34D;
    margin-top: 8px;
}

/* カテゴリ切り替えタブ（TOP検索・一覧内） */
.blog-results-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.blog-results-tabs::-webkit-scrollbar {
    display: none;
}
.blog-tab-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #E2E8F0;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.blog-tab-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #FCD34D;
    color: #FFFFFF;
}
.blog-tab-btn.active {
    background: #FCD34D;
    border-color: #FCD34D;
    color: #0F172A;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(252, 211, 77, 0.3);
}

/* カテゴリー別グルーピングセクション */
.blog-group-section {
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.blog-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}
.blog-group-header:hover {
    background: rgba(255, 255, 255, 0.13);
}
.blog-group-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-group-title {
    font-size: 0.92rem;
    font-weight: 900;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 6px;
}
.blog-group-badge {
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid #FCD34D;
    color: #FDE68A;
    padding: 1px 7px;
    border-radius: 9999px;
}
.blog-group-arrow {
    color: #94A3B8;
    transition: transform 0.25s ease;
}
.blog-group-section.collapsed .blog-group-arrow {
    transform: rotate(-90deg);
}
.blog-group-section.collapsed .blog-group-cards {
    display: none;
}
.blog-group-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.b-card {
    padding: 24px 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 900;
    font-size: clamp(0.96rem, 3.8vw, 1.12rem);
    line-height: 1.45;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.b-card:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
.b-card:nth-child(1) {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.36), rgba(245, 158, 11, 0.25));
    border: 1.5px solid rgba(252, 211, 77, 0.65);
}
.b-card:nth-child(2) {
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.36), rgba(225, 29, 72, 0.25));
    border: 1.5px solid rgba(251, 113, 133, 0.65);
}
.b-card:nth-child(3) {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.36), rgba(5, 150, 105, 0.25));
    border: 1.5px solid rgba(52, 211, 153, 0.65);
}
.b-card:nth-child(4) {
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.36), rgba(147, 51, 234, 0.25));
    border: 1.5px solid rgba(192, 132, 252, 0.65);
}

.b-card-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.b-card-count {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.b-card.active-cat {
    outline: 3px solid #FCD34D;
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(252, 211, 77, 0.5);
    filter: brightness(1.2);
}

.b-card span.b-text {
    position: relative;
    z-index: 1;
}

.blog-more {
    display: inline-block;
    margin-top: 24px;
    color: #FBBF24;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: rgba(251, 191, 36, 0.1);
    transition: background 0.2s;
}
.blog-more:hover { background: rgba(251, 191, 36, 0.2); }

/* 人気記事ランキング TOP 5 */
.blog-ranking-container {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 18px 16px;
    margin-top: 14px;
    margin-bottom: 22px;
    backdrop-filter: blur(8px);
}
.blog-ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.blog-ranking-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-ranking-badge {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.blog-ranking-title {
    font-size: 1.02rem;
    font-weight: 900;
    color: #FFFFFF;
    margin: 0;
}
.blog-ranking-desc {
    font-size: 0.75rem;
    color: #CBD5E1;
}
.blog-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.blog-ranking-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.blog-ranking-card:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #FCD34D;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.rank-num-badge {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 900;
    color: #1E293B;
}
.rank-1 { background: linear-gradient(135deg, #FDE047 0%, #EAB308 100%); color: #78350F; box-shadow: 0 2px 6px rgba(234,179,8,0.4); }
.rank-2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 100%); color: #334155; }
.rank-3 { background: linear-gradient(135deg, #FED7AA 0%, #FB923C 100%); color: #7C2D12; }
.rank-4, .rank-5 { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; font-size: 0.75rem; }

.blog-ranking-body {
    flex: 1;
    min-width: 0;
}
.blog-ranking-card-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.38;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-ranking-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.blog-like-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #FCD34D;
    background: rgba(252, 211, 77, 0.15);
    border: 1px solid rgba(252, 211, 77, 0.3);
    padding: 1px 7px;
    border-radius: 9999px;
}

/* 記事内いいねフィードバックボックス */
.blog-feedback-box {
    margin-top: 24px;
    padding: 20px 16px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    text-align: center;
}
.blog-feedback-title {
    font-size: 1rem;
    font-weight: 900;
    color: #1E293B;
    margin-bottom: 4px;
}
.blog-feedback-sub {
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 12px;
}
.blog-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    color: #2563EB;
    border: 1.5px solid #BFDBFE;
    padding: 10px 22px;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}
.blog-like-btn:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    transform: scale(1.03);
}
.blog-like-btn.liked {
    background: #10B981;
    color: #FFFFFF;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.like-count-badge {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.82rem;
}
.blog-like-btn.liked .like-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

/* モーダル内検索ウィジェット */
.modal-search-box-widget {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1.5px solid #BAE6FD;
    border-radius: 14px;
    padding: 20px 16px;
    margin: 28px 0 20px;
    text-align: left;
}
.msb-header {
    margin-bottom: 10px;
}
.msb-badge {
    display: inline-block;
    background: #0284C7;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}
.msb-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0C4A6E;
    margin-bottom: 4px;
}
.msb-desc {
    font-size: 0.8rem;
    color: #0369A1;
    line-height: 1.45;
}
.msb-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.msb-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #0284C7;
    pointer-events: none;
}
.msb-input {
    width: 100%;
    padding: 11px 36px 11px 36px;
    font-size: 0.9rem;
    border: 1.5px solid #7DD3FC;
    border-radius: 10px;
    background: #FFFFFF;
    color: #0F172A;
    transition: all 0.2s;
    box-sizing: border-box;
}
.msb-input:focus {
    outline: none;
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}
.msb-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #E2E8F0;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #64748B;
    cursor: pointer;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.msb-dropdown {
    margin-top: 10px;
    background: #FFFFFF;
    border: 1.5px solid #BAE6FD;
    border-radius: 10px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.msb-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.msb-item:last-child {
    border-bottom: none;
}
.msb-item:hover {
    background: #F0F9FF;
}
.msb-item-tag {
    display: inline-block;
    background: #E0F2FE;
    color: #0284C7;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
}
.msb-item-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.4;
}
.msb-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.msb-chips-label {
    font-size: 0.75rem;
    color: #0369A1;
    font-weight: 700;
}
.msb-chip {
    background: #FFFFFF;
    border: 1px solid #BAE6FD;
    color: #0284C7;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.msb-chip:hover {
    background: #0284C7;
    color: #FFFFFF;
}

/* モーダル内関連記事リスト */
.modal-related-section {
    margin: 28px 0 20px;
    text-align: left;
}
.modal-related-heading {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3.5px solid #2563EB;
}
.modal-related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.modal-related-card {
    display: block;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.modal-related-card:hover {
    background: #EFF6FF;
    border-color: #2563EB;
    transform: translateX(4px);
}
.modal-related-tag {
    display: inline-block;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}
.modal-related-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.4;
    margin-bottom: 4px;
}
.modal-related-lead {
    font-size: 0.78rem;
    color: #64748B;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.modal-related-arrow {
    font-size: 0.78rem;
    font-weight: 800;
    color: #2563EB;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* モーダル内アクションバナー */
.modal-action-banner {
    margin: 20px 0;
}
.modal-action-portal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.modal-action-portal-btn:hover {
    background: #1E293B;
}

/* モーダルフッター専用スタイル */
.modal-blog-footer {
    padding: 12px 16px;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}
.modal-footer-form-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transition: all 0.2s;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}
.modal-footer-form-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}
.modal-footer-sub-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.modal-footer-portal-link {
    flex: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    box-sizing: border-box;
}
.modal-footer-portal-link:hover {
    background: #1E293B;
}
.modal-footer-close-action {
    flex: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E2E8F0;
    color: #334155;
    border: 1px solid #CBD5E1;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-sizing: border-box;
}
.modal-footer-close-action:hover {
    background: #CBD5E1;
    color: #0F172A;
}

/* SNSセクション */
.sns-section {
    padding: 36px 20px 40px;
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}
.sns-header {
    margin-bottom: 22px;
}
.sns-badge {
    display: inline-block;
    background: #F3F4F6;
    color: #4B5563;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}
.sns-title {
    font-size: 1.18rem;
    font-weight: 900;
    color: #1F2937;
    margin-bottom: 6px;
}
.sns-desc {
    font-size: clamp(0.72rem, 3.2vw, 0.84rem);
    color: var(--text-sub);
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.4;
    white-space: nowrap;
    text-align: center;
}
.sns-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    max-width: 860px;
    margin: 0 auto;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .sns-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 360px;
    }
}
.sns-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 154px; /* 全てのSNSボタンの横幅を完全統一 */
    padding: 11px 0;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid transparent;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .sns-card {
        width: 100%; /* スマホ2列グリッドでも幅を完全一致 */
    }
    .sns-card:last-child:nth-child(odd) {
        grid-column: span 2;
    }
}
.sns-card:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}
.sns-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sns-name {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
}

/* X (Twitter) */
.sns-x {
    background: #0F172A;
    color: #FFFFFF;
}
.sns-x .sns-icon-wrap {
    background: rgba(255, 255, 255, 0.15);
}
.sns-x:hover {
    background: #000000;
}

/* Instagram */
.sns-ig {
    background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCAF45 100%);
    color: #FFFFFF;
}
.sns-ig .sns-icon-wrap {
    background: rgba(255, 255, 255, 0.22);
}
.sns-ig:hover {
    opacity: 0.95;
}

/* TikTok */
.sns-tiktok {
    background: #010101;
    color: #FFFFFF;
}
.sns-tiktok .sns-icon-wrap {
    background: rgba(255, 255, 255, 0.15);
}
.sns-tiktok:hover {
    box-shadow: 0 6px 18px rgba(238, 29, 82, 0.35);
}

/* LINE */
.sns-line {
    background: #06C755;
    color: #FFFFFF;
}
.sns-line .sns-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
}
.sns-line:hover {
    background: #05B04B;
}

/* YouTube */
.sns-yt {
    background: #FF0000;
    color: #FFFFFF;
}
.sns-yt .sns-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
}
.sns-yt:hover {
    background: #E60000;
}

/* 準備中のグレーアウトSNS */
.sns-disabled {
    background: #F1F5F9 !important;
    color: #94A3B8 !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.75;
    transform: none !important;
}
.sns-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}
.sns-disabled .sns-icon-wrap {
    background: #E2E8F0 !important;
    color: #94A3B8 !important;
}
.sns-badge-prep {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    background: #E2E8F0;
    color: #64748B;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: normal;
}

/* ヒーローエリアのSNSクイックアイコンバー */
.hero-sns-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.hero-sns-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #64748B;
}
.hero-sns-list {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-sns-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-sns-icon-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.hero-sns-icon-btn.x { background: #0F172A; }
.hero-sns-icon-btn.ig { background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCAF45 100%); }
.hero-sns-icon-btn.tiktok { background: #010101; }
.hero-sns-icon-btn.line { background: #06C755; }
.hero-sns-icon-btn.yt { background: #FF0000; }
.hero-sns-icon-btn.disabled {
    background: #E2E8F0 !important;
    color: #94A3B8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.55 !important;
    transform: none !important;
    pointer-events: none;
}

/* フッター（整理整頓・モダン3列×3項目＆信頼性レイアウト） */
.main-footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 40px 24px 36px;
    font-size: 0.85rem;
    border-top: 1px solid #374151;
}

/* フッター3カラムグリッド */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.footer-col-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #F3F4F6;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col-links li a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.footer-col-links li a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}

/* FP監修者カード */
.fp-profile-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.fp-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.fp-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 900;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid #FFFFFF;
    border-radius: 8px;
    padding: 5px 14px;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.fp-desc {
    font-size: 0.82rem;
    color: #D1D5DB;
    margin-bottom: 12px;
}

.fp-disclaimer {
    font-size: 0.72rem;
    color: #6B7280;
    line-height: 1.5;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copyright {
    font-size: 0.78rem;
    color: #6B7280;
    letter-spacing: 0.02em;
}

/* SEO用: 視覚的には隠すが、検索エンジンには読ませるクラス */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.help-circle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(4, 120, 87, 0.15);
    color: #047857;
    font-size: 0.7rem;
    font-weight: 900;
    margin-left: 4px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: #ECFDF5 !important;
    width: 90%; max-width: 420px;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1.5px solid #A7F3D0 !important;
    overflow: hidden;
    z-index: 1;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; font-size: 1.5rem; color: #9CA3AF;
    cursor: pointer; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: 0.2s;
}
.modal-close:hover { background: #F3F4F6; color: #1F2937; }
.floating-menu-btn {
    position: fixed;
    top: 24px;
    right: max(20px, calc((100vw - 1000px) / 2 + 20px));
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F2937;
    z-index: 1500;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, color 0.2s, box-shadow 0.2s;
}
.floating-menu-btn:hover {
    transform: scale(1.08);
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: #D97706;
}
.floating-menu-btn:active {
    transform: scale(0.95);
}
@media (max-width: 1040px) {
    .floating-menu-btn {
        right: 18px;
    }
}
@media (max-width: 640px) {
    .floating-menu-btn {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
    }
}

/* Drawer Menu */
.drawer-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }

.drawer-content {
    position: absolute;
    top: 0; right: -100%;
    width: 88%; max-width: 360px;
    height: 100%;
    background: #FFFFFF;
    padding: 28px 16px 20px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.drawer-overlay.active .drawer-content { right: 0; }

.drawer-close {
    position: absolute; top: 14px; right: 14px;
    background: none; border: none; font-size: 1.8rem; color: #9CA3AF;
    cursor: pointer; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: 0.2s;
}
.drawer-close:hover { background: #F3F4F6; color: #1F2937; }

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
}
.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    color: #1E293B;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}
.drawer-link:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
    transform: translateX(3px);
    color: #0F172A;
}
.drawer-link-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}
.drawer-link-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
}
.drawer-link-icon svg {
    width: 16px;
    height: 16px;
}
.drawer-link-arrow {
    color: #94A3B8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.drawer-link-arrow svg {
    width: 14px;
    height: 14px;
}

.drawer-link-sub {
    font-size: 0.82rem;
    color: #64748B;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
}
.drawer-link-sub:hover {
    color: #0F172A;
    background: #F1F5F9;
    border-color: #E2E8F0;
    padding-left: 16px;
}

/* ==========================================
   4枚の用紙 表・裏 りするんのかんたん説明 バナー＆モーダル
   ========================================== */
.paper-guide-banner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(245, 158, 11, 0.28) 100%);
    border: 1.5px solid rgba(252, 211, 77, 0.6);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}
.paper-guide-banner:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.35) 100%);
    border-color: #FCD34D;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
}
.paper-guide-badge {
    display: inline-block;
    background: #D97706;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 9999px;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}
.paper-guide-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.paper-guide-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #FCD34D;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}
.paper-guide-text {
    flex: 1;
    text-align: left;
}
.paper-guide-title {
    font-size: 0.98rem;
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.4;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.paper-guide-desc {
    font-size: 0.8rem;
    color: #FEF3C7;
    line-height: 1.45;
}

/* モーダルスタイル（4つの用紙ごとの専用テーマカラー） */
.paper-modal-header {
    background: linear-gradient(135deg, #F0FDF4 0%, #EFF6FF 50%, #FFFBEB 100%);
    padding: 16px 20px 12px;
    border-bottom: 1.5px solid #E2E8F0;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.paper-modal-badge {
    background: #10B981;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    transition: background 0.3s ease;
}
.paper-modal-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0;
}
.paper-close-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.paper-close-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
}
.paper-tabs-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.paper-tabs-nav {
    display: flex;
    gap: 6px;
    min-width: max-content;
}
.paper-tab-btn {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.paper-tab-btn:hover {
    border-color: #CBD5E1;
    color: #0F172A;
}
.paper-tab-btn.active {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border-color: #059669;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.paper-side-switch-wrap {
    display: flex;
    justify-content: center;
}
.paper-side-switch {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.06);
    padding: 3px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.paper-side-btn {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 20px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}
.paper-side-btn.active {
    background: #FFFFFF;
    color: #0F172A;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.paper-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #F0FDF4;
    transition: background 0.3s ease;
}

.paper-header-summary {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: border-color 0.3s ease;
}
.paper-header-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 4px;
}
.paper-header-sub {
    font-size: 0.82rem;
    color: #64748B;
    line-height: 1.5;
}
.paper-side-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
}

.paper-section-card {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: border-color 0.3s ease;
}
.paper-tag-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.paper-tag-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}
.paper-item-name {
    font-size: 1.0rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 10px;
    line-height: 1.4;
}

.paper-official-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-left: 3.5px solid #64748B;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.6;
}
.paper-official-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.paper-risurun-box {
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-left: 4px solid #F59E0B;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.paper-risurun-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 9px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.paper-risurun-text {
    font-size: 0.88rem;
    line-height: 1.65;
    font-weight: 500;
}

.paper-modal-footer {
    padding: 14px 20px;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.paper-action-btn {
    flex: 1;
    margin: 0;
    padding: 12px;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #FFFFFF;
    font-weight: 800;
    border-radius: 10px;
    transition: all 0.25s ease;
}
.paper-action-btn:hover {
    transform: translateY(-2px);
}

/* ----------------------------------------------------
   テーマ①：扶養控除等申告書（エメラルド・グリーン / 家族・安心）
   ---------------------------------------------------- */
[data-paper-theme="fuyou"] .paper-modal-header {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-bottom-color: #A7F3D0;
}
[data-paper-theme="fuyou"] .paper-modal-badge {
    background: #059669;
}
[data-paper-theme="fuyou"] .paper-tab-btn.active {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}
[data-paper-theme="fuyou"] .paper-modal-body {
    background: #F0FDF4;
}
[data-paper-theme="fuyou"] .paper-header-summary {
    border-color: #BBF7D0;
}
[data-paper-theme="fuyou"] .paper-side-badge {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
[data-paper-theme="fuyou"] .paper-section-card {
    border-color: #DCFCE7;
}
[data-paper-theme="fuyou"] .paper-tag-pill {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}
[data-paper-theme="fuyou"] .paper-risurun-box {
    background: #F0FDF4;
    border: 1.5px solid #A7F3D0;
    border-left: 4px solid #059669;
}
[data-paper-theme="fuyou"] .paper-risurun-tag {
    background: #059669;
    color: #FFFFFF;
}
[data-paper-theme="fuyou"] .paper-risurun-text {
    color: #064E3B;
}
[data-paper-theme="fuyou"] .paper-action-btn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ----------------------------------------------------
   テーマ②：基礎・配偶者・所得調整（ハニーアンバー / パート・所得）
   ---------------------------------------------------- */
[data-paper-theme="kiso"] .paper-modal-header {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-bottom-color: #FDE68A;
}
[data-paper-theme="kiso"] .paper-modal-badge {
    background: #D97706;
}
[data-paper-theme="kiso"] .paper-tab-btn.active {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-color: #D97706;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}
[data-paper-theme="kiso"] .paper-modal-body {
    background: #FFFDF5;
}
[data-paper-theme="kiso"] .paper-header-summary {
    border-color: #FDE68A;
}
[data-paper-theme="kiso"] .paper-side-badge {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}
[data-paper-theme="kiso"] .paper-section-card {
    border-color: #FEF3C7;
}
[data-paper-theme="kiso"] .paper-tag-pill {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}
[data-paper-theme="kiso"] .paper-risurun-box {
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-left: 4px solid #D97706;
}
[data-paper-theme="kiso"] .paper-risurun-tag {
    background: #D97706;
    color: #FFFFFF;
}
[data-paper-theme="kiso"] .paper-risurun-text {
    color: #78350F;
}
[data-paper-theme="kiso"] .paper-action-btn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ----------------------------------------------------
   テーマ③：保険料控除申告書（スカイブルー / 生命・医療・安心）
   ---------------------------------------------------- */
[data-paper-theme="hoken"] .paper-modal-header {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-bottom-color: #BFDBFE;
}
[data-paper-theme="hoken"] .paper-modal-badge {
    background: #2563EB;
}
[data-paper-theme="hoken"] .paper-tab-btn.active {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-color: #2563EB;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
[data-paper-theme="hoken"] .paper-modal-body {
    background: #F4F8FF;
}
[data-paper-theme="hoken"] .paper-header-summary {
    border-color: #BFDBFE;
}
[data-paper-theme="hoken"] .paper-side-badge {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}
[data-paper-theme="hoken"] .paper-section-card {
    border-color: #DBEAFE;
}
[data-paper-theme="hoken"] .paper-tag-pill {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}
[data-paper-theme="hoken"] .paper-risurun-box {
    background: #EFF6FF;
    border: 1.5px solid #BFDBFE;
    border-left: 4px solid #2563EB;
}
[data-paper-theme="hoken"] .paper-risurun-tag {
    background: #2563EB;
    color: #FFFFFF;
}
[data-paper-theme="hoken"] .paper-risurun-text {
    color: #1E3A8A;
}
[data-paper-theme="hoken"] .paper-action-btn {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ----------------------------------------------------
   テーマ④：住宅ローン控除申告書（モダンパープル / マイホーム・上質）
   ---------------------------------------------------- */
[data-paper-theme="loan"] .paper-modal-header {
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
    border-bottom-color: #DDD6FE;
}
[data-paper-theme="loan"] .paper-modal-badge {
    background: #7C3AED;
}
[data-paper-theme="loan"] .paper-tab-btn.active {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border-color: #7C3AED;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}
[data-paper-theme="loan"] .paper-modal-body {
    background: #FAF7FF;
}
[data-paper-theme="loan"] .paper-header-summary {
    border-color: #DDD6FE;
}
[data-paper-theme="loan"] .paper-side-badge {
    background: #F5F3FF;
    color: #5B21B6;
    border: 1px solid #DDD6FE;
}
[data-paper-theme="loan"] .paper-section-card {
    border-color: #EDE9FE;
}
[data-paper-theme="loan"] .paper-tag-pill {
    background: #F5F3FF;
    color: #6D28D9;
    border: 1px solid #DDD6FE;
}
[data-paper-theme="loan"] .paper-risurun-box {
    background: #F5F3FF;
    border: 1.5px solid #DDD6FE;
    border-left: 4px solid #7C3AED;
}
[data-paper-theme="loan"] .paper-risurun-tag {
    background: #7C3AED;
    color: #FFFFFF;
}
[data-paper-theme="loan"] .paper-risurun-text {
    color: #4C1D95;
}
[data-paper-theme="loan"] .paper-action-btn {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ----------------------------------------------------
   虫眼鏡ルーペ機能・実際の用紙ビューア
   ---------------------------------------------------- */
.paper-viewmode-switch-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.paper-viewmode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.paper-viewmode-btn:hover {
    border-color: #94A3B8;
    color: #0F172A;
}
.paper-viewmode-btn.active {
    background: #1E293B;
    border-color: #0F172A;
    color: #FDE68A;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

/* ----------------------------------------------------
   公式用紙ビューア＆PDFポップアップ
   ---------------------------------------------------- */
.paper-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #0F172A;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #334155;
    flex-wrap: wrap;
}
.paper-scale-btn-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.paper-scale-btn {
    padding: 5px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #475569;
    background: #1E293B;
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.15s;
}
.paper-scale-btn:hover {
    background: #334155;
    color: #FFFFFF;
}
.paper-scale-btn.active {
    background: #0284C7;
    border-color: #38BDF8;
    color: #FFFFFF;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.4);
}

.btn-open-pdf-popup {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #2563EB;
    color: #FFFFFF;
    border: 1px solid #3B82F6;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-open-pdf-popup:hover {
    background: #1D4ED8;
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* 表示エリア */
.paper-sheet-display-area {
    width: 100%;
    min-height: 280px;
    max-height: 60vh;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 14px;
    box-sizing: border-box;
    background: #1E293B;
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.35);
}
.paper-sheet-display-area.mode-fit {
    align-items: center;
    overflow: hidden;
}
.paper-sheet-display-area.mode-fit .real-sheet-img {
    max-height: calc(60vh - 28px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-radius: 4px;
    display: block;
}
.paper-sheet-display-area.mode-zoom .real-sheet-img {
    width: 135%;
    max-width: none;
    height: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-radius: 4px;
    display: block;
}
.paper-sheet-display-area.mode-super .real-sheet-img {
    width: 180%;
    max-width: none;
    height: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-radius: 4px;
    display: block;
}

.real-sheet-image-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

/* 縦向き申告書（住宅ローン等）の最適化 */
.paper-sheet-display-area.is-portrait.mode-fit .real-sheet-img {
    max-height: calc(60vh - 28px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.btn-open-pdf {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #0284C7;
    color: #FFFFFF;
    border: 1px solid #0369A1;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-open-pdf:hover {
    background: #0369A1;
    color: #FFFFFF;
    transform: translateY(-1px);
}
.real-sheet-table th {
    background: #F1F5F9;
    font-weight: 700;
    text-align: center;
    color: #0F172A;
}
.real-sheet-sec-title {
    font-weight: 900;
    font-size: 10px;
    margin: 6px 0 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #E2E8F0;
    padding: 2px 6px;
    border-left: 3px solid #000;
}
.real-sheet-header {
    text-align: center;
    font-size: 12.5px;
    font-weight: 900;
    padding-bottom: 3px;
    margin-bottom: 6px;
    border-bottom: 2px solid #000;
    position: relative;
}
.real-sheet-badge {
    position: absolute;
    right: 0;
    top: -2px;
    width: 24px;
    height: 24px;
    border: 1.5px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 11px;
    background: #FFFBEB;
}

/* 全画面PDFポップアップモーダル */
.pdf-popup-content {
    max-width: 1040px;
    width: 95vw;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #0F172A;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.pdf-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #1E293B;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}
.pdf-popup-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdf-popup-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    background: #0284C7;
    color: #FFFFFF;
}
.pdf-popup-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #F8FAFC;
    margin: 0;
}
.pdf-popup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pdf-popup-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #2563EB;
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.15s;
}
.pdf-popup-dl-btn:hover {
    background: #1D4ED8;
}
.pdf-popup-body {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #334155;
    overflow: hidden;
    position: relative;
}
.pdf-popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #FFFFFF;
}

/* サンプル注意バナー */
.paper-sample-alert-box {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #FFFBEB;
    border: 1.5px solid #FCD34D;
    border-left: 5px solid #F59E0B;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #92400E;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}
.paper-sample-alert-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: #B45309;
    margin-bottom: 4px;
    font-size: 0.88rem;
}
.paper-sample-alert-desc {
    font-weight: 500;
    color: #78350F;
}
.paper-sample-alert-desc strong {
    color: #9A3412;
    font-weight: 800;
}

/* サンプル透かしバッジ */
.paper-sample-watermark-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.88);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    pointer-events: none;
}

/* 国税庁出典クレジット */
.paper-source-attribution {
    margin-top: 14px;
    padding: 8px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.paper-source-attribution a {
    color: #0284C7;
    font-weight: 700;
    text-decoration: none;
}
.paper-source-attribution a:hover {
    text-decoration: underline;
}

/* ----------------------------------------------------
   昨年のQRコードからデータ復元 モーダル & バナー
   ---------------------------------------------------- */
.qr-restore-modal-content {
    max-width: 580px;
    width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 20px 45px rgba(0,0,0,0.3);
}

.qr-restore-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.qr-restore-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.qr-restore-modal-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0;
}

.qr-restore-tabs {
    display: flex;
    background: #F1F5F9;
    padding: 6px 12px;
    gap: 6px;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.qr-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.84rem;
    font-weight: 800;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
}

.qr-tab-btn.active {
    background: #FFFFFF;
    color: #0F172A;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.qr-restore-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qr-tab-panel {
    display: none;
}
.qr-tab-panel.active {
    display: block;
}

/* ドロップゾーン */
.qr-dropzone {
    border: 2.5px dashed #38BDF8;
    background: #F0F9FF;
    border-radius: 14px;
    padding: 28px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.qr-dropzone:hover, .qr-dropzone.dragover {
    border-color: #0284C7;
    background: #E0F2FE;
    transform: translateY(-2px);
}
.qr-dropzone-icon {
    width: 60px;
    height: 60px;
    background: #BAE6FD;
    color: #0284C7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.qr-dropzone-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #0369A1;
    margin-bottom: 6px;
}
.qr-dropzone-desc {
    font-size: 0.78rem;
    color: #0284C7;
    margin-bottom: 14px;
    line-height: 1.4;
}
.qr-select-file-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0284C7;
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    transition: 0.15s;
}
.qr-select-file-btn:hover {
    background: #0369A1;
}

/* カメラビューファインダー */
.qr-camera-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
}
.qr-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qr-camera-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.qr-scan-reticle {
    position: relative;
    width: 180px;
    height: 180px;
    border: 3px solid #38BDF8;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.qr-scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, #38BDF8, transparent);
    box-shadow: 0 0 8px #38BDF8;
    animation: qrScanAnim 2s linear infinite;
}
@keyframes qrScanAnim {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}
.qr-camera-hint {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
}
.qr-camera-error {
    margin-top: 10px;
    padding: 12px;
    background: #FEF2F2;
    border: 1px solid #FECDD3;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #991B1B;
    line-height: 1.5;
}

/* インジケータ＆エラー */
.qr-scanning-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}
.qr-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E1;
    border-top-color: #0284C7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.qr-error-box {
    padding: 12px 14px;
    background: #FEF2F2;
    border: 1px solid #FECDD3;
    border-left: 4px solid #EF4444;
    border-radius: 8px;
    color: #991B1B;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* 復元成功プレビューカード */
.qr-success-card {
    background: #F0FDF4;
    border: 1.5px solid #86EFAC;
    border-radius: 12px;
    padding: 16px;
}
.qr-success-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.qr-success-icon {
    width: 38px;
    height: 38px;
    background: #10B981;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qr-success-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: #059669;
}
.qr-success-title {
    font-size: 1rem;
    font-weight: 900;
    color: #166534;
    margin: 2px 0 0;
}
.qr-success-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.qr-summary-pill {
    background: #FFFFFF;
    border: 1px solid #BBF7D0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #374151;
}
.qr-summary-pill strong {
    color: #15803D;
    font-weight: 800;
}
.qr-success-note {
    font-size: 0.72rem;
    color: #166534;
    line-height: 1.4;
    margin-bottom: 14px;
}
.qr-apply-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transition: all 0.2s;
}
.qr-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* フォーム側 Slide 1 の QRバナー */
.qr-restore-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1.5px solid #BAE6FD;
    border-radius: 14px;
    margin-bottom: 18px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
}
.qr-restore-banner:hover {
    border-color: #38BDF8;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
    transform: translateY(-1px);
}
.qr-restore-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qr-restore-banner-icon {
    width: 40px;
    height: 40px;
    background: #0284C7;
    color: #FFFFFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qr-restore-banner-title {
    font-size: 0.92rem;
    font-weight: 900;
    color: #0369A1;
}
.qr-restore-banner-desc {
    font-size: 0.75rem;
    color: #0284C7;
    margin-top: 2px;
}
.qr-restore-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: #0284C7;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.15s;
}
.qr-restore-banner-btn:hover {
    background: #0369A1;
}

@media (max-width: 640px) {
    .qr-restore-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .qr-restore-banner-btn {
        justify-content: center;
    }
    .qr-success-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   お知らせ・更新情報 (News & Updates) スタイル
   ========================================== */
.top-news-card, .top-news-banner {
    background: #FFFFFF;
    border: 1.5px solid #FCD34D;
    border-radius: 16px;
    padding: 13px 16px;
    margin-bottom: 16px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.08);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: block;
    text-align: left;
}
.top-news-card:hover, .top-news-banner:hover {
    transform: translateY(-2px);
    border-color: #F59E0B;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.16);
    background: #FFFDF7;
}
.top-news-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.top-news-badge-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.top-news-dot {
    width: 7px;
    height: 7px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}
.top-news-badge {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.top-news-date {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748B;
    font-variant-numeric: tabular-nums;
}
.top-news-arrow {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #D97706;
    flex-shrink: 0;
    margin-left: auto;
}
.top-news-card:hover .top-news-arrow, .top-news-banner:hover .top-news-arrow {
    color: #B45309;
    transform: translateX(2px);
    transition: transform 0.15s;
}
.top-news-card-title {
    font-size: 0.88rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 4px;
    line-height: 1.35;
}
.top-news-card-desc {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 640px) {
    .top-news-card, .top-news-banner {
        padding: 12px 14px;
    }
    .top-news-card-title {
        font-size: 0.84rem;
    }
    .top-news-card-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
}

/* お知らせモーダル */
.news-modal-content {
    max-width: 620px;
    border-radius: 20px;
}
.news-modal-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #FEF3C7;
    color: #D97706;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.news-modal-body {
    padding: 20px 24px;
    max-height: 70vh;
    overflow-y: auto;
}
.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.news-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 16px 18px;
    transition: all 0.2s;
}
.news-item:first-child {
    background: #FFFDF5;
    border-color: #FDE68A;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}
.news-item-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.news-item-date {
    font-size: 0.8rem;
    font-weight: 800;
    color: #64748B;
    font-variant-numeric: tabular-nums;
}
.news-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.3;
}
.news-tag-tax {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}
.news-tag-update {
    background: #F0FDF4;
    color: #15803D;
    border: 1px solid #BBF7D0;
}
.news-tag-feature {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}
.news-tag-improve {
    background: #F3E8FF;
    color: #7E22CE;
    border: 1px solid #E9D5FF;
}
.news-item-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 6px;
    line-height: 1.4;
}
.news-item-desc {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.6;
}
.news-modal-footer-note {
    margin-top: 18px;
    padding: 12px 16px;
    background: #F1F5F9;
    border-radius: 12px;
}


/* ==========================================================================
   トップページ ハッシュタグクラウド スタイル
   ========================================================================== */
.top-tag-section {
    margin-top: 14px;
    margin-bottom: 18px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(253, 230, 138, 0.25);
    border-radius: 16px;
    padding: 14px 16px;
    backdrop-filter: blur(8px);
}
.top-tag-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #FDE68A;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.top-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 8px;
}
.top-tag-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #F1F5F9;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}
.top-tag-chip:hover {
    background: #F59E0B;
    border-color: #FCD34D;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.top-tag-chip.active {
    background: #F59E0B;
    border-color: #FCD34D;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* カード内のタグチップ群 */
.blog-card-tags-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-bottom: 6px;
}
.blog-card-category-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid #93C5FD;
    color: #BFDBFE;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
}
.blog-card-hashtag-chip {
    display: inline-block;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(252, 211, 77, 0.4);
    color: #FDE68A;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
}
