/* ======================
   漫画RSSアーカイブ - CSS
   キャッチーデザイン
   ====================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --accent: #f472b6;
    --accent2: #34d399;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #fbbf24;
    --bg: #f0f2f8;
    --bg-card: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 14px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.1);
    --shadow-color: 0 4px 20px rgba(99,102,241,0.15);
}

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

/* === SVG Icons === */
.ic { width: 16px; height: 16px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.ic-nav { width: 16px; height: 16px; margin-right: 3px; }
.ic-logo { width: 20px; height: 20px; }
.ic-btn { width: 14px; height: 14px; margin-right: 2px; }
.ic-card { width: 16px; height: 16px; }
.ic-grip { width: 14px; height: 20px; opacity: 0.4; }
.ic-placeholder { width: 28px; height: 28px; opacity: 0.4; }
.ic-star-badge { width: 16px; height: 16px; color: var(--warning); filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }
.ic-filter-star { width: 14px; height: 14px; margin-right: 2px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: var(--bg);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* === Header === */
.header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(30,27,75,0.3);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo {
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Logo icon is SVG via PHP icon() helper */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-link {
    color: rgba(255,255,255,0.75);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.nav-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.18); color: #fff; }
.btn-link { background: none; border: none; cursor: pointer; font: inherit; }
.inline-form { display: inline; }

/* === Main === */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
}

/* === Alerts === */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #166534; }
.alert-error { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #991b1b; }
.alert-info { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    color: #fff;
}
.btn-primary:hover { box-shadow: var(--shadow-color); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f87171); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; border-radius: 8px; }

/* === Forms === */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fff;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}
.form-actions { display: flex; gap: 10px; margin-top: 24px; }

/* === Auth === */
.guest-body {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    min-height: 100vh;
}
.guest-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    flex-direction: column;
}
.auth-card {
    background: #fff;
    padding: 44px 36px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
}
.auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 28px;
    font-size: 0.9rem;
}
.auth-link {
    text-align: center;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* === Landing Page === */
.landing {
    width: 100%;
    max-width: 860px;
    color: #fff;
    text-align: center;
}
.landing-hero {
    padding: 40px 20px 48px;
}
.landing-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.ic-landing-logo {
    width: 36px;
    height: 36px;
}
.landing-tagline {
    margin-top: 16px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
}
.landing-cta {
    margin-top: 32px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-landing-primary {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #f472b6, #f59e0b);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(244,114,182,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-landing-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(244,114,182,0.5);
}
.btn-landing-secondary {
    display: inline-block;
    padding: 14px 36px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-landing-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Features */
.landing-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 20px 48px;
}
.landing-feature {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: left;
}
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.feature-icon .ic {
    width: 20px;
    height: 20px;
    color: #fff;
}
.landing-feature h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.landing-feature p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
}

/* Steps */
.landing-steps {
    padding: 0 20px 48px;
}
.landing-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 28px;
}
.landing-step-list {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.landing-step {
    flex: 1;
    min-width: 180px;
    max-width: 240px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 24px 18px;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.landing-step h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.landing-step p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
}

/* Footer CTA */
.landing-footer-cta {
    padding: 36px 20px 48px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.landing-footer-cta p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .landing-logo { font-size: 1.5rem; }
    .ic-landing-logo { width: 28px; height: 28px; }
    .landing-tagline { font-size: 0.95rem; }
    .landing-features { grid-template-columns: 1fr; }
    .landing-step-list { flex-direction: column; align-items: center; }
    .landing-step { max-width: 100%; }
}

/* === Page Header === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.page-narrow { max-width: 600px; margin: 0 auto; }
.text-muted { color: var(--gray-500); font-size: 0.85rem; }

/* === Stats Bar === */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 2px solid transparent;
}
.stat-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-color);
    transform: translateY(-2px);
}
.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Section Title === */
.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 2px;
}
.feed-section { margin-top: 32px; }

