/* ==========================================================================
   トップページ
   今日のテーマ → YouTube → Twitch → X → ノート
   見た目はノートの世界観（方眼紙・紙・セロハンテープの写真）に合わせる
   ========================================================================== */

.ss-home .hm {
	padding-top: 6px;
}

/* ---------- 共通：セクション ---------- */

.ss-home .hm-sec {
	margin: 0 0 30px;
	padding: 22px 18px 20px;
	background: var(--nb-paper);
	box-shadow: var(--nb-shadow);
}

.ss-home .hm-sec__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 16px;
}

.ss-home .hm-sec__title {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin: 0;
	font-family: var(--nb-hand);
	font-size: clamp(17px, 4.8vw, 20px);
	white-space: nowrap;
	font-weight: 600;
	color: var(--nb-navy);
}

.ss-home .hm-sec__more {
	flex: none;
	font-size: 12px !important;
	font-weight: 700;
	color: var(--nb-green-d) !important;
	text-decoration: none !important;
}

.ss-home .hm-ico {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	font-family: var(--nb-sans);
	font-size: 13px;
	line-height: 1;
}

.ss-home .hm-ico--yt { background: #ff0033; color: #fff; font-size: 11px; }
.ss-home .hm-ico--tw { background: #9146ff; color: #fff; font-size: 10px; }
.ss-home .hm-ico--x  { background: #0f1419; color: #fff; font-size: 14px; }

.ss-home .hm-subscribe {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 18px;
	border-radius: 999px;
	background: #ff0033;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: transform .15s ease, filter .15s ease;
}

.ss-home .hm-subscribe:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
}

.ss-home .hm-subscribe--x {
	background: #0f1419;
}

/* ---------- LIVE（配信中だけ・最上部） ---------- */

.ss-home .hm-live {
	position: relative;
	display: block;
	margin: 0 0 26px;
	padding: 14px;
	border-radius: 16px;
	background: linear-gradient(135deg, #2a0a3d 0%, #4c1d95 55%, #9146ff 100%);
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: 0 10px 30px rgba(145, 70, 255, .35);
	animation: hm-live-glow 2.4s ease-in-out infinite;
}

.ss-home .hm-live[hidden] {
	display: none;
}

@keyframes hm-live-glow {
	0%, 100% { box-shadow: 0 10px 30px rgba(145, 70, 255, .35), 0 0 0 0 rgba(225, 29, 72, .0); }
	50% { box-shadow: 0 10px 34px rgba(145, 70, 255, .5), 0 0 0 4px rgba(225, 29, 72, .35); }
}

.ss-home .hm-live__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 10px;
	aspect-ratio: 16 / 9;
	background: #1a0b2e;
}

.ss-home .hm-live__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ss-home .hm-live__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 6px;
	background: #e11d48;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .08em;
}

.ss-home .hm-live__badge i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	animation: ss-live-dot 1s ease-in-out infinite alternate;
}

.ss-home .hm-live__viewers {
	position: absolute;
	bottom: 10px;
	left: 10px;
	padding: 3px 9px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .65);
	font-size: 12px;
	font-weight: 700;
}

.ss-home .hm-live__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 4px 4px;
}

.ss-home .hm-live__now {
	font-size: 13px;
	font-weight: 800;
	color: #fecdd3;
}

.ss-home .hm-live__title {
	font-family: var(--nb-hand);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.5;
}

.ss-home .hm-live__meta {
	font-size: 12px;
	color: #ddd6fe;
}

.ss-home .hm-live__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin-top: 8px;
	border-radius: 999px;
	background: #fff;
	color: #6d28d9;
	font-size: 15px;
	font-weight: 800;
}

/* ---------- 今日のテーマ ---------- */

.ss-home .hm-theme {
	margin-bottom: 30px;
}

.ss-home .hm-theme__label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--nb-green-d);
}

.ss-home .hm-theme__label span {
	padding: 1px 8px;
	border-radius: 999px;
	background: #ecfdf3;
	font-size: 11px;
}

.ss-home .hm-theme__title {
	margin: 0 0 10px;
	font-family: var(--nb-hand);
	font-size: clamp(22px, 6vw, 30px);
	font-weight: 600;
	line-height: 1.5;
}

.ss-home .hm-theme__title a {
	color: var(--nb-navy) !important;
	text-decoration: none !important;
}

.ss-home .hm-theme__text {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.85;
	color: var(--nb-sub);
}

