/**
 * Mac Claw - Items CSS (商品一覧・詳細)
 * Generated from style.css split
 */

/* ============================================================
   9. Item Grid (Marketplace) - KEY SECTION
   ============================================================ */

.marketplace-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 80px;
}
.items-area { min-width: 0; }

.items-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; gap: 12px; flex-wrap: wrap; }
.items-count { font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.items-count strong { color: var(--text-primary); font-weight: 700; }

.items-sort { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.sort-select {
    padding: 7px 32px 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-sans);
    background: var(--bg-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    color: var(--text-primary);
}
.sort-select:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1); }

.view-toggle { display: flex; gap: 4px; }
.view-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
}
.view-toggle-btn:hover { color: var(--accent-blue); border-color: var(--accent-blue); }
.view-toggle-btn.is-active { background: var(--accent-blue); color: var(--text-white); border-color: var(--accent-blue); }
.view-toggle-btn .lucide-icon { width: 14px; height: 14px; }

/* Items Grid - responsive auto-fill */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* Item Card */
.item-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
}
.item-card:hover { color: var(--text-primary); }

/* 1:1 aspect ratio image container */
.item-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-surface);
}
.item-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.item-card:hover .item-image img { transform: none; }
.item-image::before { display: none; }

/* Badges container - top-right, wraps on overflow */
.item-badges {
    position: absolute;
    top: 8px; right: 8px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-end;
    z-index: 2;
}
.spec-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    font-family: var(--font-sans);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.4;
    z-index: 1;
}
.item-badges .spec-badge {
    position: static;
}

/* Bottom bar - price left, likes right, aligned */
.item-image-bottom {
    position: absolute;
    bottom: 8px; left: 8px; right: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}
.item-image-price {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
    background: rgba(0,0,0,0.25);
    padding: 4px 8px;
    border-radius: 6px;
}
button.item-image-likes {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    line-height: 1;
    background: rgba(0,0,0,0.25);
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease;
    font-family: var(--font-sans);
}
button.item-image-likes:hover { transform: scale(1.1); }
button.item-image-likes:active { transform: scale(0.95); }
button.item-image-likes.is-liked { color: var(--accent-red); }
.item-image-likes .lucide-icon { width: 13px; height: 13px; }

/* SOLD badge - top-left on image */
.item-sold-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    z-index: 3;
}

/* Condition Badge - top-right */
.condition-badge {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    line-height: 1.5;
    z-index: 1;
}
.condition-badge.new { background: var(--accent-blue); color: var(--text-white); }
.condition-badge.used-good { background: var(--accent-green-light); color: var(--accent-green); }
.condition-badge.used-fair { background: var(--accent-orange-light); color: var(--accent-orange); }
.condition-badge.used-poor { background: var(--accent-red-light); color: var(--accent-red); }

/* SOLD overlay */
.item-card.sold .item-image::after {
    content: 'SOLD';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
    color: var(--text-white);
    letter-spacing: 0.12em;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 2;
}
.item-card.sold { opacity: 0.82; }

/* Item Card Body */
.item-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.item-card > .item-info { padding: 10px 14px 12px; display: flex; flex-direction: column; flex: 1; }

/* Price Tag - large bold blue */
.price-tag {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-blue);
    line-height: 1.2;
    margin-bottom: 5px;
    letter-spacing: -0.02em;
}
.price-tag .price-currency { font-size: 13px; font-weight: 700; margin-right: 1px; }
.price-tag .price-unit { font-size: 11px; font-weight: 500; color: var(--text-muted); }

/* Item Title - truncated 2 lines */
.item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    transition: color var(--transition-base);
}
.item-card:hover .item-title { opacity: 0.6; }

/* Item Footer */
.item-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 6px; }

/* Seller info */
.item-seller { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); min-width: 0; }
.seller-avatar { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-surface); flex-shrink: 0; overflow: hidden; }
.seller-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Like count */
.item-likes {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    cursor: pointer;
    transition: color var(--transition-base);
    background: none;
    border: none;
    padding: 4px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}
.item-likes:hover { color: var(--accent-red); background: var(--accent-red-light); }
.item-likes.is-liked { color: var(--accent-red); }
.item-likes .lucide-icon { width: 13px; height: 13px; }
.item-likes.is-liked .lucide-icon { fill: var(--accent-red); }

