body {
    font-family: Arial, sans-serif;
    background-color: #f3f5f7; /* ニュース系の薄いグレー */
    color: #1f2937; /* 文字は濃いグレーで読みやすく */
    margin: 0;
    padding: 0;
}
header {
    background-color: #0b2545; /* 濃紺（報道系） */
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
header nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
header nav a {
    color: #ffffff;
    margin: 0 10px;
    text-decoration: none;
}
header nav a:hover {
    text-decoration: underline;
}
header input {
    margin-left: 10px;
}
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
}
.main-content {
    flex: 0 0 70%;
    max-width: 70%;
}
.sidebar {
    flex: 0 0 25%;
    max-width: 25%;
    background-color: #eef2f6; /* サイドは薄い青みグレー */
    padding: 20px;
    margin-top: 20px;
}
.top-news, .sub-news, .sidebar-section {
    background-color: #ffffff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.top-news img {
    max-width: 100%;
    border-radius: 8px;
}
.sub-news .news-item {
    display: flex;
    margin-bottom: 10px;
}
.sub-news .news-item img {
    max-width: 30%;
    margin-right: 10px;
    border-radius: 8px;
}
footer {
    background-color: #0b2545; /* ヘッダーと統一 */
    color: #ffffff;
    text-align: center;
    padding: 10px 20px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .main-content {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 20px;
    }
    .sub-news .news-item {
        flex-direction: column;
    }
    .sub-news .news-item img {
        max-width: 100%;
        margin-bottom: 10px;
    }
}
@media (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    header nav {
        flex-direction: column;
        align-items: flex-start;
    }
    header nav a {
        margin: 5px 0;
    }
    header input {
        margin-left: 0;
        margin-top: 10px;
    }
}
.timeline {
    max-width: 40%;
    border: 1px solid #0b2545; /* ニュース系の引き締め */
    padding: 10px;
}
/* SNS投稿用 */
.share-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:20px 0;
}

.share-bar-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:140px;
  padding:12px 16px;
  border-radius:8px;
  color:#fff;
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  line-height:1;
  box-shadow:0 2px 8px rgba(0,0,0,0.12);
  transition:transform .2s, opacity .2s, box-shadow .2s;
}

.share-bar-btn:hover{
  transform:translateY(-2px);
  opacity:.92;
  box-shadow:0 5px 14px rgba(0,0,0,0.18);
}

.share-bar-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:rgba(255,255,255,0.18);
  font-size:12px;
  font-weight:700;
  flex-shrink:0;
}

.share-bar-btn.x{
  background:#111;
}

.share-bar-btn.threads{
  background:#222;
}

.share-bar-btn.line{
  background:#06c755;
}

.share-bar-btn.facebook{
  background:#1877f2;
}

.share-bar-btn.line .share-bar-icon{
  font-size:9px;
}

.share-bar-btn.facebook .share-bar-icon{
  font-size:16px;
  font-family:Arial, sans-serif;
}

.share-bar-title{
  margin:18px 0 8px;
  font-size:13px;
  font-weight:700;
  color:#444;
}

@media (max-width: 700px){
  .share-bar{
    gap:8px;
  }

  .share-bar-btn{
    flex:1 1 calc(50% - 8px);
    min-width:0;
    padding:11px 12px;
    font-size:13px;
  }

  .share-bar-text{
    white-space:nowrap;
  }
}

@media (max-width: 420px){
  .share-bar-btn{
    flex:1 1 100%;
  }
}

/* ===== YouTube埋め込み ===== */
/* ===== YouTube（最新1本＋3～6件カード）最終CSS ===== */

/* JSで生成する最新動画プレーヤー（16:9レスポンシブ） */
#youtube .yt-player{
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin-top: 8px;
}
#youtube .yt-player iframe{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* タイトル・日時 */
#youtube .yt-meta{
    margin-top: 8px;
}
#youtube .yt-title{
    font-weight: 700;
    line-height: 1.4;
}
#youtube .yt-title a{
    color: inherit;
    text-decoration: none;
}
#youtube .yt-title a:hover{
    text-decoration: underline;
}
#youtube .yt-date{
    font-size: 0.9em;
    opacity: 0.85;
    margin-top: 2px;
}

/* カード一覧（PC=3列、タブレット=2列、スマホ=1列） */
#youtube .yt-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

/* カード本体 */
#youtube .yt-card{
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
    transition: transform 0.08s ease;
}
#youtube .yt-card:hover{
    transform: translateY(-1px);
}

/* サムネ枠（16:9固定） */
#youtube .yt-thumb{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

/* ★重要：既存CSS「.sub-news .news-item img { max-width:30% }」を無効化して縦長を防ぐ */
#youtube .yt-thumb img,
#youtube .yt-card img{
    display: block;
    max-width: none !important;   /* 30%指定を打ち消す */
    width: 100% !important;
    height: 100% !important;
    margin-right: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* カード内テキスト */
#youtube .yt-card-body{
    padding: 8px 10px;
}
#youtube .yt-card-title{
    font-weight: 700;
    font-size: 0.95em;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
#youtube .yt-card-date{
    font-size: 0.85em;
    opacity: 0.85;
    margin-top: 4px;
}

/* レスポンシブ */
@media (max-width: 860px){
    #youtube .yt-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px){
    #youtube .yt-grid{
        grid-template-columns: 1fr;
    }
}