/* 知リポAI - AIが解説する知的ニュースレポート */
:root {
    --color-primary: #1e1b4b;
    --color-primary-light: #312e81;
    --color-primary-dark: #0f0d24;
    --color-accent: #6366f1;
    --color-accent-hover: #4f46e5;
    --color-accent-soft: #eef2ff;
    --color-accent-muted: #c7d2fe;
    --color-fun: #ec4899;
    --color-fun-soft: #fce7f3;
    --color-warm: #f59e0b;
    --color-warm-soft: #fffbeb;

    --color-bg: #f8fafc;
    --color-bg-subtle: #e2e8f0;
    --color-bg-elevated: #ffffff;
    --color-surface: #ffffff;
    --color-text: #1e1b4b;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-card: #ffffff;
    --color-border: #cbd5e1;
    --color-border-light: #e2e8f0;

    --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Noto Sans JP', var(--font-sans);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1), 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-card-hover: 0 20px 56px rgba(15, 23, 42, 0.12), 0 8px 24px rgba(15, 23, 42, 0.06);
}

:root[data-theme="dark"] {
    --color-bg: #000000;
    --color-bg-subtle: #141414;
    --color-bg-elevated: #121212;
    --color-surface: #121212;
    --color-text: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: #9e9e9e;
    --color-card: #1e1e1e;
    --color-border: #2a2a2a;
    --color-border-light: #252525;
}

* {
    box-sizing: border-box;
}

/* ========== アクセシビリティ：スキップリンク・フォーカス可視化 ========== */
.skip-link {
    position: absolute;
    left: max(0.5rem, env(safe-area-inset-left, 0px));
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    z-index: 10001;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    color: #fff;
    background: var(--color-accent);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transform: translateY(-160%);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
}
.skip-link:focus {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    outline: none;
}
.skip-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

#main-content:focus {
    outline: none;
}
#main-content:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
.global-pill:focus-visible,
.page-switch-link:focus-visible,
.bottom-bar-item:focus-visible,
.genre-tab:focus-visible,
.top-pick-link:focus-visible,
.news-card-link:focus-visible,
.read-mode-btn:focus-visible,
.search-input:focus-visible,
.save-article-btn:focus-visible,
.theme-toggle:focus-visible,
.back-link:focus-visible,
.back-to-top:focus-visible,
.infinite-retry-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition: none;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    position: relative;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 20% 85%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 25%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(99, 102, 241, 0.08), transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 40%, #fce7f3 100%);
    background-attachment: fixed;
    position: relative;
}

/* 背景アニメーション：ゆるやかなオーブの動き */
@keyframes bg-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    33% { transform: translate(2%, -1.5%) scale(1.02); opacity: 0.98; }
    66% { transform: translate(-1%, 1%) scale(0.98); opacity: 1; }
}

@keyframes bg-shimmer {
    0%, 100% { background-position: 100% 0; }
    50% { background-position: 0% 0; }
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(ellipse 60% 40% at 10% 90%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 90% 15%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 45% 55% at 50% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 48%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    background-size: 200% 100%;
    background-position: 100% 0;
    pointer-events: none;
    z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
    body::before {
        animation: bg-orb-float 25s ease-in-out infinite;
    }
    body::after {
        animation: bg-shimmer 15s ease-in-out infinite;
    }
}

:root[data-theme="dark"] body {
    background: var(--color-bg);
    background-image: none;
}

:root[data-theme="dark"] body::before,
:root[data-theme="dark"] body::after {
    display: none !important;
}

/* メインコンテンツを背景レイヤーの上に */
.main-content,
.site-footer {
    position: relative;
    z-index: 1;
}

/* ========== ヘッダー ========== */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 100;
}

:root[data-theme="dark"] .site-header {
    background: rgba(0, 0, 0, 0.92);
    border-bottom-color: #222;
    box-shadow: none;
}
:root[data-theme="dark"] .logo {
    color: #fff;
}
:root[data-theme="dark"] .theme-toggle {
    background: #1a1a1a;
    border-color: #333;
    color: #eee;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-toggle {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
}

.tiny-links {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    opacity: 0.6;
}

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

.logo-wrap {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
}

.logo-wrap:hover .logo { color: var(--color-accent); transform: scale(1.02); }
.logo-wrap:hover .logo-tagline { color: var(--color-accent); }

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.04em;
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.logo-image {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.logo-text {
    display: inline-block;
}

.logo-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.logo-icon {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-main a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}

.nav-main a:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.btn-login {
    padding: 0.45rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.btn-login:hover {
    background: var(--color-surface);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-refresh {
    padding: 0.55rem 1.15rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.btn-refresh:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* ========== メイン ========== */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 0.75rem;
}

/* 全体を少しリッチに見せるガラス調ラッパー */
.page-layout {
    background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.35));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
:root[data-theme="dark"] .page-layout {
    background: linear-gradient(180deg, rgba(18,18,18,0.72), rgba(18,18,18,0.6));
    border-color: rgba(71, 85, 105, 0.35);
    box-shadow: none;
}
.page-layout--papers,
.page-layout--news {
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.92), rgba(254, 226, 226, 0.55));
}
:root[data-theme="dark"] .page-layout--papers,
:root[data-theme="dark"] .page-layout--news {
    background: linear-gradient(180deg, rgba(69, 26, 3, 0.42), rgba(17, 24, 39, 0.72));
}

.top-picks {
    margin: 0.4rem 0 0.9rem;
}
.top-picks-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.55rem;
}
.top-picks-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}
.top-pick-card {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.86);
    min-width: 0;
}
.top-pick-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.top-pick-link img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}
.top-pick-body {
    padding: 0.48rem 0.56rem 0.62rem;
}
.top-pick-body h3 {
    font-size: 0.87rem;
    line-height: 1.35;
    margin: 0.2rem 0 0;
}
.top-pick-meta {
    color: var(--color-text-muted);
    font-size: 0.74rem;
}

/* ========== PERSONAS PAGE ========== */
.personas-page {
    max-width: 1200px;
    margin: 0 auto;
}
.personas-intro {
    margin: 0.25rem 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
.personas-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.9rem;
}
.persona-directory-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-light);
    border-radius: 14px;
    padding: 0.7rem;
    box-shadow: var(--shadow-xs);
}
.persona-directory-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}
.persona-directory-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.55rem 0 0.3rem;
}
.persona-directory-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}
.persona-directory-type {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
}
.persona-directory-note {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}
.persona-directory-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
}
.persona-directory-detail-link {
    margin-top: 0.48rem;
    display: inline-block;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
}
.persona-directory-detail-link:hover {
    text-decoration: underline;
}
.persona-detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 1rem;
}
.persona-profile-card,
.persona-spec-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-light);
    border-radius: 14px;
    padding: 0.85rem;
}
.persona-profile-img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
.persona-profile-body {
    margin-top: 0.7rem;
}
.persona-profile-title {
    margin: 0;
    font-size: 1.2rem;
}
.persona-profile-type {
    margin: 0.25rem 0 0.45rem;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.86rem;
}
.persona-profile-summary {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.persona-spec-card h2 {
    margin: 0 0 0.7rem;
    font-size: 1.05rem;
}
.persona-spec-card dl {
    margin: 0;
    display: grid;
    gap: 0.55rem;
}
.persona-spec-card dt {
    font-weight: 800;
    font-size: 0.86rem;
}
.persona-spec-card dd {
    margin: 0.2rem 0 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.persona-prompt-details {
    margin-top: 0.85rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--color-border-light);
}
.persona-prompt-details summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.86rem;
}
.persona-prompt-details p {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
}
.persona-detail-back {
    margin: 0 0 0.35rem;
    font-size: 0.86rem;
}
.persona-detail-back a {
    color: var(--color-accent);
    text-decoration: none;
}
.persona-detail-back a:hover {
    text-decoration: underline;
}
.persona-related {
    margin-top: 1rem;
}
.persona-related-title {
    font-size: 1.15rem;
    margin: 0 0 0.7rem;
}