/* List view variant */
.items-grid.list-view { grid-template-columns: 1fr; gap: 10px; }
.items-grid.list-view .item-card { flex-direction: row; align-items: center; }
.items-grid.list-view .item-image { width: 100px; height: 100px; aspect-ratio: unset; flex-shrink: 0; }
.items-grid.list-view .item-body { padding: 12px 16px; flex: 1; }
.items-grid.list-view .price-tag { font-size: 18px; }
.items-grid.list-view .item-title { -webkit-line-clamp: 1; font-size: 14px; }

/* ============================================================
   10. Filter Sidebar (PC) + Accordion (SP)
   ============================================================ */

.filter-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--bg-primary);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.filter-sidebar::-webkit-scrollbar { width: 4px; }
.filter-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.filter-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.filter-clear-btn { font-size: 12px; color: var(--accent-blue); font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; font-family: var(--font-sans); transition: color var(--transition-base); }
.filter-clear-btn:hover { color: var(--accent-blue-dark); }

.filter-group { margin-bottom: 15px; }
.filter-group-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }

.filter-select {
    width: 100%;
    padding: 9px 32px 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-sans);
    background: var(--bg-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    color: var(--text-primary);
}
.filter-select:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1); }

.filter-checkboxes { display: flex; flex-direction: column; gap: 8px; }
.filter-checkbox-item { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-secondary); user-select: none; }
.filter-checkbox-item input[type="checkbox"] { width: 16px; height: 16px; border: 1.5px solid var(--border); border-radius: 3px; accent-color: var(--accent-blue); cursor: pointer; flex-shrink: 0; }
.filter-checkbox-item:hover { color: var(--text-primary); }
.filter-checkbox-count { margin-left: auto; font-size: 11px; color: var(--text-muted); background: var(--bg-surface); padding: 1px 6px; border-radius: 10px; }

.filter-price-range { display: flex; align-items: center; gap: 8px; }
.filter-price-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-primary);
    min-width: 0;
}
.filter-price-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1); }
.filter-price-sep { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }

/* Filter Chips - pill-shaped toggles */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-sans);
    white-space: nowrap;
    line-height: 1.4;
}
.filter-chip:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: var(--accent-blue-light); }
.filter-chip.is-active { border-color: var(--accent-blue); color: var(--text-white); background: var(--accent-blue); }
.filter-chip .lucide-icon { width: 12px; height: 12px; }

/* Mobile Filter Accordion */
.filter-accordion { display: none; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px; }
.filter-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
}
.filter-accordion-toggle .lucide-icon { width: 16px; height: 16px; color: var(--text-muted); transition: transform var(--transition-slow); flex-shrink: 0; }
.filter-accordion.is-open .filter-accordion-toggle .lucide-icon { transform: rotate(180deg); }
.filter-accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow); }
.filter-accordion.is-open .filter-accordion-body { max-height: 640px; }
.filter-accordion-content { padding: 0 16px 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ============================================================
   11. Item Detail Page
   ============================================================ */

/* Image Gallery (used in admin/items/detail.php) */
.image-gallery { position: sticky; top: calc(var(--header-h) + 24px); }

.gallery-thumb {
    width: 68px; height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition-base);
    background: var(--bg-surface);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active, .gallery-thumb:hover { border-color: var(--accent-blue); }

/* Item Info Panel (detail page) */
.detail-main .item-info { display: flex; flex-direction: column; gap: 20px; }

.item-detail-price { font-family: var(--font-display); font-size: 36px; font-weight: 900; color: var(--accent-blue); line-height: 1.2; }
.item-detail-price .price-tax { font-size: 13px; font-weight: 400; color: var(--text-muted); display: block; margin-top: 2px; }
.item-detail-title { font-size: 22px; font-weight: 700; line-height: 1.4; color: var(--text-primary); }

.item-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.item-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--bg-surface); color: var(--text-secondary); }

/* Spec Table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table tr { border-bottom: 1px solid var(--border-light); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th { width: 36%; padding: 10px 12px 10px 0; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 13px; vertical-align: top; }
.spec-table td { padding: 10px 0 10px 12px; color: var(--text-primary); font-family: var(--font-mono); font-size: 13px; word-break: break-all; }

/* Item Actions - buy + like row */
.item-actions { display: flex; gap: 10px; align-items: stretch; }
.item-actions .btn-primary { flex: 1; padding: 16px; font-size: 16px; }