/* === Feed List === */
.feed-list { display: flex; flex-direction: column; gap: 8px; }
.feed-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: grab;
    user-select: none;
}
.feed-card:hover { box-shadow: var(--shadow); border-color: var(--gray-200); }
.feed-card.dragging {
    opacity: 0.5;
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.feed-card.drag-over {
    border-color: var(--primary);
    border-style: dashed;
}
.feed-card-main { display: flex; align-items: center; gap: 12px; }
.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    cursor: grab;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.drag-handle:hover .ic-grip { opacity: 0.7; }
.feed-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.feed-icon img { width: 28px; height: 28px; border-radius: 6px; }
.feed-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-light), #c4b5fd);
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
}
.feed-info { flex: 1; min-width: 0; }
.feed-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feed-title:hover { color: var(--primary); }
.feed-url { font-size: 0.78rem; color: var(--gray-400); }
.feed-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-unread {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.feed-total { font-size: 0.78rem; color: var(--gray-400); }
.feed-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}
.feed-checked { font-size: 0.75rem; color: var(--gray-400); }

/* === Per-feed slide (inside feed card) === */
.feed-slide {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}
.feed-slide .slide-track { padding: 4px 2px 8px; }
.feed-slide .slide-card { flex: 0 0 160px; }
.feed-slide .slide-thumb { aspect-ratio: 16 / 10; }
.feed-slide .slide-title { font-size: 0.75rem; -webkit-line-clamp: 2; }
.feed-slide .slide-date { font-size: 0.65rem; color: var(--gray-400); }
.feed-slide .slide-body { padding: 6px 8px; }
.feed-slide .slide-arrow { width: 28px; height: 28px; font-size: 0.7rem; }
.feed-slide .slide-prev { left: -8px; }
.feed-slide .slide-next { right: -8px; }

/* === Slide === */
.slide-section { margin-bottom: 32px; }
.slide-wrapper { position: relative; }
.slide-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 2px 12px;
}
.slide-track::-webkit-scrollbar { display: none; }
.slide-card {
    flex: 0 0 210px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
}
.slide-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.slide-card.is-read { opacity: 0.5; }
.slide-card.is-read:hover { opacity: 1; }
.slide-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--gray-100);
    overflow: hidden;
    position: relative;
}
.slide-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.slide-card:hover .slide-thumb img { transform: scale(1.05); }
.slide-thumb .slide-thumb-placeholder { display: none; }
.slide-thumb.no-img img { display: none; }
.slide-thumb.no-img .slide-thumb-placeholder { display: flex; }
.slide-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: var(--gray-400); font-size: 0.75rem;
}
.slide-star {
    position: absolute;
    top: 6px; right: 6px;
    color: var(--warning);
    font-size: 1.1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    filter: drop-shadow(0 0 4px rgba(251,191,36,0.5));
}
.slide-body { padding: 10px 12px; }
.slide-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray-800);
    margin-bottom: 6px;
}
.slide-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--gray-400);
}
.slide-feed { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: var(--gray-700);
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.slide-arrow:hover { background: #fff; box-shadow: var(--shadow-lg); }
.slide-prev { left: -12px; }
.slide-next { right: -12px; }

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}
.empty-state h1 { font-size: 3rem; color: var(--gray-300); margin-bottom: 8px; }
.empty-state p { margin-bottom: 16px; }

/* === Filter Bar === */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--bg-card);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.filter-btn:hover { box-shadow: var(--shadow); color: var(--primary); }
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: #fff;
    box-shadow: var(--shadow-color);
}
.filter-select {
    margin-left: auto;
    padding: 7px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: #fff;
}

/* === Sort Toggle === */
.sort-toggle {
    margin-left: 8px;
}
.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    border-radius: 14px;
    font-size: 0.78rem;
    color: var(--gray-600);
    background: var(--bg-card);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.sort-btn:hover { color: var(--primary); box-shadow: var(--shadow); }
.sort-btn .ic { width: 12px; height: 12px; }

/* === Category Bar === */
.category-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 10px 0;
}
.category-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.category-tag:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}
.category-tag.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.cat-count {
    font-size: 0.65rem;
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1px 5px;
}
.category-tag.active .cat-count {
    background: rgba(255,255,255,0.25);
}

/* === Entry Category Tags (in card) === */
.entry-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.entry-cat-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
}

/* === Entry Grid === */
.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.entry-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
}
.entry-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.entry-card.is-read { opacity: 0.55; }
.entry-card.is-read:hover { opacity: 1; }

.entry-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* Action buttons overlay on card */
.card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 2;
}
.card-action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}
.card-action-btn:hover { background: rgba(0,0,0,0.65); }
.card-action-btn.starred { color: var(--warning); }
.card-action-btn.is-read-btn { font-size: 0.65rem; }
.card-action-btn.is-read-btn.read { color: var(--accent2); }

