body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; background-color: #09090b; color: #e4e4e7; }

/* ジャンプ入力欄のスピンボタン（メモリ）を非表示にする */
#viewer-jump-input::-webkit-inner-spin-button,
#viewer-jump-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#viewer-jump-input {
    -moz-appearance: textfield;
}

/* カスタムジャンプドロップダウンのスタイル */
#jump-dropdown-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    z-index: 3000; /* ヘッダーやタブバーより前面に表示 */
    max-height: 208px; /* 8項目程度(約26px×8)でスクロール開始 */
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.jump-opt {
    padding: 6px 10px;
    font-size: 12px;
    color: #e4e4e7;
    cursor: pointer;
    border-bottom: 1px solid #27272a;
}

.jump-opt:hover {
    background: #3b82f6;
    color: #fff;
}
/* 初期化・スクロール復元中の制御 */
body.initializing {
    overflow: hidden !important;
    pointer-events: none !important;
}

/* 遷移中の制御（フェード・グレースケールは廃止） */
body.initializing #g-content {
    pointer-events: none;
}

/* 個別の画像アイテムにスケルトン背景を適用（1枚目だけの違和感を解消） */
.gallery-item {
    background: #18181b;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img:not([src]) {
    opacity: 0;
}

.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #18181b 25%, #27272a 50%, #18181b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    z-index: 0;
}

/* 画像がロードされたらスケルトンを隠す */
.gallery-item img.loaded {
    position: relative;
    z-index: 1;
    opacity: 1;
    cursor: pointer;
}