/* Seller Card */
.seller-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: flex; align-items: center; gap: 12px; }
.sidebar-card.seller-card { display: block; padding: 16px 24px 19px; }
.seller-row { display: flex; align-items: center; gap: 8px; }
.seller-row .seller-info-link { flex: 1; min-width: 0; }
.seller-row .seller-follow-btn { flex-shrink: 0; margin: 0; width: auto; white-space: nowrap; }
.seller-name--truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.seller-card-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-surface); overflow: hidden; flex-shrink: 0; }
.seller-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-card-info { flex: 1; min-width: 0; }
.seller-card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.seller-card-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seller-card-meta .lucide-icon { width: 12px; height: 12px; color: var(--accent-yellow); }

/* Comment List */
.comment-item { display: flex; gap: 10px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-surface); overflow: hidden; flex-shrink: 0; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; background: var(--bg-secondary); border-radius: var(--radius-md); padding: 12px 14px; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-author { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.comment-date { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.comment-input-area { display: flex; gap: 10px; margin-top: 20px; }
.comment-input-form { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-sans);
    resize: none;
    min-height: 80px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-base);
}
.comment-textarea:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

/* ============================================================
   Items Page (.items-*)
   ============================================================ */

.items-section {
    padding: calc(var(--header-h) + 32px) 0 80px;
    min-height: calc(100vh - 200px); background: var(--bg-secondary);
}

.items-page-header {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.items-page-title { font-size: 24px; font-weight: 900; }
.items-page-count { font-size: 14px; color: var(--text-muted); }

.items-layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }

/* Filter sidebar */
.items-filter-sidebar {
    background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 16px; position: sticky; top: calc(var(--header-h) + 16px);
}

.filter-block { padding-bottom: 10px; }
.filter-block:last-child, .filter-block:last-of-type { margin-bottom: 0; padding-bottom: 0; }
.filter-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }

.filter-radio-label {
    display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer;
    padding: 4px 0; color: var(--text-secondary); transition: color 0.15s;
}
.filter-radio-label:hover { color: var(--text-primary); }
.filter-radio-label input { accent-color: var(--accent-blue); }
.filter-radios { display: flex; flex-direction: column; gap: 2px; }

/* Filter Badges */
.filter-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }
.filter-badge {
    display: inline-flex; align-items: center; padding: 2px 8px;
    font-size: 11px; font-weight: 600; font-family: var(--font-sans);
    color: var(--text-secondary); background: var(--bg-primary);
    border: 1px solid var(--border); border-radius: 12px;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
    -webkit-tap-highlight-color: transparent; line-height: 1.5;
}
.filter-badge:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.filter-badge.is-active {
    background: var(--accent-blue); border-color: var(--accent-blue); color: #fff;
}

.filter-select { font-size: 14px; padding: 9px 12px; }

.filter-price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 0; width: 100%; }
.filter-price-input { font-size: 13px; padding: 6px 8px; color: var(--text-primary); flex: 1; min-width: 0; }
.filter-price-sep { flex-shrink: 0; color: var(--text-muted); font-size: 13px; }
.filter-price-btn { width: 100%; }
.filter-reset-btn { width: 100%; justify-content: center; color: var(--text-muted); font-size: 13px; margin-top: 10px; }