.global-pill-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 0.75rem;
}

.global-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.82);
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
}

.global-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.global-pill.is-active {
    color: #ffffff;
    background: linear-gradient(120deg, #4f46e5, #7c3aed);
    border-color: #4f46e5;
}

:root[data-theme="dark"] .global-pill {
    color: #e5e7eb;
    border-color: rgba(100, 116, 139, 0.65);
    background: rgba(30, 41, 59, 0.7);
}

:root[data-theme="dark"] .global-pill.is-active {
    color: #ffffff;
}

.ai-news-widget {
    margin-top: 1rem;
    padding: 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62));
}

.ai-news-widget h2 {
    margin: 0 0 0.7rem 0;
    font-size: 1rem;
}

.ai-news-widget-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.48rem;
}

.ai-news-widget-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    padding: 0.55rem 0.6rem;
}

.ai-news-widget-link:hover {
    background: rgba(99, 102, 241, 0.08);
}

.ai-news-widget-title {
    font-weight: 600;
    font-size: 0.94rem;
}

.ai-news-widget-icons {
    display: inline-flex;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.ai-news-widget-icon {
    font-size: 1rem;
}

:root[data-theme="dark"] .ai-news-widget {
    border-color: rgba(71, 85, 105, 0.4);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.6));
}

@media (max-width: 980px) {
    .global-pill-nav {
        display: none;
    }
}

/* ========== トップレイアウト・ヒーロー ========== */
.page-top {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.hero {
    padding: 2.5rem 0;
    position: relative;
    border-left: 4px solid var(--color-accent);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-fun-soft) 40%, transparent 70%);
    border-radius: var(--radius-lg);
    opacity: 0.8;
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    background: linear-gradient(135deg, var(--color-accent-soft), var(--color-fun-soft));
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
    border: 1px solid var(--color-accent-muted);
    animation: hero-badge-pulse 3s ease-in-out infinite;
}

@keyframes hero-badge-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
    50% { opacity: 0.95; box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

/* ヒーロー・カードのフェードイン */
@keyframes hero-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-top .hero {
    animation: hero-fade-in 0.6s ease-out;
}

.added-one-card,
.news-card {
    animation: hero-fade-in 0.5s ease-out both;
}

.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5) { animation-delay: 0.25s; }
.news-card:nth-child(6) { animation-delay: 0.3s; }
.news-card:nth-child(n+7) { animation-delay: 0.35s; }

.trends-sidebar {
    animation: hero-fade-in 0.5s ease-out 0.2s both;
}

@media (prefers-reduced-motion: reduce) {
    .page-top .hero,
    .added-one-card,
    .news-card,
    .trends-sidebar {
        animation: none;
    }
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 0.75rem 0;
    color: var(--color-primary);
    letter-spacing: -0.03em;
    line-height: 1.3;
}

.hero-desc {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.btn-add-article {
    display: inline-flex;
    align-items: center;
    margin-top: 1.25rem;
    padding: 0.6rem 1.25rem;
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-add-article:hover:not(:disabled) {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-add-article:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.25rem;
}

.hero-buttons .btn-add-article {
    margin-top: 0;
}

.btn-rss-one {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.btn-rss-one:hover:not(:disabled) {
    opacity: 0.9;
    background: var(--color-border-light);
}

.btn-rss-one:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== トレンドサイドバー ========== */
.trends-sidebar {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 90px;
    border: 1px solid var(--color-border-light);
}

.trends-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-fun), var(--color-primary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    padding-top: 0.25rem;
}

.trends-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.trends-list li {
    border-bottom: 1px solid var(--color-border-light);
    padding: 0.75rem 0;
}

.trends-list li:last-child {
    border-bottom: none;
}

.trends-list a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.15s;
}

.trends-list a:hover {
    color: var(--color-accent);
}

.trend-source {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.trends-empty,
.category-empty {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ========== ニュースセクション ========== */
.news-section {
    margin-top: 2rem;
}

/* 追加した1件枠（ボタン直下に表示） */
.hero .added-one-box {
    margin-top: 1.5rem;
}
.added-one-box {
    margin-bottom: 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-fun-soft) 50%, #fff 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    border-left: 4px solid var(--color-accent);
}
.added-one-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--color-primary);
}
.added-one-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}
.added-one-card:hover {
    box-shadow: var(--shadow-md);
}
.added-one-link {
    display: flex;
    gap: 1.25rem;
    text-decoration: none;
    color: inherit;
    align-items: stretch;
}
.added-one-image {
    width: 280px;
    min-width: 280px;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-border-light);
}
.added-one-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.added-one-body {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.added-one-source {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}
.added-one-heading {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}
.added-one-summary {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}
.added-one-badge {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
}
.added-one-empty {
    margin: 0;
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    text-align: center;
}
@media (max-width: 640px) {
    .added-one-link { flex-direction: column; }
    .added-one-image { width: 100%; min-width: 100%; }
}

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 1.25rem 0;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

@supports (background-clip: text) {
    .section-title {
        background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

/* ジャンルタブ＋スワイプ切替 */
.genre-tabs-wrap {
    margin-bottom: 1.5rem;
}

.genre-tabs-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0 1rem;
    scrollbar-width: thin;
}

.genre-tabs-scroll::-webkit-scrollbar {
    height: 6px;
}

/* ジャンルタブの見た目は下段「ENHANCED NEWS CARDS」付近の .genre-tabs-scroll .genre-tab に統一 */

.genre-panels {
    min-height: 200px;
}

.genre-panel {
    animation: genre-panel-in 0.3s ease-out;
}

@keyframes genre-panel-in {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.genre-panel .category-heading {
    margin-bottom: 1rem;
}

.news-grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* 従来のcategory-nav（フォールバック用） */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding: 1rem 0;
    border-bottom: 2px solid var(--color-border);
}

.category-tab {
    padding: 0.55rem 1.35rem;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    transition: all 0.25s ease;
    box-shadow: var(--shadow-xs);
}

/* ジャンルブロック */
.category-block {
    margin-bottom: 2.5rem;
    scroll-margin-top: 90px;
}

.category-heading {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--color-accent), var(--color-fun)) 1;
    color: var(--color-accent);
}

/* ========== ニュースカード ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.25s, border-color 0.25s;
    border: 1px solid var(--color-border-light);
}

.news-card:hover {
    box-shadow: 0 20px 56px rgba(99, 102, 241, 0.12), 0 8px 24px rgba(0,0,0, 0.06);
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.25);
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg-subtle);
    position: relative;
}

.news-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,0.12), transparent);
    pointer-events: none;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 1.35rem 1.5rem;
}

.news-source {
    font-size: 0.72rem;
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.5rem 0 0.6rem 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

/* ========== 次の記事（シームレスに続けて読む） ========== */
.next-article-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--color-border-light);
}

.next-article-link {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.next-article-next {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary-light));
    color: #fff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.next-article-next:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.next-article-prev {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.next-article-prev:hover {
    background: var(--color-surface);
    color: var(--color-accent);
}

.next-article-back {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.next-article-back:hover {
    background: var(--color-accent-muted);
    color: var(--color-primary);
}

.next-read-section {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 2px dashed var(--color-border-light);
}

.next-read-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    color: var(--color-primary);
}

.related-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem 0;
    color: var(--color-text-secondary);
}

.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-list li {
    margin: 0.35rem 0;
}

.related-list a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.95rem;
}

.related-list a:hover {
    text-decoration: underline;
}

/* ========== ミドルマン フローティング（醜くならない程度に） ========== */
.midorman-float {
    position: fixed;
    right: 1rem;
    bottom: 1.5rem;
    max-width: 280px;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    pointer-events: none;
}

