:root {
    --bg: #0f1015;
    --card-bg: #171922;
    --card-border: #262936;
    --accent: #e91e63;
    --accent-hover: #ff3b7d;
    --accent-gold: #f5b400;
    --text: #eef0f6;
    --muted: #8e95a8;
    --green: #00e676;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    line-height: 1.45;
}
a { color: inherit; text-decoration: none; }

/* ===== ヘッダー・ナビ（エロ漫画サイト風：左ハンバーガー・中央ホームボタン・右お気に入り） ===== */
.topbar {
    background: #13151d;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-brand-row {
    max-width: 1320px;
    margin: 0 auto;
    padding: 8px 14px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}
.topbar-side-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.topbar-side-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.hamburger-btn {
    background: #1c1f2b;
    border: 1px solid var(--card-border);
    color: #eef0f6;
    padding: 6px 11px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hamburger-btn:hover {
    border-color: var(--accent);
    color: #fff;
}
.hm-icon {
    font-size: 15px;
    line-height: 1;
}
.brand-center-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.brand-logo {
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 17px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(233, 30, 99, 0.35);
    transition: transform 0.12s, background 0.12s;
    white-space: nowrap;
}
.brand-center-btn:hover .brand-logo {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
/* ===== ハンバーガーメニュードロワー ===== */
.hm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 900;
}
.hm-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 88vw;
    background: #141620;
    border-right: 1px solid var(--card-border);
    z-index: 910;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}
.hm-drawer.open {
    transform: translateX(0);
}
.hm-drawer-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #10121a;
}
.hm-close-btn {
    background: #1e2230;
    border: 1px solid var(--card-border);
    color: #d7dce8;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.hm-drawer-body {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.hm-search-form {
    display: flex;
    gap: 4px;
}
.hm-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 8px;
    padding-left: 7px;
    border-left: 3px solid var(--accent);
}
.hm-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hm-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    background: #1a1d29;
    border: 1px solid #25293a;
    color: #e5e9f2;
    padding: 9px 11px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.hm-nav-item:hover {
    border-color: var(--accent);
    background: #202434;
}
.hm-genre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}
.hm-genre-item {
    background: #1a1d29;
    border: 1px solid #25293a;
    padding: 7px 9px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hm-genre-item:hover {
    border-color: var(--accent);
    color: #fff;
}
.hm-count {
    font-size: 10.5px;
    color: var(--muted);
    background: rgba(0,0,0,0.3);
    padding: 1px 5px;
    border-radius: 3px;
}
.hm-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.hm-tag-chip {
    background: #1c202e;
    border: 1px solid #2a2f42;
    color: #c2c9dc;
    font-size: 11.5px;
    padding: 4px 8px;
    border-radius: 3px;
}
.hm-tag-chip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.search-input {
    flex: 1;
    background: #0b0c10;
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 7px 11px;
    border-radius: 4px;
    font-size: 13px;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
}
.search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}
.nav-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.nav-btn {
    background: #1c1f2b;
    border: 1px solid var(--card-border);
    color: #d7dce8;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.nav-btn:hover {
    border-color: var(--accent);
    color: #fff;
}
.nav-btn.admin {
    color: var(--accent-gold);
    border-color: rgba(245, 180, 0, 0.4);
}
.nav-btn.mobile-preview-toggle {
    background: #1f293d;
    border-color: #3b82f6;
    color: #93c5fd;
}