/* SP filter FAB + bottom sheet */
.sp-filter-fab {
    display: none; position: fixed; bottom: 76px; right: 16px; z-index: 999;
    padding: 10px 16px; border-radius: var(--radius-md); gap: 6px;
    background: var(--accent-blue); color: #fff; border: none;
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    cursor: pointer; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; font-family: var(--font-display);
    -webkit-tap-highlight-color: transparent; transition: transform 0.15s, box-shadow 0.15s;
}
.sp-filter-fab:active { transform: scale(0.92); }
.sp-filter-fab .lucide-icon { width: 18px; height: 18px; }
.sp-filter-fab-count {
    position: absolute; top: -2px; right: -2px;
    min-width: 18px; height: 18px; border-radius: 9px;
    background: #ef4444; color: var(--text-white); font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
}
.sp-filter-overlay {
    display: none; position: fixed; inset: 0; z-index: 1100;
    background: rgba(0,0,0,0.4); opacity: 0; transition: opacity 0.25s;
}
.sp-filter-overlay.is-visible { opacity: 1; }
.sp-filter-sheet {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1101;
    background: var(--bg-primary); border-radius: 16px 16px 0 0;
    max-height: 80vh; transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.sp-filter-sheet.is-open { transform: translateY(0); }
.sp-filter-sheet-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px 10px; border-bottom: 1px solid var(--border);
}
.sp-filter-sheet-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.sp-filter-sheet-close {
    background: none; border: none; padding: 4px; cursor: pointer;
    color: var(--text-muted); border-radius: 50%; transition: background 0.15s;
}
.sp-filter-sheet-close:hover { background: var(--bg-secondary); }
.sp-filter-sheet-close .lucide-icon { width: 20px; height: 20px; }
.sp-filter-sheet-body {
    padding: 16px 20px 32px; overflow-y: auto; max-height: calc(80vh - 52px);
    -webkit-overflow-scrolling: touch;
}
.sp-filter-sheet-body .filter-price-input { font-size: 14px; padding: 8px 10px; }
.sp-filter-sheet-body .filter-radios { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.sp-filter-sheet-body .filter-radio-label { padding: 2px 0; font-size: 13px; }
@media (max-width: 768px) {
    .sp-filter-fab { display: flex !important; }
    .sp-filter-overlay { display: block; pointer-events: none; }
    .sp-filter-overlay.is-visible { pointer-events: auto; }
    .sp-filter-sheet { display: block; }
}

/* Items main */
.items-main { min-width: 0; transition: opacity 0.15s ease; }
.items-main.is-loading { opacity: 0.4; pointer-events: none; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 40px; }
.pagination-btn {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600; color: var(--text-secondary); background: var(--bg-primary);
    border: 1px solid var(--border); transition: all 0.15s; text-decoration: none;
}
.pagination-btn:hover:not(.is-disabled):not(.is-current) { background: var(--accent-blue-light); border-color: var(--accent-blue); color: var(--accent-blue); }
.pagination-btn.is-current { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.pagination-btn.is-disabled { opacity: 0.35; cursor: not-allowed; }
.pagination-ellipsis { color: var(--text-muted); font-size: 14px; padding: 0 4px; }

@media (max-width: 900px) {
    .items-layout { grid-template-columns: 1fr; }
    .items-filter-sidebar { position: static; display: none; }
    .items-filter-bar { display: block; }
}

/* ============================================================
   Detail Page (.detail-*)
   ============================================================ */

.detail-section {
    padding: calc(var(--header-h) + 24px) 0 80px;
    min-height: 100vh; background: var(--bg-secondary);
}

/* Breadcrumb */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted); margin-bottom: 24px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb-sep { color: var(--border); }

/* Layout */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.detail-main { min-width: 0; }

/* Gallery */
.gallery-main-wrap {
    position: relative; border-radius: var(--radius-xl); overflow: hidden;
    background: var(--bg-surface); border: none; aspect-ratio: 4/3; margin-bottom: 12px;
}
.gallery-main-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { display: flex; align-items: center; justify-content: center; }
.gallery-placeholder-icon { width: 64px; height: 64px; color: var(--text-muted); }

.gallery-sold-badge {
    position: absolute; top: 16px; right: 16px;
    background: rgba(220,38,38,0.9); color: #fff; font-weight: 900;
    font-size: 13px; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 4px;
}

.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 15px; position: relative; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs-wrap { position: relative; }
.gallery-thumbs-wrap::before,
.gallery-thumbs-wrap::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 56px;
    pointer-events: none; z-index: 1;
}
.gallery-thumbs-wrap::before {
    left: 0; background: linear-gradient(to left, transparent, #f8fafc);
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-thumbs-wrap::after {
    right: 0; background: linear-gradient(to right, transparent, #f8fafc);
    opacity: 1; transition: opacity 0.3s ease;
}
.gallery-thumbs-wrap.is-scrolled-start::before { opacity: 1; }
.gallery-thumbs-wrap.is-scrolled-end::after { opacity: 0; }

.gallery-thumb {
    width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius-md);
    overflow: hidden; border: 2px solid var(--border); background: none;
    cursor: pointer; padding: 0; transition: border-color 0.2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--accent-blue); }

/* Cards */
.detail-card {
    background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 28px 32px; margin-bottom: 15px; box-shadow: var(--shadow-sm);
}
.detail-card-title {
    font-size: 16px; font-weight: 700; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px; color: var(--text-primary);
}
.detail-card-count {
    background: var(--bg-surface); color: var(--text-muted);
    font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 12px; margin-left: 4px;
}

/* Spec table (item detail) */
.detail-section .spec-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 8px; }
.detail-spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 8px; margin: 0; padding: 0; list-style: none; }
.spec-row {
    display: grid; grid-template-columns: 120px 1fr; gap: 2px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 13px;
}
.spec-row dt { font-weight: 600; color: var(--text-muted); font-size: 13px; }
.spec-row dd { color: var(--text-primary); font-weight: 500; margin: 0; }
.detail-spec-row {
    display: grid; grid-template-columns: 76px 1fr; gap: 2px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 13px;
}
.detail-spec-row dt { font-weight: 600; color: var(--text-muted); font-size: 13px; }
.detail-spec-row dd { color: var(--text-primary); font-weight: 500; margin: 0; }