.entry-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gray-100);
    overflow: hidden;
    position: relative;
}
.entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.entry-card:hover .entry-thumb img { transform: scale(1.04); }
.entry-thumb .entry-thumb-placeholder { display: none; }
.entry-thumb.no-img img { display: none; }
.entry-thumb.no-img .entry-thumb-placeholder { display: flex; }
.entry-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: var(--gray-400); font-size: 0.8rem;
}

.entry-body { padding: 14px 16px; flex: 1; }
.entry-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray-800);
    margin-bottom: 8px;
}
.entry-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-400);
}
.entry-favicon { border-radius: 3px; flex-shrink: 0; }
.entry-feed-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
}
.page-num { font-size: 0.9rem; color: var(--gray-500); font-weight: 500; }

/* === Fetch Buttons === */
.btn-fetch {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 0.76rem;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-fetch:hover { box-shadow: 0 2px 10px rgba(37,99,235,0.3); transform: translateY(-1px); }
.btn-fetch:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-fetch-more {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 0.76rem;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-fetch-more:hover { box-shadow: 0 2px 10px rgba(5,150,105,0.3); transform: translateY(-1px); }
.btn-fetch-more:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-sitemap {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    font-size: 0.76rem;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-sitemap:hover { box-shadow: 0 2px 10px rgba(124,58,237,0.3); transform: translateY(-1px); }
.btn-sitemap:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.feed-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

/* === Toast Notification === */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: toastSlideUp 0.3s ease;
    max-width: 90vw;
}
@keyframes toastSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
}
.toast-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}
.toast-info {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #fff;
}