.midorman-float-inner {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 98%);
    border: 2px solid #f59e0b;
    border-radius: 14px 14px 6px 14px;
    padding: 0.65rem 0.9rem 0.75rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25), 0 2px 10px rgba(0,0,0,0.08);
}

.midorman-float-avatar {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.midorman-float-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1c1917;
}

.midorman-float-text br {
    display: block;
    content: "";
    margin-top: 0.35em;
}

@media (max-width: 600px) {
    .midorman-float {
        left: 0.875rem;
        right: 0.875rem;
        bottom: max(1rem, env(safe-area-inset-bottom));
        max-width: none;
    }

    .midorman-float-inner {
        flex: 1;
    }
}

/* ========== ページネーション ========== */
.pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border-light);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-list a,
.pagination-list .pagination-current {
    display: inline-block;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius);
}

.pagination-list a {
    text-decoration: none;
    color: var(--color-accent);
    font-weight: 600;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
    box-shadow: var(--shadow-xs);
}

.pagination-list a:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.pagination-current {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

/* ========== 記事詳細 ========== */
.article-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-accent);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.article-detail--smartnews .article-sn-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.15rem 0;
}
.article-detail--smartnews .article-sn-toolbar .back-link {
    margin-bottom: 0;
}
.article-sn-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.save-article-btn--icon {
    min-width: 2.5rem;
    padding: 0.35rem 0.55rem;
    font-size: 1.05rem;
    line-height: 1;
}
.article-header--below-hero {
    border-bottom: none;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}