/* ===== ジャンルタブバー ===== */
.genre-bar {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.genre-bar::-webkit-scrollbar { display: none; }
.genre-pill {
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #c2c8d8;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-bottom: 2px solid transparent;
    transition: 0.12s;
}
.genre-pill:hover {
    color: #fff;
    background: rgba(255,255,255,0.03);
}
.genre-pill.active {
    color: #fff;
    border-bottom-color: var(--accent);
    background: rgba(233, 30, 99, 0.1);
}
.pill-count {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}
.genre-pill.active .pill-count {
    color: #ff85ad;
}

/* ===== 人気エロタグバー（細分化タグ） ===== */
.subtag-bar {
    max-width: 1320px;
    margin: 0 auto;
    padding: 6px 16px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #101219;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.subtag-bar::-webkit-scrollbar { display: none; }
.subtag-label {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 700;
}
.subtag-pill {
    font-size: 11.5px;
    color: #b4bcd0;
    background: #1a1d28;
    border: 1px solid #262a3a;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
}
.subtag-pill:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

/* ===== お気に入り・閲覧履歴ドロワー ===== */
.user-drawer {
    background: #13151e;
    border-bottom: 2px solid var(--accent);
    padding: 16px;
}
.user-drawer-inner {
    max-width: 1320px;
    margin: 0 auto;
}
.user-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.user-drawer-head h2 {
    font-size: 16px;
    margin: 0;
}

/* ===== メインコンテナ・グリッド ===== */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px;
}
.list-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}
.list-head h1 {
    font-size: 17px;
    margin: 0;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
}
.sort-tabs {
    display: flex;
    gap: 4px;
}
.sort-tab {
    background: #1a1d28;
    border: 1px solid var(--card-border);
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}
.sort-tab:hover {
    color: #fff;
}
.sort-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 14px;
}
.video-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    border-color: #484e68;
}
.video-card.infeed-ad-card {
    border-color: rgba(245, 180, 0, 0.4);
    background: #191822;
}
.thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}
.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.badge-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}
.badge-frames {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.72);
    color: #ccc;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    pointer-events: none;
}
.badge-source {
    position: absolute;
    top: 6px;
    left: 6px;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
}
.card-fav-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(12, 14, 20, 0.78);
    border: 1px solid rgba(255,255,255,0.18);
    color: #8e95a8;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-fav-btn:hover, .card-fav-btn.active {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    background: rgba(20, 18, 10, 0.9);
}
.card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.card-title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.42;
    color: #edf0f7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title:hover {
    color: #ff6b9b;
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.tag-chip {
    background: #202330;
    color: #aab2c7;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
}
.tag-chip.tag-genre {
    background: rgba(233, 30, 99, 0.16);
    color: #ff85ad;
}
.tag-chip:hover {
    background: var(--accent);
    color: #fff;
}
.card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    padding-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.meta-rating {
    color: #ff6b9b;
    font-weight: 700;
}