.spec-chip-tag {
    background: var(--bg-primary); color: var(--text-secondary);
    font-family: var(--font-sans); font-size: 12px; font-weight: 500;
    padding: 5px 12px; border-radius: 20px;
    border: 1px solid var(--border); line-height: 1.4;
}

.ai-env-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.ai-env-initialized { background: var(--bg-surface); color: var(--text-secondary); }
.ai-env-scripts_included { background: var(--accent-orange-light); color: var(--accent-orange); }
.ai-env-full_env { background: var(--accent-green-light); color: var(--accent-green); }

/* Title block (SP) */
.detail-title-block { margin-bottom: 16px; }

.spec-badges-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.spec-badge-lg {
    display: inline-block; background: var(--bg-primary); color: var(--text-secondary);
    font-family: var(--font-sans); font-size: 12px; font-weight: 500;
    padding: 5px 12px; border-radius: 20px;
    border: 1px solid var(--border); line-height: 1.4;
}

.spec-badges-detail { display: flex; gap: 8px; flex-wrap: wrap; }
.spec-badge-detail {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg-secondary); color: var(--text-secondary);
    font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    padding: 8px 14px; border-radius: var(--radius-full);
    border: 1px solid var(--border); line-height: 1;
}
.spec-badge-detail .lucide-icon { width: 14px; height: 14px; flex-shrink: 0; }
.spec-badge-detail--chip {
    background: var(--text-primary); color: var(--text-white); border-color: var(--text-primary);
}

.detail-title { font-size: 22px; font-weight: 900; line-height: 1.4; margin-bottom: 12px; color: var(--text-primary); }
.detail-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 15px; }
.detail-price { font-size: 32px; font-weight: 700; color: var(--accent-blue); font-family: var(--font-display); line-height: 1; letter-spacing: -0.02em; }
.detail-price-sub { font-size: 13px; color: var(--text-muted); }
.detail-description { font-size: 15px; color: var(--text-secondary); line-height: 1.85; white-space: pre-wrap; }

