/* ==========================================================================
   Comic - 詳細ページ
   ========================================================================== */

.comic-view {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
.comic-view h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1f2937;
}

/* コミック詳細 */
.comic-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}
.comic-detail-img {
    width: 100%;
    text-align: center;
}
.comic-detail-img img {
    /* width: 280px; */
    width: 80%;
    /* max-width: 100%; */
    max-height: 280px;
    border-radius: 6px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.comic-detail-info {
    width: 100%;
}
.comic-detail-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.comic-detail-authors {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 8px;
}
.comic-detail-sites {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.comic-detail-site-badge {
    font-size: 0.78rem;
    padding: 3px 10px;
    background: #e5e7eb;
    border-radius: 4px;
    color: #374151;
}
.comic-detail-genres {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.comic-genre-edit-btn {
    padding: 2px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s;
}
.comic-genre-edit-btn:hover {
    background: #f3f4f6;
}
.comic-genre-editor {
    margin-top: 8px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.comic-genre-selected,
.comic-genre-candidates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.comic-genre-selected .comic-genre-tag.active {
    background: #2563eb;
    color: #fff;
}
.comic-genre-candidates .comic-genre-tag {
    background: #fff;
    border: 1px dashed #93c5fd;
    color: #6b7280;
}
.comic-genre-candidates .comic-genre-tag:hover {
    background: #eff6ff;
    color: #2563eb;
}
.comic-genre-add-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}
.comic-genre-add-row input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.82rem;
}
.comic-genre-editor input {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
}
.comic-genre-save-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
}
.comic-genre-save-btn:hover { background: #1d4ed8; }
.comic-genre-save-btn:disabled { opacity: 0.6; cursor: default; }
.comic-genre-cancel-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.8rem;
    cursor: pointer;
}
.comic-genre-cancel-btn:hover { background: #f3f4f6; }
.comic-genre-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #2563eb;
    background: #eff6ff;
    text-decoration: none;
    transition: background 0.15s;
}
.comic-genre-tag:hover {
    background: #dbeafe;
}
.comic-detail-stats {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 8px;
}

/* お気に入りボタン */
.comic-favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.comic-favorite-add {
    background: #059669;
    color: #fff;
}
.comic-favorite-add:hover {
    background: #047857;
    color: #fff;
}
.comic-favorite-remove {
    background: #dc2626;
    color: #fff;
}
.comic-favorite-remove:hover {
    background: #b91c1c;
    color: #fff;
}

/* セクション（viewページ用上書き） */
.comic-view .comic-section {
    margin-bottom: 28px;
}
.comic-view .comic-section h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e5e7eb;
}

/* あらすじ */
.comic-description {
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* サイトタブ */
.comic-site-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.comic-site-tab {
    padding: 8px 16px;
    background: #e5e7eb;
    border-radius: 6px 6px 0 0;
    font-size: 0.85rem;
    text-decoration: none;
    color: #4b5563;
}
.comic-site-tab.active {
    background: #1f2937;
    color: #fff;
}
.comic-site-tab:hover {
    background: #d1d5db;
    color: #111827;
}
.comic-site-tab.active:hover {
    background: #1f2937;
    color: #fff;
}

/* エピソードリスト */
.comic-episodes {
    border: 1px solid #e5e7eb;
    border-radius: 0 8px 8px 8px;
    overflow: hidden;
}
.comic-episode-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
    text-decoration: none;
    color: inherit;
}
.comic-episode-item:last-child {
    border-bottom: none;
}
.comic-episode-item:hover {
    background: #f9fafb;
}
.comic-episode-summary {
    flex: 1;
}
.comic-episode-summary a {
    color: #111827;
    text-decoration: none;
}
.comic-episode-summary a:hover {
    color: #2563eb;
}
.comic-episode-date {
    font-size: 0.78rem;
    color: #9ca3af;
    white-space: nowrap;
}
.comic-episode-pv {
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.comic-episode-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* コメント */
.comic-comment {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
}
.comic-comment:last-child {
    border-bottom: none;
}
.comic-comment-content {
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.comic-comment-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}
.comic-comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
}
.comic-comment-form button {
    margin-top: 8px;
    padding: 8px 24px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.comic-comment-form button:hover {
    background: #047857;
}

.comic-update-info {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: right;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .comic-detail-img img {
        /* width: 200px; */
        width: 100%;
    }
}

/* ブログカード */
.comic-blog-card-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: -1px;
}
.comic-blog-card-tab {
    padding: 5px 16px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.comic-blog-card-tab.active {
    background: #fff;
    color: #111827;
    font-weight: 600;
    border-color: #e5e7eb;
}
.comic-blog-card-preview {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 8px 8px 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
    max-width: 560px;
}
.comic-blog-card-preview:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
    color: inherit;
}
.comic-blog-card-thumb {
    width: 110px;
    min-height: 88px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
    display: block;
}
.comic-blog-card-thumb-placeholder {
    width: 110px;
    min-height: 88px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #9ca3af;
}
.comic-blog-card-body {
    flex: 1;
    padding: 10px 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}
.comic-blog-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-blog-card-desc {
    font-size: 0.74rem;
    color: #6b7280;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-blog-card-domain {
    font-size: 0.7rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}
.comic-blog-card-copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}
.comic-blog-card-input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #6b7280;
    background: #f9fafb;
    min-width: 0;
    cursor: text;
}
.comic-blog-card-copy-btn {
    padding: 7px 18px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s;
    flex-shrink: 0;
}
.comic-blog-card-copy-btn:hover {
    background: #1d4ed8;
}
.comic-blog-card-copy-btn.copied {
    background: #059669;
}

/* Kindle最新刊 */
.comic-kindle-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}
.comic-kindle-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.comic-kindle-img {
    width: 140px;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.comic-kindle-info {
    flex: 1;
    min-width: 0;
}
.comic-kindle-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}
.comic-kindle-meta {
    font-size: 0.78rem;
    color: #6b7280;
}
.comic-kindle-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dc2626;
    margin-top: 6px;
}
.comic-kindle-point {
    font-size: 0.78rem;
    color: #059669;
    font-weight: 600;
}

/* Kindle商品グリッド */
.comic-kindle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.comic-kindle-grid-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}
.comic-kindle-grid-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.comic-kindle-grid-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 8px;
}
.comic-kindle-grid-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