/* ===== 動画視聴ページ ===== */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 980px) {
    .watch-layout {
        grid-template-columns: 1fr;
    }
}
.player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}
.player-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.overlay-step1 {
    position: absolute;
    inset: 0;
    z-index: 20;
    cursor: pointer;
    background: transparent;
}
.overlay-step1-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    z-index: -1;
}
.big-play-btn {
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    padding: 13px 28px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
}
.overlay-step2 {
    position: absolute;
    inset: 0;
    z-index: 15;
    background: #10121a;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}
.preroll-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.preroll-badge {
    background: var(--accent-gold);
    color: #000;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
}
.preroll-center {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(245,180,0,0.35);
    background: rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.preroll-img { width: 100%; max-width: 400px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; }
.preroll-price { font-size: 12px; color: var(--accent-gold); }
.preroll-cta {
    display: inline-block;
    margin-top: 6px;
    background: var(--accent-gold);
    color: #000;
    font-weight: 800;
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 13px;
}
.skip-btn {
    background: rgba(25, 28, 38, 0.95);
    border: 1px solid #555;
    color: #ccc;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: not-allowed;
}
.skip-btn.ready {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    cursor: pointer;
}
.video-info-box {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
}
.video-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.meta-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.meta-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.watch-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.action-btn {
    background: #212534;
    border: 1px solid #32374d;
    color: #e2e6f0;
    padding: 6px 11px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.action-btn:hover {
    border-color: var(--accent);
    color: #fff;
}
.action-btn.like-btn.active {
    background: rgba(233, 30, 99, 0.2);
    border-color: var(--accent);
    color: #ff6b9b;
}
.action-btn.watch-fav-btn.active {
    background: rgba(245, 180, 0, 0.18);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.action-btn.action-pr {
    background: #262218;
    color: #ffd97d;
    border-color: rgba(245, 180, 0, 0.45);
}
.watch-tags {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.watch-tags .tag-chip {
    font-size: 12px;
    padding: 3px 8px;
}
.section-heading {
    font-size: 15.5px;
    margin: 22px 0 12px 0;
    padding-left: 9px;
    border-left: 3px solid var(--accent);
}
.side-heading {
    font-size: 13.5px;
    margin: 0 0 10px 0;
    padding-left: 8px;
    border-left: 3px solid var(--accent);
    color: #d7dce8;
}
.infeed-horizontal {
    margin-top: 12px;
    background: var(--card-bg);
    border: 1px solid rgba(245, 180, 0, 0.35);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.infeed-horizontal .infeed-h-thumb { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.side-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.side-card {
    display: flex;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px;
}
.side-card:hover {
    border-color: #484e68;
}
.side-card.infeed {
    border-color: rgba(245, 180, 0, 0.4);
    background: #191822;
}
.side-thumb {
    position: relative;
    width: 132px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}
.side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.side-dur, .side-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
}
.side-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}
.side-title {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.side-meta {
    font-size: 11px;
    color: var(--muted);
}

/* ===== 人気ランキング ===== */
.ranking {
    margin-bottom: 20px;
    background: #13151e;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 12px;
}
.ranking-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ranking-head h2 {
    font-size: 15px;
    margin: 0;
    padding-left: 8px;
    border-left: 3px solid var(--accent-gold);
}
.ranking-more { font-size: 12px; color: var(--accent); font-weight: 700; }
.rank-row { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.rank-card { display: block; min-width: 0; }
.rank-card .thumb-wrap { border-radius: 4px; border: 1px solid var(--card-border); }
.rank-title { font-size: 12px; font-weight: 700; line-height: 1.38; margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-no {
  position: absolute; top: 0; left: 0; min-width: 26px; height: 26px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff; background: rgba(0,0,0,0.8); border-bottom-right-radius: 4px;
}
.rank-1 { background: #eab308; color: #000; }
.rank-2 { background: #cbd5e1; color: #000; }
.rank-3 { background: #d97706; color: #000; }

/* ===== ページ送り ===== */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px; margin: 24px 0 6px; }
.pager-btn {
  min-width: 36px; height: 36px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 4px; font-size: 13px; font-weight: 700;
}
.pager-btn:hover { border-color: var(--accent); }
.pager-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager-gap { color: var(--muted); padding: 0 2px; }

/* ===== 管理画面・共通 ===== */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 14px; }
.stat-num { font-size: 24px; font-weight: 900; margin-top: 4px; }
.panel { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 18px; margin-bottom: 20px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; color: #cfd5e8; }
.form-row input, .form-row select {
    width: 100%; background: #0b0c10; border: 1px solid var(--card-border); color: #fff;
    padding: 8px 11px; border-radius: 4px; font-size: 13.5px;
}
.badge-pr { background: var(--accent-gold); color: #000; }
.ad-title { color: #ffd97d; }
.tag-pr { background: rgba(245,180,0,0.18); color: var(--accent-gold); }
.ad-price { color: #fff; font-weight: 700; }
.ad-rating { color: var(--accent-gold); font-weight: 700; }
.search-empty { grid-column: 1 / -1; background: var(--card-bg); padding: 32px; border-radius: 6px; text-align: center; }
.footer { margin-top: 44px; border-top: 1px solid var(--card-border); padding: 20px 16px; text-align: center; color: var(--muted); font-size: 12px; }

/* ===== 年齢確認ゲート ===== */
.age-gate {
  position: fixed; inset: 0; z-index: 9999; background: rgba(8, 8, 12, 0.985);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.age-ok .age-gate { display: none; }
.age-gate-box { max-width: 400px; width: 100%; text-align: center; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px; padding: 26px 20px; }
.age-gate-mark { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--accent); color: var(--accent); font-size: 24px; font-weight: 800; line-height: 52px; }
.age-gate-btns { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 8px; }
.age-yes { background: var(--accent); color: #fff; border: 0; border-radius: 4px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.age-no { display: block; border: 1px solid var(--card-border); border-radius: 4px; padding: 10px; font-size: 13px; color: var(--muted); }

/* ===== PC上でスマホ画面（390px）を確認できるプレビューモード ===== */
html.mobile-preview-mode {
    background: #050608;
}
html.mobile-preview-mode body {
    width: 390px;
    max-width: 390px;
    min-height: 844px;
    margin: 12px auto;
    border: 3px solid #3b82f6;
    border-radius: 22px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.82);
    overflow-x: hidden;
    position: relative;
    /* transform を指定することで position:fixed のハンバーガーメニューも390pxのスマホ枠内に収まる */
    transform: translateZ(0);
}
html.mobile-preview-mode .hm-drawer {
    width: 84%;
    max-width: 315px;
}

/* ===== スマホ表示 ＆ スマホプレビューモード共通スタイル ===== */
@media (max-width: 640px) {
  .topbar-brand-row { padding: 7px 8px; }
  .hm-label { display: none; }
  .hamburger-btn { padding: 6px 9px; }
  .brand-logo { font-size: 15px; padding: 5px 12px; }
  .nav-btn { padding: 5px 7px; font-size: 11px; }
  .genre-bar { padding: 0 8px; }
  .genre-pill { padding: 7px 9px; font-size: 12px; }
  .container { padding: 8px; }
  .list-head { margin-bottom: 10px; gap: 6px; }
  .list-head h1 { font-size: 15px; width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-body { padding: 7px 8px; gap: 4px; }
  .card-title { font-size: 12px; line-height: 1.36; }
  .card-tags { gap: 3px; overflow: hidden; max-height: 19px; }
  .tag-chip { font-size: 10px; padding: 1px 4px; }
  .card-meta { font-size: 10px; padding-top: 4px; }
  .badge-duration { font-size: 10px; bottom: 4px; right: 4px; padding: 1px 4px; }
  .badge-frames { font-size: 9px; bottom: 4px; left: 4px; padding: 1px 4px; }
  .card-fav-btn { width: 24px; height: 24px; font-size: 12px; top: 4px; right: 4px; }
  .rank-row { grid-auto-columns: 148px; gap: 8px; }
  .rank-title { font-size: 11.5px; }
  .watch-layout { grid-template-columns: 1fr; }
  .video-title { font-size: 15px; }
}
html.mobile-preview-mode .topbar-brand-row { padding: 7px 8px; }
html.mobile-preview-mode .hm-label { display: none; }
html.mobile-preview-mode .hamburger-btn { padding: 6px 9px; }
html.mobile-preview-mode .brand-logo { font-size: 15px; padding: 5px 12px; }
html.mobile-preview-mode .nav-btn { padding: 5px 7px; font-size: 11px; }
html.mobile-preview-mode .container { padding: 8px; }
html.mobile-preview-mode .list-head h1 { font-size: 15px; width: 100%; }
html.mobile-preview-mode .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.mobile-preview-mode .card-body { padding: 7px 8px; gap: 4px; }
html.mobile-preview-mode .card-title { font-size: 12px; line-height: 1.36; }
html.mobile-preview-mode .card-tags { gap: 3px; overflow: hidden; max-height: 19px; }
html.mobile-preview-mode .tag-chip { font-size: 10px; padding: 1px 4px; }
html.mobile-preview-mode .card-meta { font-size: 10px; padding-top: 4px; }
html.mobile-preview-mode .rank-row { grid-auto-columns: 148px; gap: 8px; }
html.mobile-preview-mode .watch-layout { grid-template-columns: 1fr; }
html.mobile-preview-mode .video-title { font-size: 15px; }