/* === Slide Categories (inside slide cards) === */
.slide-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}
.slide-cat-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.62rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* === Entry Source Line (entry list: icon + categories) === */
.entry-source-line {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.entry-source-line .entry-favicon { border-radius: 3px; flex-shrink: 0; }

/* === Touch Drag (mobile feed reorder) === */
.feed-card.touch-placeholder { opacity: 0.3; }
.feed-card-clone {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.88;
    box-shadow: 0 8px 30px rgba(0,0,0,0.22);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: none;
}

/* === Responsive === */
@media (max-width: 640px) {
    .header-inner { padding: 0 14px; }
    .header-nav { gap: 0; }
    .nav-link { padding: 6px 10px; font-size: 0.78rem; }
    .nav-text { display: none; }
    .ic-nav { width: 18px; height: 18px; margin-right: 0; }
    .main { padding: 18px 14px; }
    .entry-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .entry-body { padding: 10px 12px; }
    .entry-title { font-size: 0.82rem; }
    .stats-bar { flex-wrap: wrap; gap: 8px; }
    .stat-item { padding: 10px 14px; font-size: 0.82rem; }
    .stat-num { font-size: 1.2rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .filter-select { margin-left: 0; width: 100%; margin-top: 4px; }
    .slide-card { flex: 0 0 165px; }
    .slide-arrow { display: none; }
    .card-action-btn { width: 30px; height: 30px; font-size: 0.9rem; }
    .drag-handle { cursor: pointer; touch-action: none; }
    .feed-card { cursor: default; }
    .feed-action-buttons { flex-wrap: wrap; gap: 4px; }
    .btn-fetch, .btn-fetch-more, .btn-sitemap { font-size: 0.72rem; padding: 4px 8px; }
    .filter-actions { margin-left: 0; width: 100%; margin-top: 6px; }
    .toast { bottom: 14px; padding: 10px 16px; font-size: 0.82rem; }
    /* iOS自動ズーム防止: font-size 16px以上 */
    input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 380px) {
    .entry-grid { grid-template-columns: 1fr; }
    .slide-card { flex: 0 0 145px; }
}

/* ======================
   管理ツール (Admin)
   ====================== */
.admin-page { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.admin-page .page-header h1 {
    font-size: 1.4rem; font-weight: 700; color: var(--gray-800);
    display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem;
}
.admin-section { margin-bottom: 2rem; }
.admin-section h2 {
    font-size: 1.1rem; font-weight: 600; color: var(--gray-700);
    display: flex; align-items: center; gap: 0.3rem;
    margin-bottom: 0.6rem; padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary-light);
}
.admin-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.admin-hint {
    font-size: 0.82rem; color: var(--gray-500); margin-bottom: 0.8rem; line-height: 1.5;
}
.admin-col-info {
    font-size: 0.78rem; color: var(--gray-600); margin-bottom: 0.5rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem;
}
.admin-col-info code {
    background: var(--gray-100); padding: 1px 5px; border-radius: 4px;
    font-size: 0.72rem; color: var(--primary-dark);
}
.admin-form-row {
    display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
}
.admin-input {
    flex: 1; min-width: 200px; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: 0.9rem; outline: none;
    transition: border-color 0.2s;
}
.admin-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.admin-select {
    padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: var(--radius);
    font-size: 0.85rem; background: #fff; min-width: 200px; max-width: 100%;
}
.admin-checkbox {
    display: flex; align-items: center; gap: 0.3rem; font-size: 0.85rem;
    color: var(--gray-600); white-space: nowrap; cursor: pointer;
}
.admin-checkbox input { accent-color: var(--primary); }

/* マイグレーションリスト */
.migration-list { display: flex; flex-direction: column; gap: 0.4rem; }
.migration-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0.75rem; background: var(--gray-100); border-radius: 6px;
}
.migration-name { font-family: monospace; font-size: 0.85rem; color: var(--gray-700); }

/* 結果表示 */
.admin-result {
    margin-top: 1rem; padding: 0.8rem 1rem; background: var(--gray-100);
    border-radius: 8px; font-size: 0.82rem; line-height: 1.6;
    max-height: 500px; overflow-y: auto; border: 1px solid var(--gray-200);
}
.admin-result h4 { font-size: 0.9rem; margin: 0.6rem 0 0.3rem; color: var(--gray-800); }
.admin-result h4:first-child { margin-top: 0; }
.admin-result ul { padding-left: 1.2rem; margin: 0.3rem 0; }
.admin-result li { margin-bottom: 0.3rem; }
.admin-result pre {
    background: var(--gray-200); padding: 0.4rem 0.6rem; border-radius: 4px;
    overflow-x: auto; font-size: 0.75rem; white-space: pre-wrap; word-break: break-all;
    max-height: 120px;
}
.result-ok { color: var(--success); }
.result-error { color: var(--danger); }
.text-error { color: var(--danger); }
.result-kv { width: 100%; font-size: 0.82rem; border-collapse: collapse; margin: 0.3rem 0; }
.result-kv th {
    text-align: left; padding: 0.25rem 0.5rem; background: var(--gray-200);
    white-space: nowrap; width: 120px; font-weight: 600; vertical-align: top;
}
.result-kv td { padding: 0.25rem 0.5rem; word-break: break-all; }
.sample-entry {
    padding: 0.6rem; margin: 0.4rem 0; background: #fff;
    border-radius: 6px; border: 1px solid var(--gray-200);
}
.sample-thumb { max-width: 120px; max-height: 80px; margin-top: 0.4rem; border-radius: 4px; }

/* フィード管理テーブル */
.feed-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
}
.admin-table th {
    background: var(--gray-100); padding: 0.5rem 0.6rem; text-align: left;
    font-weight: 600; color: var(--gray-600); white-space: nowrap;
    border-bottom: 2px solid var(--gray-200);
}
.admin-table td {
    padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(99,102,241,0.03); }
.feed-title-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.feed-title-cell small { color: var(--gray-400); font-size: 0.72rem; word-break: break-all; }

/* バッジ */
.badge {
    display: inline-block; padding: 2px 7px; border-radius: 10px;
    font-size: 0.72rem; font-weight: 600;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef9c3; color: #854d0e; }
.badge-err { background: #fee2e2; color: #991b1b; }

/* ボタン追加 */
.btn-xs {
    padding: 3px 8px; font-size: 0.72rem; border-radius: 5px;
}
.btn-primary {
    background: var(--primary); color: #fff; border: none; padding: 0.45rem 1rem;
    border-radius: var(--radius); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s; display: inline-flex;
    align-items: center; gap: 0.3rem; white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: wait; }
.btn-secondary {
    background: var(--gray-200); color: var(--gray-600); border: none; padding: 0.45rem 1rem;
    border-radius: var(--radius); font-size: 0.85rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.btn-secondary:hover { background: var(--gray-300); }
.migration-pending {
    background: #fef3c7 !important; border: 1px solid #f59e0b;
}

/* Admin レスポンシブ */
@media (max-width: 640px) {
    .admin-form-row { flex-direction: column; align-items: stretch; }
    .admin-input, .admin-select { min-width: 0; width: 100%; }
    .admin-table { font-size: 0.75rem; }
    .admin-table th, .admin-table td { padding: 0.35rem 0.4rem; }
    .result-kv th { width: auto; }
}