.article-detail--smartnews .article-hero {
    margin: 0 0 0.85rem;
    width: 100%;
    border-radius: 0;
}
.article-detail--smartnews .article-image {
    max-height: min(52vw, 340px);
    width: 100%;
    display: block;
}
.article-detail--smartnews .article-title {
    font-size: clamp(1.2rem, 4.2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.38;
    color: var(--color-text);
    margin-top: 0.35rem;
}
:root[data-theme="dark"] .article-detail--smartnews .article-title {
    color: #fff;
}
.article-detail--smartnews .article-meta {
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.article-detail--smartnews .article-source {
    color: var(--color-text-muted);
    font-weight: 600;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.article-source {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.article-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-accent-soft);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--color-accent-muted);
}

.article-title {
    font-size: clamp(1.3rem, 3.6vw, 1.7rem);
    font-weight: 800;
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.article-h2 {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin: 0.5rem 0 0 0;
    letter-spacing: -0.01em;
}

.article-h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1.25rem 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.article-hero {
    margin-bottom: 1.25rem;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.article-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.article-content-wrapper {
    display: block;
}

.article-main {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.article-inline-content .loading {
    color: var(--color-text-muted);
    font-style: italic;
}

/* 記事本文：主役。読みやすく大きく */
.article-with-bubbles .article-text {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 0.65rem 0;
    color: var(--color-text);
}

/* ミドルマン吹き出し：記事の上に自然な解説（ラベルなし）・横から出てくるアニメーション */
@keyframes midorman-bubble-slide-in {
    from {
        opacity: 0;
        transform: translateX(-36px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.midorman-bubble-above {
    position: relative;
    margin: 0 0 1rem 0;
    padding-left: 2.5rem;
    opacity: 0;
    animation: midorman-bubble-slide-in 0.5s ease-out forwards;
}

.midorman-bubble-avatar {
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-size: 1.5rem;
    line-height: 1;
}

.midorman-bubble-inner {
    position: relative;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 14px 14px 14px 4px;
    padding: 0.75rem 1rem 1rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #1c1917;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.midorman-bubble-inner::after {
    content: "";
    position: absolute;
    left: 1.25rem;
    bottom: -10px;
    border: 10px solid transparent;
    border-top-color: #f59e0b;
    border-left-width: 0;
}

.midorman-bubble-text {
    margin: 0;
}

.midorman-bubble-text br {
    display: block;
    content: "";
    margin-top: 0.4em;
}

.article-text {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 0.65rem 0;
    color: var(--color-text);
}

/* ミドルマン解説：キャラが解説してる風のエンタメ感UI */
.midorman-explain {
    margin: 0.75rem 0 1.5rem 0;
    padding: 0;
    background: linear-gradient(145deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 12px 12px 12px 4px;
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.15);
    font-size: 0.95rem;
    line-height: 1.7;
    overflow: hidden;
}

.midorman-explain-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.2) 0%, transparent 100%);
    border-bottom: 1px dashed rgba(234, 179, 8, 0.4);
}

.midorman-explain-avatar {
    font-size: 1.25rem;
    line-height: 1;
}

.midorman-explain-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #a16207;
    letter-spacing: 0.03em;
}

.midorman-explain-body {
    margin: 0;
    padding: 0.75rem 0.85rem 0.85rem;
    color: #422006;
    font-size: 0.95rem;
}

/* 従来のブロック表示（フォールバック用） */
.inline-explain {
    background: #f8fafc;
    border-left: 3px solid var(--color-accent);
    padding: 0.6rem 1rem;
    margin: 0.5rem 0 1rem 0.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
}

.inline-explain p { margin: 0.25rem 0 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--color-text-secondary); }

/* 記事レイアウト：読み物の本文 ＋ ミドルマンの横やり（常時表示・クリック不要） */
.article-readflow {
    max-width: 100%;
}

/* メイン本文＝ニュース（事実）。一体感のある読み物として */
.article-body {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 1.25rem 0;
    letter-spacing: 0.02em;
}

.article-body p {
    margin: 0 0 1.2em 0;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.article-body br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

/* スクロール連動：ポップアップ風吹き出し・記事を邪魔しない位置（text/explain形式のみ） */
.article-with-bubbles .scroll-bubble-group {
    margin: 1.25rem 0 1.25rem auto;
    max-width: min(320px, 85%);
}

.scroll-bubble-group {
    margin: 1.5rem 0;
}

.scroll-trigger {
    height: 8px;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
}

.midorman-bubble-wrap {
    opacity: 0;
    transform: translateY(10px) translateX(20px) scale(0.95);
    transition: opacity 0.4s ease-out, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.midorman-bubble-wrap.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* スクロール連動時：ポップアップ風の見た目に（text/explain形式） */
.article-with-bubbles .scroll-bubble-group .midorman-bubble-above {
    opacity: 1;
    animation: none;
    margin: 0;
    padding-left: 0;
}

.article-with-bubbles .scroll-bubble-group .midorman-bubble-above .midorman-bubble-inner {
    position: relative;
    border-radius: 16px 16px 6px 16px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25), 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.85rem 2.5rem 1rem 1.1rem;
}

.article-with-bubbles .scroll-bubble-group .midorman-bubble-above .midorman-bubble-inner::after {
    left: auto;
    right: 1rem;
    bottom: -8px;
    border-top-color: #f59e0b;
    border-left-width: 8px;
    border-right-width: 0;
}

.article-with-bubbles .scroll-bubble-group .midorman-bubble-above .midorman-bubble-avatar {
    position: absolute;
    right: 0.6rem;
    top: 0.5rem;
    left: auto;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ミドルマンが補足：アニメ風吹き出し・読みやすくはっきり */
.midorman-asides {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 2px dashed rgba(251, 191, 36, 0.4);
}

.midorman-asides-intro {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: #78350f;
    margin: 0 0 1.15rem 0;
    padding: 0.4rem 1rem 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 999px;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.midorman-avatar {
    font-size: 1.35rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.midorman-asides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* 吹き出し風カード：アニメっぽく・文字はしっかり読める */
.midorman-aside {
    position: relative;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px 16px 16px 4px;
    padding: 1rem 1.2rem 1.15rem;
    font-size: 1.02rem;
    line-height: 1.8;
    color: #1c1917;
    font-weight: 500;
    box-shadow:
        0 3px 10px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.midorman-aside-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.midorman-aside-body {
    margin: 0;
    color: #292524;
    text-shadow: 0 0 1px rgba(255,255,255,0.5);
}

.midorman-aside-body br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

.midorman-aside-background .midorman-aside-label { background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%); }
.midorman-aside-impact .midorman-aside-label { background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%); }
.midorman-aside-prediction .midorman-aside-label { background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%); }
.midorman-aside-caution .midorman-aside-label { background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%); }

/* 記事末尾の解説ブロック（隙間なし本文の後にまとめて表示） */
.article-asides {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e7e5e4;
}
.article-asides .article-h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1c1917;
}
.article-asides .midorman-aside-block {
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
}
.article-asides .midorman-aside-block .midorman-aside-label { margin-bottom: 0.4rem; }
.article-asides .article-explain-text {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fefce8;
    border-radius: 8px;
    line-height: 1.7;
}

.read-original {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.82rem;
    padding: 0.25rem 0;
    opacity: 0.45;
    transition: gap 0.2s;
}

.read-original:hover {
    gap: 0.5rem;
    opacity: 0.65;
}

.read-original--pill {
    opacity: 1;
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.84rem;
    font-weight: 600;
    gap: 0.25rem;
}
.read-original--pill:hover {
    opacity: 1;
    background: var(--color-card);
    border-color: var(--color-text-muted);
}
.read-original--pill .read-original-source {
    font-weight: 700;
    color: var(--color-accent);
}
.read-original--pill .read-original-mid {
    color: var(--color-text-secondary);
    font-weight: 500;
}
.read-original--pill .read-original-chev {
    color: var(--color-text-muted);
    margin-left: 0.15rem;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-one-take {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-one-take:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-one-take:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== 5人格セクション ========== */
.personas-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.personas-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    color: var(--color-primary);
}

.personas-hint {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

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

.persona-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.persona-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.persona-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: left;
}

.persona-trigger:hover {
    background: var(--color-bg);
}

.persona-emoji {
    font-size: 1.35rem;
}
.persona-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid var(--color-border-light);
}

.persona-name {
    flex: 1;
    font-weight: 600;
}

.persona-arrow {
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.persona-content {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--color-border-light);
}

.persona-opinion {
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

.persona-loading {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.persona-error {
    font-size: 0.85rem;
    color: var(--color-accent);
}
.personas-all-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.personas-all-avatar {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--color-border-light);
}

/* ========== フッター ========== */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    background: linear-gradient(145deg, var(--color-primary) 0%, #312e81 50%, var(--color-primary-dark) 100%);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-inner p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.88);
    margin: 0;
}

/* ========== レスポンシブ（モバイルファースト対応） ========== */

/* タブレット */
@media (max-width: 900px) {
    .page-top {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
    }

    .trends-sidebar {
        position: static;
    }
}

/* ========== スマホ専用デザイン（見やすさ最優先） ========== */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    body {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    }

    /* セーフエリア（ノッチ・ホームインジケータ対応） */
    .main-content {
        padding: 1rem 0.75rem;
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .site-footer {
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    /* ヘッダー：シンプルでタップしやすく（ノッチ対応） */
    .site-header {
        padding-top: env(safe-area-inset-top);
    }

    .header-inner {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.25rem;
        flex: 1;
        min-width: 0;
    }

    .logo-tagline {
        font-size: 0.65rem;
    }

    .nav-main {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .nav-main a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-login, .btn-refresh {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 44px;
    }

    /* ヒーロー：スマホ向けにコンパクトかつ印象的に */
    .hero {
        padding: 1.5rem 0;
        border-left-width: 4px;
    }

    .hero h1 {
        font-size: 1.7rem;
        line-height: 1.35;
        margin-bottom: 0.6rem;
    }

    .hero-desc {
        font-size: 1rem;
        line-height: 1.75;
        color: var(--color-text-secondary);
    }

    .btn-add-article {
        width: 100%;
        justify-content: center;
        min-height: 52px;
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
        border-radius: 14px;
        margin-top: 1rem;
    }

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

    .hero-buttons .btn-add-article,
    .hero-buttons .btn-rss-one {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    /* 注目1本：カードを読みやすく */
    .added-one-box {
        padding: 1.25rem;
        border-radius: 16px;
        margin-top: 1.25rem;
    }

    .added-one-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .added-one-card {
        border-radius: 14px;
    }

    .added-one-body {
        padding: 1rem 1rem;
    }

    .added-one-heading {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .added-one-summary {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* トレンド：タップしやすい行 */
    .trends-sidebar {
        padding: 1.25rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .trends-list a {
        padding: 0.75rem 0;
        font-size: 0.95rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    /* ジャンルタブ：横スクロール＋スワイプ */
    .news-section .section-title {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }

    .genre-tabs-scroll {
        padding: 0.75rem 1rem 1rem;
        margin: 0 -1rem 1.25rem;
        scrollbar-width: none;
        box-shadow: inset -1.5rem 0 1rem -0.5rem var(--color-bg);
    }

    .genre-tabs-scroll::-webkit-scrollbar {
        display: none;
    }

    .genre-tabs-scroll .genre-tab {
        min-height: 48px;
        padding: 0.65rem 1.25rem;
        display: inline-flex;
        align-items: center;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .category-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding: 0.75rem 1rem 1rem;
        margin: 0 -1rem 1.25rem;
        gap: 0.5rem;
        scrollbar-width: none;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex-shrink: 0;
        min-height: 48px;
        padding: 0.65rem 1.25rem;
        display: inline-flex;
        align-items: center;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    /* ジャンルブロック：見やすい区切り */
    .category-block {
        margin-bottom: 2rem;
        scroll-margin-top: 5rem;
    }

    .category-heading {
        font-size: 1.1rem;
        padding: 0.5rem 0 0.6rem;
        margin-bottom: 0.75rem;
        border-bottom: 3px solid;
        border-image: linear-gradient(90deg, var(--color-accent), var(--color-fun)) 1;
    }

    /* ニュースカード：タップ領域を広く・読みやすく */
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-card {
        min-height: 0;
        border-radius: 14px;
        overflow: hidden;
    }

    .news-card-link {
        display: block;
    }

    .news-card-body {
        padding: 1.15rem 1.25rem;
    }

    /* 記事タイトル：目を引くデザイン（スマホ） */
    .news-title {
        font-size: 1.08rem;
        font-weight: 700;
        line-height: 1.5;
        -webkit-line-clamp: 2;
        color: var(--color-primary);
        letter-spacing: -0.02em;
    }

    @supports (background-clip: text) {
        .news-card .news-title {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
    }

    .news-summary {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* 記事詳細：読了性を最優先 */
    .article-detail {
        max-width: 100%;
    }

    .article-title {
        font-size: 1.25rem;
        line-height: 1.35;
    }

    .article-hero {
        margin-bottom: 1.25rem;
        border-radius: 0;
    }

    .article-image {
        max-height: 200px;
    }

    .article-main {
        padding: 1rem 0.9rem;
        border-radius: 0;
    }

    .article-with-bubbles .article-text,
    .article-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .article-with-bubbles .scroll-bubble-group {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .article-inline-content .midorman-bubble-above,
    .article-inline-content .midorman-bubble-wrap .midorman-bubble-above {
        padding-left: 2.5rem;
    }

    .article-with-bubbles .scroll-bubble-group .midorman-bubble-above .midorman-bubble-inner {
        padding: 0.9rem 1rem 1rem;
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .article-with-bubbles .scroll-bubble-group .midorman-bubble-above .midorman-bubble-avatar {
        right: 0.5rem;
        top: 0.4rem;
        font-size: 1.2rem;
    }

    .midorman-bubble-avatar {
        font-size: 1.35rem;
    }

    /* 記事アクション：親指で届く大きなボタン */
    .article-actions {
        flex-direction: column;
        gap: 0.55rem;
        margin-top: 1rem;
    }

    .read-original, .btn-one-take {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 0.7rem 1rem;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    /* パーソナカード：見やすく開きやすく */
    .personas-section {
        margin-top: 2rem;
    }

    .personas-title {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    .personas-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .persona-trigger {
        min-height: 52px;
        padding: 0.9rem 1rem;
        width: 100%;
        justify-content: space-between;
        border-radius: 12px;
        font-size: 1rem;
    }

    /* ページネーション */
    .pagination {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .pagination-list a,
    .pagination-list .pagination-current {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem 1.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 次の記事：シームレスに続けて読める */
    .next-article-nav {
        margin-top: 2rem;
        padding-top: 1.5rem;
        gap: 0.75rem;
    }

    .next-article-link {
        flex: 1;
        min-width: 140px;
        justify-content: center;
        min-height: 48px;
    }

    .next-article-next {
        flex: 1 1 100%;
    }

    .site-footer {
        margin-top: 2.5rem;
        padding: 1.5rem 1rem;
    }

    .footer-inner p {
        font-size: 0.9rem;
    }
}

/* 確認ページ・管理画面 */
.confirm-page,
.admin-login-wrap,
.admin-manual-wrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* 小型スマホ（375px以下）向けの微調整 */
@media (max-width: 480px) {
    .header-inner {
        padding: 0.65rem 0.875rem;
    }

    .main-content {
        padding: 1rem 0.875rem;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }

    .logo {
        font-size: 1.15rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

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

    .section-title {
        font-size: 1.1rem;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .article-main {
        padding: 1.25rem 1rem;
    }

    .added-one-heading {
        font-size: 1.05rem;
    }

    .added-one-box {
        padding: 1rem;
    }

    .news-card-body {
        padding: 1rem 1.15rem;
    }

    .confirm-article-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .confirm-article-link {
        flex: none;
        width: 100%;
    }

    .admin-login-wrap,
    .admin-manual-wrap {
        margin: 1rem auto;
        padding: 1rem !important;
    }
}

/* ========== 管理者：手動記事追加 ========== */
.admin-login-wrap,
.admin-manual-wrap {
    max-width: 560px;
    margin: 2rem auto;
    padding: 1.5rem;
}

.admin-login-wrap h1,
.admin-manual-wrap h1 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.admin-desc {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.admin-form label {
    display: block;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

.admin-form label .required {
    color: #dc2626;
    font-size: 0.85em;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="url"],
.admin-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
}

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

.admin-form button[type="submit"] {
    margin-top: 1.25rem;
    padding: 0.65rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}

.admin-form button[type="submit"]:hover:not(:disabled) {
    background: var(--color-accent-hover);
}

.admin-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.admin-error {
    color: #dc2626;
    background: #fef2f2;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.admin-success {
    color: #059669;
    background: #ecfdf5;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.admin-manual-wrap p a {
    color: var(--color-accent);
    margin-right: 0.75rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 100%);
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(168,85,247,0.1) 0%, transparent 60%);
    animation: hero-glow 8s ease-in-out infinite alternate;
}
@keyframes hero-glow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-badge {
    display: inline-block;
    background: rgba(59,130,246,0.2);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.3);
    padding: 0.3rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hero-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}
.hero-desc {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== ANIMATIONS ===== */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out both;
}
.animate-slide-up {
    animation: slideUp 0.6s ease-out both;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== PAGE LAYOUT ===== */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 1rem;
    max-width: 100%;
    margin: 0;
    padding: 0.55rem 0;
}
.content-main { min-width: 0; }

/* ===== ENHANCED NEWS CARDS (横長レイアウト) ===== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}
.news-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: none;
    border: none;
    border-bottom: 1px solid var(--color-border-light);
}
.news-card:hover {
    transform: none;
    box-shadow: none;
}
.news-card-link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    padding: 0.55rem 0;
}
.news-card-image {
    display: block;
    position: relative;
    width: 102px;
    min-width: 102px;
    height: 76px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
    align-self: flex-start;
}
.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.news-card:hover .news-card-image img {
    transform: scale(1.05);
}
.news-card-category {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}
.news-card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.news-card-time { white-space: nowrap; }
.news-card .news-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-summary-line {
    font-size: 0.79rem;
    color: var(--color-text-muted);
    line-height: 1.35;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.news-card-ai {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
}
.news-card-footer {
    display: none;
}
.news-badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent), #a855f7);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

/* ===== GENRE TABS (horizontal scroll on mobile) ===== */
.genre-tabs-wrap {
    margin-bottom: 1.5rem;
    position: relative;
    top: auto;
    z-index: auto;
    background: transparent;
    padding: 0;
}
.genre-tabs-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}
.genre-tabs-scroll::-webkit-scrollbar { display: none; }
.genre-tabs-scroll .genre-tab {
    flex: 0 0 auto;
    padding: 0.45rem 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    background: var(--color-bg-elevated);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--color-text-secondary);
    border-bottom-width: 3px;
    border-bottom-color: transparent;
}
.genre-tabs-scroll .genre-tab:hover:not(.is-active):not([aria-selected="true"]) {
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--color-text);
}
.genre-tabs-scroll .genre-tab.is-active,
.genre-tabs-scroll .genre-tab[aria-selected="true"] {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

:root[data-theme="dark"] .news-card .news-title {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.45;
    -webkit-line-clamp: 3;
}
:root[data-theme="dark"] .news-card-meta {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}
:root[data-theme="dark"] .news-summary-line {
    color: #b0b0b0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

/* ===== INFINITE SCROLL ===== */
.infinite-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: var(--color-text-muted);
    gap: 0.75rem;
}
.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.infinite-end {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}
.trends-box {
    background: var(--color-card);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}
.sidebar-desc { margin: 0 0 0.75rem; font-size: 0.9rem; }
.sidebar-desc a { color: var(--color-primary); text-decoration: none; }
.sidebar-desc a:hover { text-decoration: underline; }
.trends-list, .papers-list { list-style: none; padding: 0; margin: 0; }
.trends-list li, .papers-list li { margin-bottom: 0.5rem; }
.news-card-source-inline {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-right: 0.35rem;
}
.trend-link-internal {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    font-size: 0.88rem;
    transition: background 0.15s;
}
.trend-link-internal:hover { background: #f1f5f9; }

/* ===== SEARCH ===== */
.search-box { max-width: 600px; margin: 1.5rem auto; padding: 0 1rem; }
.search-form { display: flex; gap: 0.5rem; }
.search-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--color-accent); }
.search-btn {
    padding: 0.7rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}
.search-result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.search-keyword-msg {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
}
.search-clear {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
}
.search-result-count { text-align: center; color: var(--color-text-muted); margin: 1rem 0; }
.search-page-wrap {
    max-width: 880px;
    margin: 0 auto;
}
.search-box--rich {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(236,72,153,0.06));
    border: 1px solid rgba(99,102,241,0.22);
    border-radius: 16px;
    padding: 1rem;
}
.search-helper-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}
.search-chip {
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-accent-soft);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
}
.search-chip:hover {
    background: #dbe3ff;
}
.search-result-count--rich {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    display: inline-block;
    margin: 0.9rem auto 1rem;
}

/* ===== PAGE SWITCH (papers/news) ===== */
.page-switch {
    display: inline-flex;
    gap: 0.45rem;
    margin: 0 0 0.9rem;
    padding: 0.25rem;
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    background: var(--color-bg-elevated);
}
.page-switch-link {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}
.page-switch-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}
.page-switch-link.is-active,
.page-switch-link[aria-current="page"] {
    background: var(--color-accent);
    color: #fff;
}

/* ===== PAGE HEADERS ===== */
.page-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}
.page-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 0.25rem;
}
.page-desc { color: var(--color-text-muted); margin: 0; }
.empty-msg { text-align: center; color: var(--color-text-muted); padding: 3rem 1rem; }

/* ===== PAPERS: FILTER SELECT ===== */
.paper-filter-wrap {
    margin: 0.25rem 0 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}
.paper-filter-wrap label {
    font-weight: 700;
    color: var(--color-text-secondary);
}
#paper-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: min(320px, 100%);
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
}
#paper-filter-select:focus {
    border-color: var(--color-accent);
}

/* ===== AI PAGE ===== */
.ai-section { margin-bottom: 2rem; }
.ai-section-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 1rem; }
.ai-memo-card {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-radius: 16px;
    padding: 1.25rem;
    line-height: 1.7;
    border: 1px solid #bfdbfe;
}
.ai-persona-comment {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--color-card);
    border-radius: 12px;
}
.ai-persona-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--color-border-light);
    flex: 0 0 auto;
}
.ai-persona-emoji { font-size: 1.5rem; flex: 0 0 auto; }

/* ===== MOBILE BOTTOM BAR ===== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border-light);
    padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom, 0px));
    /* キーボード展開などで隠れにくくする */
    transform: translateZ(0);
}
.bottom-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    transition: color 0.15s;
    padding: 0.25rem 0;
}
.bottom-bar-icon { font-size: 1.2rem; }
.bottom-bar-item.is-active { color: var(--color-accent); }

:root[data-theme="dark"] .mobile-bottom-bar {
    background: rgba(17,24,39,0.92);
}

/* ===== 軽量トースト（スクリーンリーダー用ライブリージョンと併用） ===== */
.site-toast-region {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: min(92vw, 420px);
    pointer-events: none;
}
.site-toast {
    pointer-events: auto;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-elevated);
    color: var(--color-text);
    animation: toast-in 0.28s ease-out;
}
.site-toast--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}
:root[data-theme="dark"] .site-toast {
    background: rgba(30, 41, 59, 0.96);
    color: #e5e7eb;
    border-color: rgba(71, 85, 105, 0.6);
}
:root[data-theme="dark"] .site-toast--error {
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.45);
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .site-toast { animation: none; }
}