.ss-home .hm-theme__stats {
	display: flex;
	gap: 16px;
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--nb-sub);
}

.ss-home .hm-theme__stats b {
	margin-right: 2px;
	font-size: 17px;
	color: var(--nb-navy);
}

.ss-home .hm-theme__rank {
	margin: 0 0 16px;
	padding: 10px 12px;
	background: #fffbeb;
	border-radius: 10px;
	list-style: none;
}

.ss-home .hm-theme__rank li {
	margin: 0;
	list-style: none;
}

.ss-home .hm-theme__rank li + li {
	border-top: 1px dashed #f3e3b5;
}

.ss-home .hm-theme__rank a {
	display: flex;
	gap: 8px;
	padding: 7px 0;
	font-size: 13px !important;
	line-height: 1.6;
	color: var(--nb-ink) !important;
	text-decoration: none !important;
}

.ss-home .hm-theme__rank-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ss-home .hm-theme__btn {
	max-width: none;
}

/* ---------- YouTube ---------- */

.ss-home .hm-yt__main {
	display: block;
	color: inherit !important;
	text-decoration: none !important;
}

.ss-home .hm-yt__photo {
	aspect-ratio: 16 / 9;
	margin: 6px 4px 14px;
	padding-bottom: 14px;
	transform: rotate(-.8deg);
}

.ss-home .hm-yt__photo .nb-photo__img,
.ss-home .hm-yt__thumb .nb-photo__img {
	object-fit: cover;
}

/* 再生ボタン */
.ss-home .hm-play {
	position: absolute;
	top: calc(50% - 7px);
	left: 50%;
	width: 64px;
	height: 44px;
	margin: -22px 0 0 -32px;
	border-radius: 12px;
	background: rgba(255, 0, 51, .92);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	transition: transform .15s ease;
}

.ss-home .hm-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -9px 0 0 -6px;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
}

.ss-home .hm-play--sm {
	width: 40px;
	height: 28px;
	margin: -14px 0 0 -20px;
	border-radius: 8px;
}

.ss-home .hm-play--sm::after {
	margin: -6px 0 0 -4px;
	border-width: 6px 0 6px 10px;
}

.ss-home a:hover .hm-play {
	transform: scale(1.08);
}

.ss-home .hm-new {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 3px 10px;
	border-radius: 6px;
	background: #ffdf4f;
	color: #5c4300;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	transform: rotate(4deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.ss-home .hm-yt__title {
	display: block;
	font-family: var(--nb-hand);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.55;
	color: var(--nb-navy);
}

.ss-home .hm-yt__meta {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: var(--nb-sub);
}

.ss-home .hm-yt__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px 14px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.ss-home .hm-yt__grid li {
	margin: 0;
	list-style: none;
}

.ss-home .hm-yt__grid a {
	display: block;
	color: inherit !important;
	text-decoration: none !important;
}

.ss-home .hm-yt__thumb {
	aspect-ratio: 16 / 9;
	margin: 0 0 10px;
	padding: 4px 4px 10px;
}

.ss-home .hm-yt__thumb.is-tilt-l { transform: rotate(-1.4deg); }
.ss-home .hm-yt__thumb.is-tilt-r { transform: rotate(1.2deg); }

.ss-home .hm-yt__small-title {
	display: -webkit-box;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--nb-ink);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ss-home .hm-yt__soon {
	padding: 22px 16px;
	border: 2px dashed #ffc2cc;
	border-radius: 12px;
	background: #fff5f7;
	text-align: center;
}

.ss-home .hm-yt__soon-title {
	margin: 0 0 6px;
	font-family: var(--nb-hand);
	font-size: 18px;
	font-weight: 600;
	color: var(--nb-navy);
}

.ss-home .hm-yt__soon-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
	color: var(--nb-sub);
}

/* ---------- Twitch ---------- */

.ss-home .hm-tw__card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border-radius: 12px;
	background: #f5f0ff;
	color: inherit !important;
	text-decoration: none !important;
}

.ss-home .hm-tw__avatar {
	flex: none;
	width: 56px;
	height: 56px;
	border: 3px solid #9146ff;
	border-radius: 50%;
	object-fit: cover;
}

.ss-home .hm-tw__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ss-home .hm-tw__name {
	font-size: 16px;
	font-weight: 800;
	color: #2a0a3d;
}

.ss-home .hm-tw__status {
	font-size: 12px;
	line-height: 1.6;
	color: #6b5a8a;
}