/* 画像ロード後は裏側のアニメーションを停止して負荷を削減 */
.gallery-item:has(img.loaded)::before {
    content: none !important;
    animation: none !important;
    display: none !important;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.container { max-width: 800px; margin: 0 auto; background: #18181b; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); border: 1px solid #27272a; }

/* Viewer Styles */
#viewer-app { max-width: 1200px; margin: 0 auto; padding: 1rem; }

/* Search UI Styles (Dark & Tile Mode) */
.search-ui-container { margin: 0 auto 2rem auto; width: 100%; max-width: 800px; background: #18181b; border: 1px solid #27272a; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.search-mode-tabs { display: flex; background: #121212; border-bottom: 1px solid #27272a; justify-content: center; }
.search-tab { padding: 0.8rem 2rem; border: none; background: transparent; cursor: pointer; color: #71717a; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; border-bottom: 2px solid transparent; }
.search-tab.active { color: #fff; border-bottom-color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.search-tab:hover:not(.active) { color: #d4d4d8; }
.search-rows { display: flex; flex-wrap: wrap; padding: 1rem; gap: 0.5rem; justify-content: center; }
.search-row-btn { width: 3rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border: 1px solid #3f3f46; background: #27272a; cursor: pointer; font-weight: 500; color: #d4d4d8; font-size: 0.9rem; transition: all 0.2s; border-radius: 6px; }
.search-row-btn:hover { background: #3f3f46; color: #fff; transform: translateY(-2px); }
.search-row-btn.active { border-color: #3b82f6; background: #2563eb; color: #fff; box-shadow: 0 2px 4px rgba(37,99,235,0.3); }
.viewer-header { margin-bottom: 2rem; border-bottom: 1px solid #27272a; padding-bottom: 1rem; display:flex; justify-content: space-between; align-items: center; max-width: 100%; overflow: hidden; }
.back-link { cursor: pointer; color: #60a5fa; text-decoration: none; font-weight: bold; display: flex; align-items: center; gap: 0.5rem; }
.back-link:hover { text-decoration: underline; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.nav-cards-container { display: flex; gap: 1rem; margin: 1rem auto 2rem auto; justify-content: center; flex-wrap: wrap; max-width: 1000px; }
.nav-card { background: #18181b; padding: 1.2rem 1.5rem; border-radius: 8px; text-align: center; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: all 0.2s; border: 2px solid #27272a; color: #e4e4e7; min-width: 140px; }
.nav-card:hover { transform: translateY(-3px); border-color: #3b82f6; color: #fff; background: #27272a; box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3); }
.char-card { background: #18181b; padding: 0.5rem; border-radius: 8px; display: flex; align-items: center; gap: 1rem; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: all 0.2s; border: 2px solid #3f3f46; color: #e4e4e7; overflow: hidden; height: 60px; text-align: left; }
.char-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.char-thumb { height: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; background: #000; }
.char-card:hover { transform: translateY(-3px); border-color: #3b82f6; color: #fff; background: #27272a; }
.g-btn {
    background-color: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.g-btn:disabled { opacity: 0.3; pointer-events: none; }

/* アイコンごとのカラーリング */
.fav-btn { color: #e4e4e7; fill: transparent; } /* 平常時は白 */
.fav-btn.loved { color: #f472b6; fill: #f472b6; } /* お気に入り時はピンク */
.dl-btn { color: #60a5fa; } /* 青 */
.jump-char-btn svg { stroke: #facc15; } /* 黄色 */
.hide-btn { color: #a1a1aa; } /* グレー */
.similar-btn { color: #c084fc; } /* 紫 */
.hide-btn:hover { color: #ef4444; }
.unhide-btn { color: #10b981; }
.unhide-btn:hover { color: #059669; }

/* Viewer Tabs & Menu */
#top-ui-wrapper { display:block; position:fixed; top:60px; right:12px; width:auto; max-width:calc(100vw - 24px); z-index:1400; background:rgba(24,24,27,0.95); border:1px solid #27272a; padding:0.8rem; box-sizing:border-box; border-radius:8px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.viewer-tabs { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.v-tabs-nav { display: flex; gap: 0.5rem; align-items: center; }
#back-to-char-list-btn {
    order: -1; /* ホームボタンを左端に配置 */
    background-color: #10b981; /* 緑色に変更 */
    border-color: #10b981;
    width: 44px;
    height: 44px;
}
#back-to-char-list-btn:hover {
    background-color: #059669; /* より濃い緑色に */
    border-color: #059669;
}

/* ブックマークパネル */
.bookmark-panel { position: absolute; top: calc(100% + 10px); right: 0; width: 300px; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 1rem; box-shadow: 0 8px 24px rgba(0,0,0,0.6); z-index: 10; }
.bookmark-panel h4 { margin: 0 0 0.8rem 0; font-size: 0.9rem; color: #cbd5e1; }
.bookmark-panel hr { border: none; border-top: 1px solid #334155; margin: 1rem 0; }
.bookmark-save-form { display: flex; gap: 0.5rem; }
.bookmark-save-form input { flex-grow: 1; background: #27272a; }
.bookmark-save-form button { width: auto; padding: 0 1rem; }
.bookmark-list { list-style: none; padding: 0; margin: 0; max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.3rem; /* 項目間に隙間を追加 */ }
.bookmark-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.bookmark-item a {
    color: #e4e4e7;
    text-decoration: none;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    padding: 0.4rem 0.6rem;
    background: #3f3f46;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.bookmark-item a:hover {
    background: #52525b;
}
.bookmark-delete-btn { background: none; border: none; color: #ef4444; cursor: pointer; font-weight: bold; padding: 0.2rem; width: auto; }
.bookmark-empty { color: #64748b; font-size: 0.8rem; text-align: center; padding: 1rem 0; }

/* トースト通知 */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #27272a;
    color: #e4e4e7;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 12000;
    font-size: 0.9rem;
    border: 1px solid #3f3f46;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: toast-fade 3s forwards;
}

@keyframes toast-fade {
    0% { transform: translate(-50%, -20px); opacity: 0; }
    10% { transform: translate(-50%, 0); opacity: 1; }
    90% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, -20px); opacity: 0; }
}
.v-tabs-actions { display: flex; align-items: center; gap: 0.5rem; }
.v-tab { background: transparent; border: 2px solid #52525b; padding: 0.5rem 1rem; border-radius: 8px; color: #e4e4e7; font-size: 0.8rem; width: auto; font-weight: 600; cursor:pointer; }
.v-tab-icon { padding: 0.5rem; width: 40px; height: 40px; display:flex; justify-content:center; align-items:center; border-radius: 50%; }
#settings-menu-btn { padding: 0; } /* 歯車アイコンのズレを修正 */
.v-tab-icon svg { width: 20px; height: 20px; }
.v-tab.active { background: #3b82f6; color: #fff; border-color: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }
.v-tab:hover:not(.active) { border-color: #a1a1aa; color: #fff; }

.menu-jump-box { display:flex; align-items:center; gap:4px; position:relative; }

.view-mode-toggle { display:flex; gap:0; border:1px solid #3f3f46; border-radius:8px; overflow:hidden; }
.view-mode-toggle .v-tab-sm { border-radius:0; border:none; padding:0.5rem 1rem; }
.view-mode-toggle .v-tab-sm:not(:first-child) { border-left:1px solid #3f3f46; }
.no-data { text-align: center; color: #71717a; margin-top: 2rem; }

.force-center-layout {
    grid-column: 1 / -1; /* 2列グリッドでも中央に配置するための設定 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.lb-controls { margin-top: 1rem; display: flex; gap: 2rem; }
.lb-btn { background: #333; color: #fff; border: 1px solid #555; padding: 0.8rem 1.5rem; border-radius: 30px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.lb-btn:hover { background: #555; }
.lb-btn.active { color: #ef4444; border-color: #ef4444; }
.loading { text-align: center; margin-top: 2rem; color: #666; }
h1, h2 { margin-top: 0; border-bottom: 1px solid #27272a; padding-bottom: 0.5rem; color: #e4e4e7; }
.form-section { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.hidden { display: none !important; }
input[type="text"], input[type="password"], input[type="file"], button, select { width: 100%; padding: 0.75rem; border-radius: 4px; border: 1px solid #3f3f46; font-size: 1rem; box-sizing: border-box; background-color: #27272a; color: #fff; }
input::placeholder { color: #71717a; }
button { background-color: #0070f3; color: white; border: none; cursor: pointer; font-weight: 500; transition: background-color 0.2s; }
button:hover { background-color: #005bb5; }
button:disabled { background-color: #a1a1aa; cursor: not-allowed; }
.delete-button { background-color: #ef4444; }
.delete-button:hover { background-color: #dc2626; }
#image-list { list-style: none; padding: 0; margin-top: 1rem; }
#image-list li { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border: 1px solid #27272a; border-radius: 4px; margin-bottom: 1rem; background: #18181b; }
.file-info { font-weight: bold; word-break: break-all; }
.file-meta { font-size: 0.85rem; color: #71717a; }
#status, #upload-status { margin-top: 1rem; font-weight: bold; color: #e4e4e7; word-break: break-all; }
.filter-controls { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.delete-section { border-top: 2px dashed #3f3f46; margin-top: 2rem; padding-top: 1rem; }
.upload-action { display: flex; align-items: center; gap: 1rem; }
#valid-file-count { font-size: 0.9rem; color: #71717a; white-space: nowrap; }

.fav-button { background: none; border: none; cursor: pointer; font-size: 1.5rem; color: #e4e4e7; transition: all 0.2s; padding: 0; width: auto; line-height: 1; }
.fav-button:hover { transform: scale(1.2); }
.fav-button.active { color: #ef4444; }
.image-stats { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; font-size: 0.9rem; color: #71717a; }
.stat-item { display: flex; align-items: center; gap: 0.3rem; }

.custom-file-input { position: relative; border: 1px solid #3f3f46; border-radius: 4px; display: flex; align-items: stretch; background-color: #27272a; height: 42px; box-sizing: border-box; overflow: hidden; }
.custom-file-input input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: none; }
.custom-file-input button { background-color: #18181b; color: #a1a1aa; border: none; border-right: 1px solid #3f3f46; padding: 0 1rem; font-size: 1rem; cursor: pointer; white-space: nowrap; width: auto; font-weight: normal; }
.custom-file-input button:hover { background-color: #27272a; color: #e4e4e7; }
.custom-file-input span { display: flex; align-items: center; padding: 0 1rem; font-size: 0.9rem; color: #71717a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; }
/* ギャラリー＆ライトボックス用スタイル */
.list-item-content { display: flex; gap: 1rem; align-items: start; }
.thumb-preview { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid #3f3f46; cursor: pointer; background: #27272a; }
.thumb-preview:hover { opacity: 0.8; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }

/* Viewer Mode: Single Column Feed */
/* Viewer Mode: Single Column Feed (Large) */
:root { --viewer-width: 1100px; }
#gallery-view.gallery-grid { display: flex; flex-direction: column; gap: 12px; max-width: var(--viewer-width); width: 100%; margin: 0 auto; transition: max-width 0.2s; }
#gallery-view .gallery-item { width: 100%; min-height: 100px; box-sizing: border-box; position: relative; background: #000; }

/* 2列表示（見開き）モード */
/* --- 画像間隔の調整設定 --- */

/* Grid (通常) 表示時の設定 */
#g-content {
    display: flex;
    flex-direction: column;
    gap: 24px; /* 【設定】1列モード時の上下の間隔 */
    width: 100%;
    min-height: 101vh; /* 標準モードで常にスクロール可能にする */
    padding-bottom: 150px; /* 最下部の画像ボタンが隠れないように余白を追加 */
    box-sizing: border-box;
}

/* スロット表示（仮想スクロール）有効時のコンテナ上書き */
#g-content.virtual-scroll-active {
    display: block; /* Flex/Gridを解除して絶対配置を許容 */
    height: 100vh !important;
    overflow: hidden !important;
    min-height: 100vh;
}

/* Spread (見開き/2列) 表示時の設定 */
#g-content.view-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px; /* 【設定】2列モード時の上下左右の間隔 */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 150px; /* 2列モード時も同様に余白を確保 */
}
#g-content.view-spread .gallery-item {
    min-height: auto;
    aspect-ratio: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}
/* Spread (見開き) 表示時の画像スタイル */
#g-content.view-spread .gallery-item img {
    max-height: 100vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0px; /* ← 【調整箇所】Spread時の画像の角丸 (0pxで角丸なし) */
}

.v-tab-sm { background: #18181b; color: #71717a; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; font-weight: 600; }
.v-tab-sm:hover { background: #27272a; color: #fff; }
.v-tab-sm.active { background: #3b82f6; color: #fff; }
/* Grid (通常) 表示時の画像スタイル */
#gallery-view .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 4px; /* ← 【調整箇所】Grid時の画像の角丸 (0pxで角丸なし) */
}

/* Overlay Footer Style */
.gallery-item { position: relative; overflow: hidden; }
.gallery-footer { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); padding: 2rem 1rem 1rem 1rem; display: flex; justify-content: center; gap: 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.1s; z-index: 10; }
.gallery-footer.visible { opacity: 1; pointer-events: auto; }

/* Fullscreen Mode (Enhanced) */
#lightbox { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #0c0c0c; z-index: 10000; display: none; flex-direction: column; justify-content: center; align-items: center; }
#lightbox:not(.hidden) { display: flex; }

.fs-img-wrapper { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; }
#fs-footer { position:absolute; bottom:0; width:100%; padding:2rem 0; background:linear-gradient(to top, rgba(0,0,0,0.8), transparent); }

.fs-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: grab; user-select: none; transform-origin: 0 0; }
.fs-img:active { cursor: grabbing; }

/* Viewer Toolbar */
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; background: rgba(0,0,0,0.6); color: #fff; z-index: 10010; }
.viewer-controls { display: flex; gap: 1rem; }
.viewer-btn { background: transparent; border: 1px solid #555; color: #ddd; padding: 0.3rem 0.8rem; border-radius: 4px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.viewer-btn:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }
.viewer-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* Viewer Content Area */
.viewer-content { flex-grow: 1; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; width: 100%; height: 100%; }
.viewer-image-container { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; gap: 4px; transition: opacity 0.15s; }

/* Single Mode */
.viewer-image-container.single img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 0 20px rgba(0,0,0,0.5); }

/* Spread Mode */
.viewer-image-container.spread img { max-width: 49.5%; max-height: 100%; object-fit: contain; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
/* スマホなど狭い画面では強制的に縦積み等はせず、小さく表示（またはJSでSingleに切り替え推奨） */

.nav-area { position: absolute; top: 0; bottom: 0; width: 20%; z-index: 10005; cursor: pointer; }
.nav-left { left: 0; }
.nav-right { right: 0; }
.gallery-item-card { background: #18181b; border: 1px solid #27272a; border-radius: 4px; overflow: hidden; position: relative; aspect-ratio: 2/3; cursor: pointer; transition: transform 0.2s; }
.gallery-item-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.3); border-color: #3b82f6; }
.gallery-item-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); color: #fff; padding: 4px; font-size: 0.8rem; display: flex; justify-content: space-between; opacity: 0; transition: opacity 0.2s; }
.gallery-item-card:hover .gallery-overlay { opacity: 1; }

.ad-promo-grid-wrapper { position: relative; width: 100%; cursor: pointer; border-radius: 8px; overflow: hidden; border: 2px solid #3b82f6; transition: transform 0.2s; background: #000; }
.ad-promo-grid-wrapper:hover { transform: scale(1.01); box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
.ad-promo-grid { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; gap: 2px; }
.ad-promo-grid img { width: 100%; height: auto; display: block; }
.ad-promo-overlay { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.4); padding: 1rem; text-align: center; z-index: 10; }
.ad-promo-overlay span { background: #2563eb; color: #fff; padding: 0.8rem 1.5rem; border-radius: 4px; font-weight: bold; font-size: 1.2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); }

#admin-lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 9999; display: none; justify-content: center; align-items: center; cursor: pointer; }
#admin-lightbox img { max-width: 90%; max-height: 90%; border: 2px solid #fff; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.admin-tab-btn { width: auto !important; padding: 0.5rem 1rem !important; font-size: 0.85rem !important; background: #18181b !important; color: #a1a1aa !important; border: 1px solid #3f3f46 !important; }
.admin-tab-btn.active { background: #3b82f6 !important; color: #fff !important; border-color: #3b82f6 !important; }

/* Inspector Styles */
.inspector-infobox { padding: 1rem; border-radius: 4px; border: 1px solid #3f3f46; background: #27272a; text-align: center; }
.inspector-infobox.error { border-color: #ef4444; color: #f87171; }
.inspector-infobox.success { border-color: #10b981; color: #6ee7b7; }
.inspector-found-container { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: #1e293b; border: 1px solid #3b82f6; border-radius: 8px; }
.inspector-found-container .info-text { flex-grow: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.inspector-found-container .info-text span { font-size: 0.8rem; color: #94a3b8; }
.inspector-found-container .actions { display: flex; flex-direction: column; gap: 0.5rem; }
.inspector-found-container .actions button { width: 100%; }
.group-section { margin-top: 1.5rem; border-top: 1px solid #3f3f46; padding-top: 1rem; }
.group-section h4 { margin: 0 0 1rem 0; display: flex; justify-content: space-between; align-items: center; }
.group-section h4 a { font-size: 0.8rem; font-weight: normal; }
.inspector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }
.grid-item { position: relative; background: #000; border-radius: 4px; overflow: hidden; cursor: pointer; }
.grid-item img { width: 100%; height: auto; display: block; }
.grid-item.selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.4);
    border: 2px solid #3b82f6;
    border-radius: 4px;
}
.grid-item .grid-item-info { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.7rem; padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ad-flex-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; width: 100%; }