/* ===== 記事：パンくず・読書進捗・先頭へ ===== */
.article-breadcrumb {
    margin: 0 0 0.65rem;
    padding: 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.article-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}
.article-breadcrumb li:not(:last-child)::after {
    content: '/';
    color: var(--color-border);
    font-weight: 500;
    opacity: 0.85;
}
.article-breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}
.article-breadcrumb a:hover {
    text-decoration: underline;
}
.article-breadcrumb [aria-current="page"] {
    color: var(--color-text-secondary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(100%, 56vw);
}

.article-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: rgba(148, 163, 184, 0.25);
    border: 0;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
}
.article-read-progress::-webkit-progress-bar {
    background: transparent;
}
.article-read-progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--color-accent), #a855f7);
    border-radius: 0 2px 2px 0;
}
.article-read-progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--color-accent), #a855f7);
}

.back-to-top {
    position: fixed;
    bottom: calc(4.35rem + env(safe-area-inset-bottom, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    z-index: 950;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-elevated);
    color: var(--color-accent);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (min-width: 1025px) {
    .back-to-top {
        bottom: 1.5rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

.infinite-load-error {
    display: none;
    margin: 0.75rem auto 0;
    padding: 0.65rem 0.9rem;
    max-width: 28rem;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
}
.infinite-retry-btn {
    margin-top: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-accent);
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
}
:root[data-theme="dark"] .infinite-load-error {
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.45);
}

/* ===== ARTICLE: QUICK UNDERSTAND ===== */
.quick-understand {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.quick-understand-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.quick-understand-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.6;
}
.quick-understand-label {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--color-accent);
    min-width: 5em;
}

/* ===== ARTICLE: READ MODE SWITCH ===== */
.read-mode-switch {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.read-mode-btn {
    padding: 0.45rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.read-mode-btn.is-active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
:root[data-theme="dark"] .read-mode-btn {
    background: var(--color-card);
    border-color: var(--color-border-light);
    color: var(--color-text);
}
:root[data-theme="dark"] .read-mode-btn.is-active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* ===== ARTICLE: VOTE METER ===== */
.vote-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-card);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.vote-question {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}
.vote-options { display: flex; flex-direction: column; gap: 0.5rem; }
.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.92rem;
}
.vote-btn:hover { border-color: var(--color-accent); background: #f8fafc; }
.vote-btn.voted { border-color: var(--color-accent); background: #eff6ff; }
.vote-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.vote-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), #a855f7);
    border-radius: 999px;
    transition: width 0.5s ease;
    width: 0%;
}
.vote-pct { font-weight: 700; min-width: 3em; text-align: right; font-size: 0.85rem; }
.vote-label { min-width: 6em; font-weight: 600; }
#vote-quiz-result { white-space: pre-line; }

/* ===== ARTICLE: SAVE BUTTON ===== */
.save-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.save-article-btn.is-saved {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
}

/* ===== ARTICLE: NAVIGATION / RELATED ===== */
.article-navigation {
    margin-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
    padding-top: 1.25rem;
}
.article-nav-section { margin-bottom: 1.25rem; }
.article-nav-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.6rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section { padding: 2rem 1rem 1.5rem; }
    .hero-title { font-size: 1.5rem; }
    .page-layout { grid-template-columns: 1fr; gap: 1rem; padding: 0.85rem 0.85rem; }
    .main-content {
        padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
    }
    .top-picks { margin: 0.25rem 0 0.75rem; }
    .top-picks-title { font-size: 0.88rem; margin-bottom: 0.45rem; }
    .top-picks-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.45rem;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0.35rem;
        padding: 0 0 0.45rem;
        scrollbar-width: thin;
    }
    .top-picks-grid::-webkit-scrollbar {
        height: 5px;
    }
    .top-picks-grid::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.55);
        border-radius: 999px;
    }
    .top-pick-card {
        border-radius: 10px;
        flex: 0 0 clamp(168px, 48vw, 228px);
        scroll-snap-align: start;
        max-width: min(228px, 78vw);
    }
    .top-pick-link img { height: 72px; }
    .top-pick-body { padding: 0.38rem 0.4rem 0.48rem; }
    .top-pick-body h3 {
        font-size: 0.74rem;
        line-height: 1.32;
        margin: 0.15rem 0 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        overflow: hidden;
        overflow-wrap: anywhere;
    }
    .top-pick-meta {
        font-size: 0.62rem;
        margin-top: 0.12rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .search-form {
        flex-direction: column;
        gap: 0.55rem;
    }
    .search-btn {
        width: 100%;
        min-height: 46px;
    }
    .search-input {
        min-height: 46px;
        font-size: 0.98rem;
    }
    .search-helper-chips {
        gap: 0.4rem;
    }
    .search-chip {
        font-size: 0.75rem;
        padding: 0.32rem 0.62rem;
    }
    .sidebar { display: none; }
    .news-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .news-card-link { gap: 0.6rem; padding: 0.55rem 0; }
    .news-card-image { width: 96px; min-width: 96px; height: 72px; aspect-ratio: 4 / 3; }
    .news-card-body { padding: 0.3rem 0.45rem; justify-content: flex-start; }
    .news-card-meta { font-size: 0.72rem; }
    .news-card-category { top: 0.35rem; left: 0.35rem; font-size: 0.62rem; padding: 0.12rem 0.42rem; }
    .news-card .news-title { font-size: 0.84rem; -webkit-line-clamp: 2; }
    .news-summary-line { font-size: 0.74rem; -webkit-line-clamp: 2; }
    .news-card-footer { display: none; }
    .sp-only { display: inline; }
    .genre-tabs-wrap { top: auto; position: relative; }
    .paper-filter-wrap { margin: 0.25rem 0 1rem; }
    .logo-image {
        width: 24px;
        height: 24px;
    }
    .personas-directory {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }
    .persona-directory-card {
        padding: 0.5rem;
    }
    .persona-directory-name {
        font-size: 0.9rem;
    }
    .persona-directory-note {
        font-size: 0.76rem;
    }
    .persona-detail-layout {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
    .persona-profile-title {
        font-size: 1.06rem;
    }
    .persona-prompt-details p {
        font-size: 0.76rem;
    }
}
@media (min-width: 769px) {
    .sp-only { display: none; }
}

/* スマホ横持ち・小さめタブレットでも下部ナビを常時表示し、固定バーと干渉しない余白を確保 */
@media (max-width: 1024px) {
    .mobile-bottom-bar {
        display: flex;
    }
    .site-footer {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }
    main.main-content {
        padding-bottom: max(5rem, calc(4.25rem + env(safe-area-inset-bottom, 0px)));
    }
}

/* デスクトップブラウザ：読み幅・ヘッダー・おすすめ帯を揃えて余白を確保 */
@media (min-width: 1025px) {
    .mobile-bottom-bar {
        display: none;
    }
    .main-content {
        max-width: 1200px;
        padding: 1.1rem 1.35rem;
    }
    .header-inner {
        max-width: 1200px;
        padding: 1rem 1.75rem;
    }
    .page-layout {
        grid-template-columns: 1fr minmax(200px, 248px);
        gap: 1.35rem;
        padding: 0.7rem 0.5rem;
    }
    .top-picks-grid { gap: 0.75rem; }
    .top-pick-link img { height: 108px; }
    .top-pick-body { padding: 0.55rem 0.65rem 0.72rem; }
    .top-pick-body h3 { font-size: 0.92rem; line-height: 1.38; }
    .top-pick-meta { font-size: 0.78rem; }
    .page-switch-link {
        font-size: 0.9rem;
        padding: 0.5rem 1.15rem;
    }
}

/* ===== ARTICLE NAV GRID (small cards) ===== */
.nav-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.news-card-sm {
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.news-card-sm:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.16);
}
.news-card-sm .news-card-link {
    padding: 0.15rem;
}
.news-card-sm .news-card-body { padding: 0.95rem 1rem; }
.news-card-sm .news-title {
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0.45rem;
}
.article-nav-teaser {
    margin: 0 0 0.55rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-nav-cta {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent);
}
.news-card-sm:hover .article-nav-cta {
    text-decoration: underline;
}
.news-card-category-inline {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

/* ===== ARTICLE HEADER ACTIONS ===== */
.article-header-actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; }
.article-date { font-size: 0.85rem; color: var(--color-text-muted); }
.article-cat-badge { font-size: 0.85rem; color: var(--color-accent); font-weight: 600; }

