
/* Avatar upload hover effect */
.profile-avatar-edit:hover .avatar-upload-overlay {
    opacity: 1 !important;
}

/* Broadcaster specific styles */
.broadcaster-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.broadcaster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.broadcaster-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.broadcaster-header h1 .logo-icon {
    width: 36px;
    height: 36px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Login Section */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-main);
}

.login-box {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.login-hint {
    text-align: center;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-light);
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h2 svg {
    color: var(--primary);
}

/* Video Preview */
#videoPreview {
    width: 100%;
    background: #000;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

.stream-controls {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Device Selection */
.device-selection {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.device-selection label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.device-selection select {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.device-selection select:last-child {
    margin-bottom: 0;
}

/* Stats - Compact */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stat-item {
    background: var(--bg-input);
    padding: 10px 8px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-value.small {
    font-size: 1rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Stamp Ranking */
.stamp-ranking {
    max-height: 200px;
    overflow-y: auto;
}

.stamp-ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.stamp-ranking-item:last-child {
    border-bottom: none;
}

.stamp-ranking-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stamp-ranking-rank.gold {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
}

.stamp-ranking-rank.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: white;
}

.stamp-ranking-rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
}

.stamp-ranking-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-input);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stamp-ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stamp-ranking-info {
    flex: 1;
    min-width: 0;
}

.stamp-ranking-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stamp-ranking-points {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.stamp-ranking-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Room Info */
.room-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.room-info p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.room-info p strong {
    color: var(--text-primary);
}

.room-id {
    font-family: monospace;
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-medium);
}

.room-info input[type="text"] {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Status Badge */
.status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.live {
    background: #e74c3c;
    color: white;
    animation: pulse 2s infinite;
}

.status.offline {
    background: var(--bg-hover);
    color: var(--text-muted);
}

.status.connecting {
    background: #f39c12;
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Chat */
#chatMessages {
    height: 200px;
    overflow-y: auto;
    background: var(--bg-input);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.chat-message {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.chat-message .sender {
    color: var(--primary);
    font-weight: 600;
}

.chat-message .ban-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-message:hover .ban-btn {
    opacity: 1;
}

.chat-message .ban-btn:hover {
    color: var(--danger);
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons override */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #d63a52;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.hidden {
    display: none !important;
}

/* ============================================================
   Tier 1-A: 配信者 2FA (TOTP) 設定カード
   strict CSP (style-src 'self') で inline style 属性が禁止されているため、
   全スタイルをクラス経由で当てる。
   ============================================================ */
.totp-help {
    margin: 8px 0 16px;
    color: var(--text-muted);
}
.totp-status {
    margin-bottom: 12px;
}
.totp-status-enabled {
    color: #4caf50;
    font-weight: 600;
}
.totp-status-disabled {
    color: var(--text-muted);
}
.totp-status-when {
    opacity: 0.7;
    font-weight: 400;
}
.totp-section {
    margin-top: 12px;
}
.totp-confirm-help {
    color: var(--text-muted);
    margin-bottom: 8px;
}
.totp-qr-container {
    text-align: center;
    background: #fff;
    color: #333;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}
.totp-qr-help {
    color: #333;
    margin-bottom: 8px;
}
.totp-link-button {
    display: inline-block;
    padding: 10px 16px;
    background: #2196f3;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    word-break: break-all;
    font-weight: 500;
}
.totp-link-button:hover {
    background: #1976d2;
}
.totp-manual-toggle {
    margin-bottom: 12px;
}
.totp-manual-toggle summary {
    cursor: pointer;
    color: var(--text-muted);
}
.totp-manual-secret {
    margin-top: 8px;
    word-break: break-all;
    font-family: monospace;
    color: var(--text-muted);
}
.totp-error {
    color: #e74c3c;
    font-size: 0.85rem;
    min-height: 20px;
    margin-bottom: 8px;
}
.totp-cancel-btn {
    margin-left: 8px;
}

/* ============================================================
   Tier 2-A: 配信予告 (Schedules) カード
   ============================================================ */
.schedule-empty {
    color: var(--text-muted);
    padding: 12px 0;
    font-size: 0.9rem;
}
.schedule-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-light, rgba(255,255,255,0.06));
}
.schedule-row:first-of-type { border-top: none; }
.schedule-row-main { flex: 1; min-width: 0; }
.schedule-row-when {
    color: var(--pink, #ff3ea0);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.schedule-row-title {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}
.schedule-row-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
    word-break: break-word;
}
.schedule-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.schedule-row-actions .btn {
    padding: 6px 8px;
    min-width: 32px;
}
.schedule-add-form {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light, rgba(255,255,255,0.06));
}
.schedule-add-form summary {
    cursor: pointer;
    color: var(--pink, #ff3ea0);
    font-weight: 600;
    margin-bottom: 12px;
    padding: 4px 0;
}
.schedule-add-form[open] summary { margin-bottom: 16px; }

/* Home link */
.home-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.home-link:hover {
    color: var(--primary);
}

/* Ban Management */
.banned-list {
    max-height: 200px;
    overflow-y: auto;
}

.banned-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 8px;
}

.banned-item-info {
    flex: 1;
}

.banned-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.banned-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.banned-item-reason {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.banned-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-tab {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dashboard-tab:hover {
    color: var(--primary);
}

.dashboard-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.dashboard-tab-content {
    display: none;
}

.dashboard-tab-content.active {
    display: block;
}

/* Market Products Styles */
.market-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .market-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.market-stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.market-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.market-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition-fast);
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.product-thumbnail {
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnail-placeholder {
    color: var(--text-muted);
}

.product-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-status-badge.published {
    background: var(--success);
    color: white;
}

.product-status-badge.draft {
    background: var(--text-muted);
    color: white;
}

/* C-20 / H-21: 事前承認ステータスを .product-status-badge の左に並べる */
.product-approval-badge {
    position: absolute;
    top: 8px;
    right: 78px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}
.product-approval-badge.pending {
    background: var(--warning, #f39c12);
    color: #4a2e00;
}
.product-approval-badge.approved {
    background: var(--leaf-500, #7ed4a5);
    color: #0d3a21;
}
.product-approval-badge.rejected {
    background: var(--r18-600, #b73046);
    color: white;
}
.product-rejection-reason {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(183, 48, 70, 0.12);
    border-left: 3px solid var(--r18-600, #b73046);
    color: var(--text-secondary, #e0c9b4);
    font-size: 0.78rem;
    line-height: 1.4;
}

.product-info {
    padding: 16px;
}

.product-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.product-sales {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Add Product Form */
.add-product-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px dashed var(--border-medium);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.add-product-card:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.add-product-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

/* Product Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.file-upload-zone {
    border: 2px dashed var(--border-medium);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 16px;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.file-upload-zone.has-file {
    border-style: solid;
    border-color: var(--success);
}

.file-preview {
    margin-top: 12px;
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stream-controls {
        flex-wrap: wrap;
    }

    .stream-controls .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .device-selection {
        width: 100%;
    }

    .device-selection select {
        width: 100%;
    }

    .broadcaster-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .broadcaster-container {
        padding: 12px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .chat-input {
        flex-wrap: wrap;
    }
}

@keyframes pointFadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* ============================================================
   商品画像グリッド (1商品最大10枚の複数画像セット)
   ============================================================ */
.product-images-count { color: var(--text-muted); font-weight: 400; margin-left: 6px; }

.product-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.product-images-grid.is-empty { display: none; }

.product-image-card {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image-card img {
    width: 100%;
    height: 100%;
    /* object-fit: contain でアスペクト比を維持して枠内に収める。
       縦長・横長どちらも切り取られずに全体が見える。上下または左右の
       余白はカードの黒背景 (bg-input) で埋められる。 */
    object-fit: contain;
    display: block;
}
.product-image-card.is-uploading {
    background: rgba(0,0,0,0.2);
}
.product-image-card.is-uploading .hamster-loader {
    transform: scale(0.5);
}
.product-image-placeholder { color: var(--text-muted); }

.product-image-order {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 22px;
    text-align: center;
}

.product-image-controls {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.product-image-card:hover .product-image-controls,
.product-image-card:focus-within .product-image-controls {
    opacity: 1;
}
.product-image-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
.product-image-btn:hover { background: rgba(0, 0, 0, 0.85); }
.product-image-btn.product-image-remove:hover { background: var(--r18-600, #b73046); }

.product-images-add {
    padding: 16px;
    min-height: 80px;
}

/* 配信者の編集画面で自分の商品 原寸画像をサッと確認するライトボックス。
   admin.js showAdminFullImageLightbox と対になる broadcaster 版。 */
.admin-full-image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 40px 20px;
    cursor: pointer;
}
.admin-full-image-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}
.admin-full-image-close {
    position: absolute;
    top: 16px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease;
}
.admin-full-image-close:hover { background: rgba(255, 255, 255, 0.3); }


/* Tier 2-B: NG ワード badge */
.ng-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}
.ng-badge-block {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 1px solid #ff9800;
}
.ng-badge-ban {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid #f44336;
}

/* ============================================================
   Tier 2-D: 収益詳細 card
   ============================================================ */
.revenue-card { margin-bottom: 16px; }
.revenue-period {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}
.revenue-totals {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.revenue-total-item {
    background: var(--bg-input);
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
}
.revenue-total-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.revenue-total-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}
.revenue-total-grand .revenue-total-value {
    color: var(--pink, #ff3ea0);
    font-size: 1.2rem;
}
.revenue-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.06));
    overflow-x: auto;
}
.revenue-bar-col {
    flex: 1 1 auto;
    min-width: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    position: relative;
}
.revenue-bar-stack {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}
.revenue-bar-seg {
    width: 100%;
    transition: height 300ms ease-out;
}
.revenue-bar-seg.stamp { background: #ff9800; }
.revenue-bar-seg.gift { background: #2196f3; }
.revenue-bar-seg.market { background: var(--pink, #ff3ea0); }
.revenue-bar-day {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
    transform: rotate(-45deg);
    transform-origin: top left;
    white-space: nowrap;
}
.revenue-bar-col[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    border: 1px solid var(--border-medium);
    z-index: 10;
}

/* Tier 3-A2: 事務所共有 BAN バッジ (配信者ダッシュ) */
.ban-shared-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(112, 38, 215, 0.15);
    color: #b48aff;
    border: 1px solid #7026d7;
    margin-left: 6px;
    vertical-align: middle;
}