.ss-home .hm-tw__on {
	color: #e11d48;
}

/* 次回配信の日時を目立たせる */
.ss-home .hm-tw__next {
	display: inline-block;
	margin-left: 2px;
	padding: 1px 8px;
	border-radius: 6px;
	background: #9146ff;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
}

.ss-home .hm-tw__follow {
	flex: none;
	padding: 8px 14px;
	border-radius: 999px;
	background: #9146ff;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.ss-home .hm-tw__sub {
	margin: 18px 0 10px;
	font-size: 12px;
	font-weight: 700;
	color: var(--nb-sub);
}

/* クリップ（2列のサムネイル） */
.ss-home .hm-tw__clips[hidden] {
	display: none;
}

.ss-home .hm-tw__cliplist {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ss-home .hm-tw__cliplist li {
	margin: 0;
	list-style: none;
}

.ss-home .hm-tw__cliplist a {
	display: block;
	color: inherit !important;
	text-decoration: none !important;
}

.ss-home .hm-tw__cliplist .hm-tw__vthumb {
	position: relative;
	display: block;
	margin-bottom: 8px;
}

.ss-home .hm-tw__noclip {
	margin: 0;
	padding: 14px;
	border: 1.5px dashed #d8c8f5;
	border-radius: 10px;
	font-size: 12px;
	line-height: 1.8;
	text-align: center;
	color: #6b5a8a;
}

.ss-home .hm-tw__dur {
	position: absolute;
	right: 6px;
	bottom: 6px;
	padding: 1px 6px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .7);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
}

.ss-home .hm-play--tw {
	top: 50%;
	background: rgba(145, 70, 255, .92);
}

.ss-home .hm-tw__vods {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ss-home .hm-tw__vods li {
	margin: 0;
	list-style: none;
}

.ss-home .hm-tw__vods a {
	display: grid;
	grid-template-columns: 120px 1fr;
	grid-template-rows: auto 1fr;
	column-gap: 12px;
	color: inherit !important;
	text-decoration: none !important;
}

.ss-home .hm-tw__vthumb {
	grid-row: 1 / -1;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 16 / 9;
	background: #e9e3f5;
}

.ss-home .hm-tw__vthumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ss-home .hm-tw__vtitle {
	display: -webkit-box;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--nb-ink);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- X ---------- */

.ss-home .hm-x__posts {
	display: grid;
	gap: 6px;
}

.ss-home .hm-x__post .twitter-tweet {
	margin: 0 auto !important;
}

/* widgets.js が読み込まれる前の、仮の見た目 */
.ss-home .hm-x__post blockquote.twitter-tweet {
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	font-size: 14px;
	line-height: 1.7;
}

/* 自動表示のタイムライン（読み込み前は小さな案内だけ） */
.ss-home .hm-x__timeline {
	min-height: 80px;
	border-radius: 12px;
	overflow: hidden;
}

.ss-home .hm-x__timeline[hidden] {
	display: none;
}

.ss-home .hm-x__timeline > a.twitter-timeline {
	display: block;
	padding: 24px 12px;
	border: 1px dashed #d6d3c8;
	border-radius: 12px;
	font-size: 13px !important;
	text-align: center;
	color: var(--nb-sub) !important;
	text-decoration: none !important;
}

.ss-home .hm-x__empty {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: var(--nb-sub);
}

/* ---------- PC ---------- */

@media (min-width: 640px) {
	.ss-home .hm-sec {
		padding: 28px 30px 26px;
	}

	.ss-home .hm-live {
		display: grid;
		grid-template-columns: 1.2fr 1fr;
		gap: 20px;
		padding: 18px;
	}

	.ss-home .hm-live__body {
		justify-content: center;
		padding: 0;
	}

	.ss-home .hm-yt__grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.ss-home .hm-tw__vods {
		grid-template-columns: repeat(3, 1fr);
	}

	.ss-home .hm-tw__cliplist {
		grid-template-columns: repeat(4, 1fr);
	}

	.ss-home .hm-tw__vods a {
		grid-template-columns: 1fr;
	}

	.ss-home .hm-tw__vthumb {
		grid-row: auto;
		margin-bottom: 8px;
	}

	.ss-home .hm-subscribe {
		max-width: 320px;
		margin-left: auto;
		margin-right: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ss-home .hm-live,
	.ss-home .hm-live__badge i {
		animation: none;
	}
}