.live-readers {
    margin: 0.5rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.86rem;
}

.article-fixed-section-title {
    margin: 0.5rem 0 0.75rem;
    font-size: 1rem;
}

.impact-box,
.score-box {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    background: var(--color-surface);
}

.score-value {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0.25rem 0 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.insight-list {
    margin: 0.3rem 0 0.75rem;
}

/* ===== EXPLAIN BLOCK (deep content) ===== */
.explain-block {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ===== LOGO TAGLINE ===== */
.logo-tagline {
    display: block;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}
.logo-wrap { text-decoration: none; color: inherit; }

/* ===== HEADER REFINEMENT ===== */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
}

/* ===== SHORT SUMMARY (1分で理解) ===== */
.short-summary-box {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.short-summary-heading {
    font-size: 0.98rem;
    font-weight: 800;
    margin: 0 0 0.55rem;
}
.short-point {
    margin-bottom: 0.55rem;
    padding-left: 0.45rem;
    border-left: 2px solid var(--color-accent);
}
.short-point-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.2rem;
}
.short-point p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 3つのポイント（1分で理解） */
.three-points-card {
    background: var(--color-card);
    border-radius: 18px;
    padding: 1.1rem 1rem 0.85rem;
    margin: 0 0 1rem;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.three-points-card-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}
.three-points-mascot {
    font-size: 1.35rem;
    line-height: 1;
}
.three-points-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.three-points-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.three-points-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    padding: 0.65rem 0;
    border-top: 1px solid var(--color-border-light);
}
.three-points-row:first-of-type {
    border-top: none;
    padding-top: 0;
}
.three-points-q {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.1rem;
}
.three-points-q--red { color: #dc2626; }
.three-points-q--orange { color: #c2410c; }
/* ライトモードではミント系の薄色は背景に埋もれるため濃いめに */
.three-points-q--green { color: #047857; }
.three-points-a {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text);
    font-weight: 500;
}
:root[data-theme="dark"] .three-points-card {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: none;
}
:root[data-theme="dark"] .three-points-q--red { color: #ff5252; }
:root[data-theme="dark"] .three-points-q--orange { color: #ffb74d; }
:root[data-theme="dark"] .three-points-q--green { color: #98ff98; }
.sn-text-highlight {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
    text-decoration-color: #15803d;
    font-weight: 700;
    color: inherit;
}
:root[data-theme="dark"] .sn-text-highlight {
    text-decoration-color: #4ade80;
}
.article-lead-smartnews {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--color-text);
    font-weight: 500;
}
.short-summary-box--lead-only {
    padding-top: 0.15rem;
}

/* ===== MIDORMAN FLOAT ===== */
.midorman-float {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    z-index: 900;
    max-width: 320px;
    background: rgba(255,255,255,0.97);
    border: 2px solid var(--color-accent);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 32px rgba(99,102,241,0.18);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    animation: floatIn 0.4s ease-out;
    backdrop-filter: blur(8px);
}
.midorman-float-avatar { font-size: 1.5rem; flex: 0 0 auto; }
.midorman-float-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(99,102,241,0.35);
    flex: 0 0 auto;
}
.midorman-float-inner { flex: 1; min-width: 0; }
.midorman-float-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #334155;
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== MOBILE (white/clean theme) ===== */
@media (max-width: 768px) {
    .site-header {
        background: #fff;
        border-bottom: 1px solid #e2e8f0;
        position: relative;
        overflow: hidden;
    }
    .site-header::before {
        content: '';
        position: absolute;
        bottom: 0; left: 0; right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--color-accent), #a855f7, #ec4899);
        animation: header-bar-shimmer 3s ease-in-out infinite;
    }
    @keyframes header-bar-shimmer {
        0%, 100% { opacity: 0.7; }
        50% { opacity: 1; }
    }
    .site-header .header-inner { position: relative; z-index: 1; }

    body { background: #f8fafc; color: #1e293b; }

    .hero-section { padding: 1.5rem 1rem 1.25rem; }
    .hero-title { font-size: 1.4rem; }
    .hero-desc { font-size: 0.88rem; }

    .news-card { background: transparent; border: none; border-bottom: 1px solid var(--color-border-light); box-shadow: none; }
    .news-card .news-title { color: inherit; font-size: 0.84rem; }
    .news-card-meta { color: var(--color-text-muted); }
    .news-summary-line { color: var(--color-text-muted); font-size: 0.74rem; }

    .genre-tabs-scroll .genre-tab { background: #fff; border-color: #e2e8f0; color: #475569; }
    .genre-tabs-wrap { background: rgba(248,250,252,0.95); backdrop-filter: blur(8px); }

    .article-detail { background: transparent; border-radius: 0; padding: 0; margin: 0; box-shadow: none; }
    .quick-understand { background: #f0f9ff; border-color: #bfdbfe; }
    .short-summary-box { background: transparent; border: none; padding: 0; box-shadow: none; }

    .mobile-bottom-bar {
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(12px);
        border-top: 1px solid #e2e8f0;
    }
    .bottom-bar-item { color: #94a3b8; }
    .bottom-bar-item.is-active { color: var(--color-accent); }

    .site-footer { background: #fff; color: #94a3b8; border-top: 1px solid #e2e8f0; }

    .midorman-float {
        bottom: 4.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        background: rgba(255,255,255,0.98);
        border-color: var(--color-accent);
    }
    .midorman-float-text { color: #334155; }

    .persona-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
    .persona-avatar { border-color: #cbd5e1; }
    .vote-section { background: #fff; border: 1px solid #e2e8f0; }
    .vote-btn { background: #fff; border-color: #e2e8f0; color: #334155; }
    .vote-btn:hover { border-color: var(--color-accent); background: #f8fafc; }

    .news-card-sm { background: transparent; border: none; }
}

/* ===== MOBILE: DARK MODE overrides ===== */
@media (max-width: 768px) {
    :root[data-theme="dark"] .site-header {
        background: var(--color-bg-elevated);
        border-bottom: 1px solid var(--color-border-light);
    }
    :root[data-theme="dark"] body {
        background: var(--color-bg);
        color: var(--color-text);
    }
    :root[data-theme="dark"] .news-card {
        background: transparent;
        border: none;
        border-bottom: 1px solid var(--color-border-light);
        box-shadow: none;
    }
    :root[data-theme="dark"] .news-card .news-title {
        color: #fff;
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1.45;
        -webkit-line-clamp: 3;
    }
    :root[data-theme="dark"] .news-card-meta { color: var(--color-text-muted); }
    :root[data-theme="dark"] .news-summary-line { color: var(--color-text-muted); font-size: 0.74rem; -webkit-line-clamp: 2; }
    :root[data-theme="dark"] .genre-tabs-scroll .genre-tab {
        background: var(--color-bg-elevated);
        border-color: var(--color-border-light);
        color: var(--color-text-secondary);
    }
    :root[data-theme="dark"] .genre-tabs-wrap {
        background: var(--color-bg);
        backdrop-filter: blur(8px);
    }
    :root[data-theme="dark"] .genre-tabs-scroll .genre-tab.is-active,
    :root[data-theme="dark"] .genre-tabs-scroll .genre-tab[aria-selected="true"] {
        background: var(--color-accent);
        color: #fff;
        border-color: var(--color-accent);
        border-bottom-color: var(--color-accent);
    }
    :root[data-theme="dark"] .site-footer {
        background: var(--color-surface);
        color: var(--color-text-muted);
        border-top: 1px solid var(--color-border-light);
    }
}

/* ================================================================
   14キャラクター個性カラーシステム
   --pc: キャラクターカラー  --pc-soft: 薄い背景色
   ================================================================ */
.persona-p0  { --pc: #6366f1; --pc-soft: #eef2ff; } /* セミナ: インディゴ（分析）*/
.persona-p1  { --pc: #10b981; --pc-soft: #ecfdf5; } /* ヴォルテ: エメラルド（投資）*/
.persona-p2  { --pc: #7c3aed; --pc-soft: #ede9fe; } /* カゲロウ: ダークバイオレット（影）*/
.persona-p3  { --pc: #f97316; --pc-soft: #fff7ed; } /* くらしあ: オレンジ（生活・暖）*/
.persona-p4  { --pc: #a855f7; --pc-soft: #faf5ff; } /* アルシエル: バイオレット（神秘）*/
.persona-p5  { --pc: #d97706; --pc-soft: #fffbeb; } /* クロニクル: アンバー（セピア）*/
.persona-p6  { --pc: #ef4444; --pc-soft: #fef2f2; } /* ブレイズ: レッド（怒り・炎）*/
.persona-p7  { --pc: #64748b; --pc-soft: #f1f5f9; } /* ノアフォール: スレート（憂鬱）*/
.persona-p8  { --pc: #0ea5e9; --pc-soft: #f0f9ff; } /* そらみ: スカイ（無邪気）*/
.persona-p9  { --pc: #1d4ed8; --pc-soft: #eff6ff; } /* レガリア: ディープブルー（権威）*/
.persona-p10 { --pc: #eab308; --pc-soft: #fefce8; } /* リュミエ: ゴールド（自由・光）*/
.persona-p11 { --pc: #059669; --pc-soft: #ecfdf5; } /* ジャスティア: ティール（正義）*/
.persona-p12 { --pc: #94a3b8; --pc-soft: #f8fafc; } /* 観測体オメガ: シルバー（機械的）*/
.persona-p13 { --pc: #dc2626; --pc-soft: #fff1f2; } /* ゼロ・カオス: クリムゾン（虚無）*/

/* ペルソナ一覧ページ: カード左アクセントボーダー + バッジ色 */
.persona-directory-card.persona-p0,
.persona-directory-card.persona-p1,
.persona-directory-card.persona-p2,
.persona-directory-card.persona-p3,
.persona-directory-card.persona-p4,
.persona-directory-card.persona-p5,
.persona-directory-card.persona-p6,
.persona-directory-card.persona-p7,
.persona-directory-card.persona-p8,
.persona-directory-card.persona-p9,
.persona-directory-card.persona-p10,
.persona-directory-card.persona-p11,
.persona-directory-card.persona-p12,
.persona-directory-card.persona-p13 {
    border-left: 4px solid var(--pc);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.persona-directory-card[class*="persona-p"] .persona-directory-type {
    background: var(--pc-soft);
    color: var(--pc);
    border: 1px solid var(--pc);
}
.persona-directory-card[class*="persona-p"] .persona-directory-detail-link {
    color: var(--pc);
}
.persona-directory-card[class*="persona-p"]:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.persona-directory-card[class*="persona-p"] .persona-directory-img {
    border-bottom: 3px solid var(--pc);
}

/* 記事ページのペルソナカード: data-persona-id で個性カラーを適用 */
.persona-card[data-persona-id="0"]  { --pc: #6366f1; --pc-soft: #eef2ff; }
.persona-card[data-persona-id="1"]  { --pc: #10b981; --pc-soft: #ecfdf5; }
.persona-card[data-persona-id="2"]  { --pc: #7c3aed; --pc-soft: #ede9fe; }
.persona-card[data-persona-id="3"]  { --pc: #f97316; --pc-soft: #fff7ed; }
.persona-card[data-persona-id="4"]  { --pc: #a855f7; --pc-soft: #faf5ff; }
.persona-card[data-persona-id="5"]  { --pc: #d97706; --pc-soft: #fffbeb; }
.persona-card[data-persona-id="6"]  { --pc: #ef4444; --pc-soft: #fef2f2; }
.persona-card[data-persona-id="7"]  { --pc: #64748b; --pc-soft: #f1f5f9; }
.persona-card[data-persona-id="8"]  { --pc: #0ea5e9; --pc-soft: #f0f9ff; }
.persona-card[data-persona-id="9"]  { --pc: #1d4ed8; --pc-soft: #eff6ff; }
.persona-card[data-persona-id="10"] { --pc: #eab308; --pc-soft: #fefce8; }
.persona-card[data-persona-id="11"] { --pc: #059669; --pc-soft: #ecfdf5; }
.persona-card[data-persona-id="12"] { --pc: #94a3b8; --pc-soft: #f8fafc; }
.persona-card[data-persona-id="13"] { --pc: #dc2626; --pc-soft: #fff1f2; }

.persona-card[data-persona-id] {
    border-left-width: 3px;
    border-left-color: var(--pc, var(--color-border));
}
.persona-card[data-persona-id] .persona-avatar {
    border-color: var(--pc, var(--color-border-light));
    box-shadow: 0 0 0 2px var(--pc-soft, transparent);
}
.persona-card[data-persona-id] .persona-trigger:hover {
    background: var(--pc-soft, var(--color-bg));
}
.persona-card[data-persona-id] .persona-content {
    border-top-color: var(--pc, var(--color-border-light));
    background: var(--pc-soft, transparent);
}
.persona-card[data-persona-id] .persona-name {
    color: var(--pc, var(--color-text));
}

/* ダークモード対応: persona カードの背景は透過 */
:root[data-theme="dark"] .persona-card[data-persona-id] .persona-content {
    background: color-mix(in srgb, var(--pc-soft, #f0f0f0) 12%, transparent);
}
