*{box-sizing:border-box}
:root{font-family:"BIZ UDPGothic",sans-serif;color:#252525;background:#f6f7f9}
body{margin:0}
.site-header{height:60px;background:#fff;border-bottom:1px solid #e7e7e7;display:flex;align-items:center;justify-content:space-between;padding:0 max(20px,calc((100% - 1100px)/2));position:sticky;top:0;z-index:5}
.brand{font-weight:800;letter-spacing:.04em;color:#222;text-decoration:none}
.site-header nav a{color:#555;text-decoration:none;font-size:14px}.site-header nav .active{font-weight:700;color:#222}
.container{max-width:1100px;margin:0 auto;padding:28px 20px 60px}
.page-heading{margin:10px 0 24px}.page-heading h1{font-size:clamp(25px,4vw,34px);margin:4px 0 8px}
.eyebrow{font-size:10px;letter-spacing:.14em;font-weight:800;color:#929292;margin:0 0 5px}
.muted{color:#777}.small{font-size:12px;margin:12px 0 0}
.panel{background:#fff;border:1px solid #e9e9e9;border-radius:15px;padding:22px;margin:16px 0;box-shadow:0 3px 14px rgba(0,0,0,.025)}
.week-controls{display:flex;align-items:center;justify-content:space-between;gap:12px}
.week-label{display:flex;align-items:center;gap:12px;font-weight:700}
select,button{font:inherit}
select{border:1px solid #ddd;border-radius:8px;padding:9px 12px;background:#fff;max-width:100%}
.button{border:0;border-radius:9px;padding:10px 14px;cursor:pointer;font-weight:700}
.button.secondary{background:#f0f1f3;color:#333}
.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.section-title h2{font-size:20px;margin:0}
.filters{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.filters label{font-size:13px;color:#666;display:flex;align-items:center;gap:8px}
.chart-wrap{height:310px;position:relative;margin:8px 0 18px}
.table-wrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;min-width:620px;font-size:13px}
th,td{padding:11px 12px;border-bottom:1px solid #eee;text-align:right;white-space:nowrap}
th{background:#fafafa;color:#666;font-weight:700}
th:first-child,td:first-child{text-align:left;font-weight:700}
td.empty{color:#bbb}
.video-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.video-card{border:1px solid #eee;border-radius:12px;padding:14px;min-width:0}
.video-card .group{display:inline-block;background:#fff;color:#222;border:1px solid #333;border-radius:5px;padding:3px 8px;font-size:11px;font-weight:800}
.video-card h3{font-size:14px;line-height:1.55;margin:10px 0}
.video-card .meta{font-size:12px;color:#777;line-height:1.8}
.status{font-size:13px;color:#666;padding:8px 2px}.status.error{color:#b42318}
.footer{text-align:center;color:#999;font-size:11px;padding:25px 0}
.footer a{color:#777;text-decoration:none}
.footer a:hover{text-decoration:underline}
@media(max-width:640px){
 .container{padding:20px 12px 40px}.panel{padding:16px 13px;border-radius:12px}
 .week-controls{display:grid;grid-template-columns:1fr 1fr}.week-label{grid-column:1/-1;grid-row:1;justify-content:center}
 .week-controls button{font-size:12px;padding:9px 6px}
 .chart-wrap{height:260px}.section-title h2{font-size:18px}
}

/* グループ別ページへのナビゲーション */
.group-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.group-nav a{display:inline-block;padding:7px 11px;border-radius:999px;background:#f2f3f5;color:#555;text-decoration:none;font-size:12px;font-weight:700;white-space:nowrap}
.group-nav a.active{background:#252525;color:#fff}
#latestSection[hidden]{display:none}
#latestTable{min-width:760px}
@media(max-width:640px){
 .site-header{height:auto;min-height:60px;align-items:flex-start;gap:10px;padding:12px;flex-direction:column}
 .group-nav{width:100%;gap:6px}
 .group-nav a{padding:6px 9px;font-size:11px}
}

/* YouTube埋め込み */
.youtube-embed{position:relative;width:100%;aspect-ratio:16/9;margin:10px 0 8px;overflow:hidden;border-radius:9px;background:#111}
.youtube-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}


/* 最新データ：先頭のグループ／週列の左右余白をコンパクトに */
#latestTable th:first-child,
#latestTable td:first-child{padding-left:7px;padding-right:7px}

.group-title-cell{text-align:left!important;font-weight:400!important}

/* スマートフォンでは最新データのグループ列をさらにコンパクトに */
@media(max-width:640px){
  #latestTable th:first-child,
  #latestTable td:first-child{padding-left:2px;padding-right:2px}
}

/* 動画情報：ヘッダー（更新日・基準時刻・Title）付きの表形式。行をまたいで列を揃える */
.video-info-list{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);column-gap:12px}
.video-info-row{display:contents}
.video-info-row>span{padding:8px 0;border-bottom:1px solid #eee}
.video-info-list>.video-info-row:last-child>span{border-bottom:0}
.video-info-head>span{font-size:11px;font-weight:700;color:#666;border-bottom:1px solid #ddd}
.video-info-detail{font-size:10px;color:#666;line-height:1.4;white-space:nowrap}
.video-info-title{font-size:11px;line-height:1.4;overflow-wrap:anywhere}
@media(max-width:640px){
  .video-info-list{column-gap:8px}
  /* 最新データ：スマホではグループ列と再生回数列の余白を詰める */
  #latestTable{min-width:0;width:auto}
  #latestTable th,#latestTable td{padding:9px 6px}
  #latestTable th:first-child,#latestTable td:first-child{padding-left:2px;padding-right:6px}
}

/* 最新データ：全列を左寄せ */
#latestTable th,#latestTable td{text-align:left}

/* ヘッダーナビ：Other Topics */
.group-nav a.nav-extra{background:transparent;border:1px solid #d6d8dc}
.group-nav a.nav-extra.active{background:#252525;border-color:#252525}

/* Other Topics（ブログ形式） */
.topic-list{display:grid;gap:12px}
.topic-card{display:block;border:1px solid #eee;border-radius:12px;padding:16px 18px;color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s}
.topic-card:hover{border-color:#bbb;box-shadow:0 3px 14px rgba(0,0,0,.05)}
.topic-card .date{font-size:11px;color:#929292;letter-spacing:.06em;margin:0 0 4px}
.topic-card h2{font-size:17px;line-height:1.5;margin:0 0 6px}
.topic-card .summary{font-size:13px;color:#666;line-height:1.7;margin:0}
.article-meta{font-size:12px;color:#929292;margin:0 0 6px}
.article-body h2{font-size:18px;margin:26px 0 10px}
.article-body p{font-size:14px;line-height:1.85;margin:10px 0}
.article-note{font-size:12px;color:#777;line-height:1.7;margin:12px 0 0}
.back-link{display:inline-block;font-size:13px;color:#555;text-decoration:none;margin-bottom:6px}
.back-link:hover{text-decoration:underline}

/* 単位表記（再生回数は万回ベース） */
.unit{font-size:11px;color:#666;border:1px solid #ddd;border-radius:999px;padding:2px 10px;white-space:nowrap;font-weight:400;align-self:center}
h2 .unit{margin-left:10px;vertical-align:middle}

/* 再生回数 TOP5 */
.top-list{list-style:none;margin:0;padding:0}
.top-row{display:grid;grid-template-columns:6em minmax(0,1fr) max-content 4.4em;column-gap:10px;align-items:baseline;padding:10px 0;border-bottom:1px solid #eee;font-size:13px}
.top-row:last-child{border-bottom:0}
.top-rank{font-weight:700;color:#929292;text-align:left;white-space:nowrap;overflow:visible}
.top-week{color:#666;white-space:nowrap}
.top-title{line-height:1.5;overflow-wrap:anywhere}
.top-views{font-weight:700;white-space:nowrap;text-align:right}
.top-link{text-align:right}

/* X埋め込み */
.embed-wrap{display:flex;justify-content:center;min-height:120px}
.embed-wrap .twitter-tweet{margin:0 auto}

/* グラフを含むセクション：スマホでは余白を詰めて横幅を広く使う */
@media(max-width:640px){
  .panel-chart{padding:12px 6px}
  .panel-chart .section-title{padding:0 6px;margin-bottom:6px}
  .panel-chart .filters{padding:0 6px;margin-bottom:4px}
  .panel-chart .chart-wrap{height:240px;margin:0 0 6px}
  .panel-chart th,.panel-chart td{padding:8px 6px}
  .panel-chart .table-wrap{margin:0}
  .top-row{grid-template-columns:5.2em minmax(0,1fr) max-content 4em;column-gap:8px}
}

/* 日別推移・時間別推移・最新データ・再生回数TOP5：文字を小さく */
.panel-chart table,.panel-chart .filters,#latestTable,.top-list{font-size:12px}
.panel-chart .filters label{font-size:12px}
.top-row{font-size:12px}
@media(max-width:640px){
  .panel-chart table,.panel-chart .filters,#latestTable,.top-list,.top-row{font-size:11px}
  .panel-chart .filters label{font-size:11px}
}

/* Titleヘッダーは左寄せ */
th.title-head{text-align:left!important}
@media(max-width:640px){
  /* 日別・時間別：スマホでは列間の余白を詰める */
  .panel-chart table{min-width:0;width:auto}
  .panel-chart th,.panel-chart td{padding:8px 4px}
  .panel-chart th:first-child,.panel-chart td:first-child{padding-left:2px}
  .panel-chart .group-title-cell{white-space:normal;max-width:10em;min-width:6em}
}

.top-link{color:#c4302b;text-decoration:none;white-space:nowrap;font-weight:700}
.top-link:hover{text-decoration:underline}

/* 文字サイズ（さらに一段小さく）：日別・時間別・最新データ・TOP5 */
.panel-chart table,.panel-chart .filters,#latestTable,.top-list,.top-row,.panel-chart .filters label{font-size:11px}
@media(max-width:640px){
  .panel-chart table,.panel-chart .filters,#latestTable,.top-list,.top-row,.panel-chart .filters label{font-size:10px}
}

/* ヘッダーバナー画像 */
.site-banner-link{display:block;line-height:0;background:#f4e6d3}
.site-banner{display:block;width:100%;height:clamp(96px,17vw,200px);object-fit:cover;object-position:center 48%}

/* 動画カードのグループ名（グループ別ページへのリンク） */
.video-card a.group{text-decoration:none;transition:background .15s,color .15s}
.video-card a.group:hover{background:#252525;color:#fff}

/* ALLページの説明文を小さく */
#pageDescription{font-size:11px}

/* このサイトについて */
.about-body h2{font-size:15px;margin:26px 0 8px;padding-bottom:6px;border-bottom:1px solid #eee}
.about-body h2:first-child{margin-top:0}
.about-body p{font-size:13px;line-height:1.9;margin:8px 0}

/* Other Topics の説明文を小さく */
.lead-small{font-size:11px}

/* フッターナビ（ヘッダーと同じリンク） */
.footer-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px;margin-bottom:12px}
.footer-nav a,.footer-about{color:#777;text-decoration:none}
.footer-nav a:hover,.footer-about:hover{text-decoration:underline}

/* フッター：Xリンク */
.footer-x{display:block;width:fit-content;margin:0 auto 8px;color:#555;text-decoration:none;font-weight:700;border:1px solid #ddd;border-radius:999px;padding:4px 14px}
.footer-x:hover{background:#252525;border-color:#252525;color:#fff}
.footer-about{display:block}