/* Comments */
.comments-empty { font-size: 14px; color: var(--text-muted); text-align: center; padding: 24px 0; }
.comments-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.comment-item { display: flex; gap: 12px; }
.comment-item-new { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; border: 1px solid var(--border);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-avatar-placeholder {
    width: 100%; height: 100%; background: var(--bg-surface); color: var(--accent-red);
    display: flex; align-items: center; justify-content: center;
}
.comment-avatar-placeholder .lucide-icon { width: 18px; height: 18px; }

.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.comment-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.comment-time { font-size: 12px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

.comment-form { border-top: 1px solid var(--border); padding-top: 20px; }
.comment-form-row { display: flex; gap: 12px; align-items: flex-start; }
.comment-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-form .comment-textarea { min-height: 80px; }
.comment-submit-btn { align-self: flex-end; }
.comment-login-prompt { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; }

/* Related Items */
.related-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-title {
    font-size: 18px; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px; margin-bottom: 24px;
}
.related-title .lucide-icon { width: 20px; height: 20px; color: var(--accent-blue); }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 768px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Sidebar */
.detail-sidebar { min-width: 0; position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.sidebar-card {
    background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.sidebar-card.sidebar-card-sp { margin-top: 28px; }
.sidebar-card-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--text-primary); }

.sidebar-buy-btn { margin-bottom: 0; width: 100%; }

.payment-logos {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px;
}
.payment-logos img {
    border: 1px solid var(--border); border-radius: 4px;
}
.payment-logos--sm { margin-bottom: 10px; margin-top: 6px; }
.payment-logos .payment-text-row { width: 100%; display: flex; gap: 6px; }
.payment-logos--sm img { width: 32px; height: 21px; }
.payment-logo-text {
    font-size: 9px; color: var(--text-muted); background: var(--bg-secondary);
    height: 27px; display: inline-flex; align-items: center; padding: 0 8px;
    border-radius: 4px; white-space: nowrap; border: 1px solid var(--border);
}
.payment-logos--sm .payment-logo-text { height: 21px; font-size: 8px; padding: 0 6px; }
.site-footer .payment-logo-text { color: var(--bg-dark); }

.sidebar-like-btn {
    width: 100%; font-size: 14px; gap: 6px; color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-md);
}
.sidebar-like-btn.is-liked { color: #e11d48; border-color: #e11d48; }
.sidebar-like-btn.is-liked .lucide-icon { fill: currentColor; }

.sidebar-meta { display: flex; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.sidebar-meta span { display: flex; align-items: center; gap: 4px; }
.sidebar-meta .lucide-icon { width: 13px; height: 13px; }

.sidebar-owner-note {
    display: flex; align-items: center; gap: 6px; padding: 12px;
    background: var(--bg-secondary); border-radius: var(--radius-md);
    font-size: 13px; color: var(--text-muted); margin-bottom: 10px;
}
.sidebar-owner-note .lucide-icon { width: 15px; height: 15px; }

.sidebar-sold-note {
    display: flex; align-items: center; gap: 6px; padding: 12px;
    background: var(--accent-red-light); color: var(--accent-red); border-radius: var(--radius-md);
    font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
.sidebar-sold-note .lucide-icon { width: 15px; height: 15px; }

/* Seller */
.seller-info { display: flex; align-items: center; gap: 12px; }
.seller-avatar {
    width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; border: 2px solid var(--border);
}
.seller-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-avatar-placeholder {
    width: 100%; height: 100%; background: var(--accent-blue-light); color: var(--accent-red);
    display: flex; align-items: center; justify-content: center;
}
.seller-detail { min-width: 0; }
.seller-name { font-size: 15px; font-weight: 700; display: block; margin-bottom: 4px; }
.seller-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.seller-star { width: 14px; height: 14px; color: var(--accent-amber); fill: var(--accent-amber); }
.seller-rating-val { font-weight: 700; color: var(--text-primary); }
.seller-rating-count { color: var(--text-muted); }
.seller-no-rating { font-size: 12px; color: var(--text-muted); }

/* Alerts shared */
.alert { padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; line-height: 1.6; margin-bottom: 15px; }
.alert-success { background: var(--accent-green-light); color: var(--accent-green-dark); }
.alert-error { background: var(--accent-red-light); color: var(--accent-red); }
.alert-info { background: var(--accent-blue-light); color: var(--accent-blue); }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--bg-dark); color: #fff; padding: 12px 20px; border-radius: var(--radius-md);
    font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s; max-width: 320px;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--accent-green-dark); }
.toast-error { background: var(--accent-red); }

/* 404 Not Found */
.not-found { min-height: calc(100vh - 200px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px; background: var(--bg-primary); }
[data-theme="dark"] .not-found { background: var(--bg-primary); }
.not-found-img { margin-top: 16px; margin-bottom: 24px; }
.not-found-img img { width: 320px; max-width: 90vw; height: auto; }
.not-found-inner { text-align: center; padding: 80px 20px; }
.not-found-icon { margin-bottom: 15px; color: var(--text-muted); }
.not-found-icon .lucide-icon { width: 64px; height: 64px; stroke-width: 1.5; }
.not-found-number { font-family: var(--font-display); font-size: 72px; font-weight: 900; color: var(--text-muted); opacity: 0.3; line-height: 1; margin-bottom: 12px; }
.not-found h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.not-found p { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }
.not-found-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 768px) {
    .not-found-actions { flex-direction: column; gap: 12px; width: 100%; max-width: 300px; }
    .not-found-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 1024px) {
    .detail-grid { grid-template-columns: 1fr 300px; gap: 24px; }
}

@media (max-width: 768px) {
    .breadcrumb { margin-bottom: 10px; font-size: 12px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
    .sidebar-card { position: static; }
    .detail-card { padding: 16px; margin-bottom: 12px; }
    .detail-card-title { margin-bottom: 8px; font-size: 15px; }
    .detail-title { font-size: 18px; }
    .detail-price { font-size: 26px; }
    .detail-section .spec-table { grid-template-columns: 1fr; gap: 0; }
    .detail-spec-list { grid-template-columns: 1fr; }
    .detail-section { padding-bottom: 80px; }
}

/* ============================================================
   15. Review / Rating
   ============================================================ */

.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars .star { width: 16px; height: 16px; color: #d1d5db; fill: #d1d5db; }
.stars .star.filled { color: var(--accent-amber); fill: var(--accent-amber); }
.stars.stars-lg .star { width: 24px; height: 24px; }
.stars.stars-sm .star { width: 12px; height: 12px; }

.rating-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.rating-average { text-align: center; flex-shrink: 0; padding-right: 20px; border-right: 1px solid var(--border); }
.rating-number { font-family: var(--font-display); font-size: 52px; font-weight: 900; color: var(--text-primary); line-height: 1; margin-bottom: 6px; }
.rating-count { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.rating-breakdown { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rating-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.rating-bar-label { width: 20px; text-align: right; flex-shrink: 0; font-weight: 600; }
.rating-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--accent-amber); border-radius: 3px; transition: width 0.6s ease; }
.rating-bar-count { width: 28px; flex-shrink: 0; font-size: 11px; }

/* Review Card */
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-surface); overflow: hidden; flex-shrink: 0; }
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-user-info { flex: 1; min-width: 0; }
.review-user-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.review-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.review-date { margin-left: auto; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.review-comment { font-size: 14px; color: var(--text-secondary); line-height: 1.75; }
.review-item-ref { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px; background: var(--bg-surface); border-radius: var(--radius-sm); font-size: 12px; color: var(--text-muted); }
.review-item-ref img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }

/* ============================================================
   Seller Info Link
   ============================================================ */

.seller-info-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
    padding: 8px;
    margin: -8px;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.seller-info-link:hover {
    background: var(--bg-primary);
    color: inherit;
}

/* ============================================================
   Price Compare Banner (Item Detail)
   ============================================================ */

.price-compare {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--accent-green-light);
    border-radius: var(--radius-md);
}

.price-compare-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.price-compare-retail {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: line-through;
    font-family: var(--font-mono);
}

.price-compare-save {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-green);
    font-family: var(--font-display);
}

.price-compare-save .lucide-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Sell Form Retail Reference */
.sell-retail-ref {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--accent-blue-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 500;
}

.sell-retail-ref .lucide-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.sell-retail-ref strong {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--accent-blue-dark);
}

@media (max-width: 480px) {
    .price-compare {
        padding: 8px 12px;
        gap: 6px;
    }
    .price-compare-retail {
        font-size: 13px;
    }
    .price-compare-save {
        font-size: 13px;
    }
}

/* ============================================================
   28. Negotiate: Item Detail Modal & Button
   ============================================================ */

.negotiate-btn {
    margin-top: 8px;
}
.negotiate-btn .lucide-icon { width: 16px; height: 16px; }

.negotiate-item-info {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.negotiate-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.negotiate-item-price {
    font-size: 13px;
    color: var(--text-secondary);
}

.negotiate-field { margin-bottom: 16px; }
.negotiate-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.negotiate-textarea {
    width: 100%;
    resize: vertical;
    min-height: 60px;
}
.negotiate-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   AI検品レポート
   ============================================================ */

.badge-inspect-verified {
    background: var(--accent-green-light) !important;
    color: var(--accent-green) !important;
    border: 1px solid var(--accent-green) !important;
}
.badge-inspect-verified .lucide-icon {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

/* カード用検品バッジ（小） */
.badge-inspect-sm {
    background: var(--accent-green) !important;
    color: #fff !important;
    padding: 2px 5px !important;
    font-size: 0 !important;
    line-height: 1 !important;
}
.badge-inspect-sm .lucide-icon {
    width: 12px;
    height: 12px;
}

/* 検品レポートカード */
.inspect-report .detail-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.inspect-date {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.inspect-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.inspect-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.inspect-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.inspect-section-title .lucide-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.inspect-grid {
    margin: 0;
}
.inspect-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
}
.inspect-row:last-child {
    border-bottom: none;
}
.inspect-row dt {
    min-width: 120px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    flex-shrink: 0;
}
.inspect-row dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
}

.inspect-match {
    color: var(--accent-green);
    font-weight: 700;
    margin-left: 6px;
}
.inspect-mismatch {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 12px;
    margin-left: 6px;
}

/* プログレスバー */
.inspect-progress {
    display: inline-block;
    width: 100px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin: 0 8px 0 0;
}
.inspect-progress-bar {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 4px;
    transition: width 0.3s;
}
.inspect-progress-warn { background: var(--accent-orange); }
.inspect-progress-danger { background: var(--accent-red, #dc2626); }
.inspect-progress-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* AI査定 */
.inspect-ai-assess {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 16px !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
}
.ai-assess-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.ai-assess-label {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}
.ai-assess-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}
.ai-assess-verdict {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
}
.ai-price-deal {
    background: var(--accent-green-light);
    color: var(--accent-green);
}
.ai-price-fair {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}
.ai-price-high {
    background: var(--accent-orange-light);
    color: var(--accent-orange);
}
.ai-assess-nodata {
    color: var(--text-muted);
    font-style: italic;
}

.inspect-uptime {
    font-size: 12px;
    color: var(--text-muted);
    margin: 12px 0 0;
    text-align: right;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.inspect-status-ok {
    color: #16a34a;
    font-weight: 500;
}

.inspect-temp-ok { color: #16a34a; font-weight: 500; }
.inspect-temp-warn { color: #d97706; font-weight: 500; }
.inspect-temp-danger { color: #dc2626; font-weight: 600; }

.inspect-health-good { color: #16a34a; font-size: 12px; font-weight: 600; margin-left: 6px; }
.inspect-health-normal { color: #6b7280; font-size: 12px; font-weight: 600; margin-left: 6px; }
.inspect-health-warn { color: #d97706; font-size: 12px; font-weight: 600; margin-left: 6px; }

.inspect-hint {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: #e5e7eb; color: #6b7280;
    font-size: 11px; font-weight: 700; line-height: 1;
    cursor: help; margin-left: 4px; vertical-align: middle;
    position: relative;
}

/* 出品後の検品案内モーダル */
.inspect-guide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.inspect-guide-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}
.inspect-guide-modal h3 {
    font-size: 18px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.inspect-guide-modal h3 .lucide-icon {
    color: var(--accent-green);
    width: 22px;
    height: 22px;
}
.inspect-guide-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
}
.inspect-guide-code {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 12px;
    overflow-x: auto;
}
.inspect-guide-code code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-primary);
    word-break: break-all;
}
.inspect-guide-note {
    font-size: 12px !important;
    color: var(--text-muted) !important;
}
.inspect-guide-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.inspect-guide-actions .btn {
    flex: 1;
}

@media (max-width: 767px) {
    .inspect-row {
        flex-direction: column;
        gap: 4px;
    }
    .inspect-row dt {
        min-width: auto;
    }
    .ai-assess-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .inspect-guide-modal {
        padding: 24px;
    }
    .inspect-guide-actions {
        flex-direction: column;
    }
}

/* Filter Save Button (sidebar) */
.filter-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1px dashed var(--accent-blue);
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.filter-save-btn:hover {
    background: var(--accent-blue-light);
    border-color: var(--accent-blue-dark);
}
.filter-save-btn .lucide-icon {
    width: 15px;
    height: 15px;
}

/* === JPYC決済 === */
.sidebar-jpyc-btn {
    border-color: #7c3aed;
    color: #7c3aed;
    margin-top: 8px;
}
.sidebar-jpyc-btn:hover {
    background: #7c3aed;
    color: #fff;
}
.payment-logo-jpyc {
    color: #7c3aed;
    font-weight: 700;
}
.badge-purple {
    background: #ede9fe;
    color: #7c3aed;
}

/* JPYC モーダル */
.jpyc-modal-content {
    max-width: 480px;
    width: 90%;
}
.jpyc-modal-title {
    font-size: 1.25rem;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7c3aed;
}
.jpyc-modal-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 20px;
}
.jpyc-deposit-info {
    background: #f5f3ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.jpyc-deposit-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 8px;
}
.jpyc-addr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.jpyc-addr {
    font-size: 0.75rem;
    word-break: break-all;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    flex: 1;
    border: 1px solid #e2e8f0;
}
.jpyc-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.jpyc-amount-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.jpyc-amount-value {
    font-size: 1.25rem;
    color: #7c3aed;
}
.jpyc-fee-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0;
}
.jpyc-waiting {
    text-align: center;
    padding: 20px 0;
}
.jpyc-waiting p {
    margin: 12px 0 4px;
    font-size: 0.95rem;
}
.jpyc-waiting small {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.jpyc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #7c3aed;
    border-radius: 50%;
    margin: 0 auto;
    animation: jpyc-spin 0.8s linear infinite;
}
@keyframes jpyc-spin {
    to { transform: rotate(360deg); }
}
