/**
 * トップページ スタイル（モバイルファースト）。
 * 共通トークン/ボタンは diagnosis.css（.toeic-shindan）を流用し、
 * ここではトップ固有レイアウトを .toeic-top にスコープして定義する。
 */

.toeic-top {
	/* diagnosis.css と同じトークンを再宣言（単独利用でも崩れないように） */
	--ts-fg: #1f2430;
	--ts-muted: #6b7280;
	--ts-primary: #2563eb;
	--ts-primary-dark: #1d4ed8;
	--ts-cta: #f97316;
	--ts-cta-dark: #ea580c;
	--ts-border: #e5e7eb;
	--ts-radius: 14px;
	--ts-shadow: 0 6px 20px rgba(17, 24, 39, 0.08);

	box-sizing: border-box;
	max-width: 560px;
	margin: 0 auto;
	padding: 12px;
	color: var(--ts-fg);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
		"Noto Sans JP", "Segoe UI", Meiryo, sans-serif;
	line-height: 1.6;
}
.toeic-top *,
.toeic-top *::before,
.toeic-top *::after {
	box-sizing: border-box;
}

/* ボタンは diagnosis.css の .ts-btn を流用するが、トップ単独でも効くよう最低限を補完 */
.toeic-top .ts-btn {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 14px 18px;
	border: none;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.toeic-top .ts-btn-primary { background: var(--ts-primary); color: #fff; }
.toeic-top .ts-btn-cta { background: var(--ts-cta); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,.35); }
.toeic-top .ts-btn-ghost { background: transparent; color: var(--ts-muted); border: 1px solid var(--ts-border); font-weight: 600; margin-top: 10px; }

/* A. ヒーロー */
.tt-hero {
	text-align: center;
	padding: 28px 16px 24px;
	background: linear-gradient(160deg, #eff6ff 0%, #ffffff 70%);
	border-radius: 18px;
	margin: 8px 0 18px;
}
.tt-hero-title {
	font-size: 28px;
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 12px;
}
.tt-hero-sub {
	font-size: 15px;
	color: var(--ts-muted);
	margin: 0 auto 22px;
	max-width: 36em;
}
.tt-hero-cta {
	max-width: 360px;
	margin: 0 auto;
}

/* カテゴリチップ */
.tt-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}
.tt-chip {
	display: inline-block;
	padding: 7px 14px;
	background: #fff;
	border: 1.5px solid var(--ts-border);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ts-primary-dark);
	text-decoration: none;
}
.tt-chip:hover {
	border-color: var(--ts-primary);
	background: #f5f8ff;
}

/* B. 今日の1問 */
.tt-daily {
	background: #fff;
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
	padding: 18px 16px;
	margin: 18px 0;
}
.tt-daily-head {
	display: flex;
	align-items: center;
	gap: 8px;
}
.tt-daily-badge {
	display: inline-block;
	background: var(--ts-cta);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	padding: 4px 12px;
	border-radius: 999px;
}
.tt-daily-skill {
	font-size: 12px;
	color: var(--ts-muted);
	border: 1px solid var(--ts-border);
	border-radius: 999px;
	padding: 2px 10px;
}
.tt-daily-subtext {
	font-size: 12px;
	color: var(--ts-muted);
	margin: 8px 0 12px;
}
.tt-q-stem {
	font-size: 16px;
	font-weight: 600;
	margin: 6px 0 14px;
}
/* .ts-passage / .ts-choices / .ts-choice は diagnosis.css を流用。トップ単独でも崩れないよう補完 */
.toeic-top .ts-passage {
	background: #f8fafc;
	border: 1px solid var(--ts-border);
	border-radius: 10px;
	padding: 12px;
	font-size: 14px;
	white-space: pre-line;
	margin-bottom: 14px;
}
.toeic-top .ts-choices { display: flex; flex-direction: column; gap: 10px; }
.toeic-top .ts-choice {
	width: 100%;
	min-height: 50px;
	padding: 13px 16px;
	background: #fff;
	color: var(--ts-fg);
	border: 1.5px solid var(--ts-border);
	border-radius: 12px;
	font-size: 15px;
	text-align: left;
	cursor: pointer;
}
.toeic-top .ts-choice:hover { border-color: var(--ts-primary); background: #f5f8ff; }

/* 今日の1問: 結果 */
.tt-verdict {
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 8px;
}
.tt-verdict.is-correct { color: #16a34a; }
.tt-verdict.is-wrong { color: #ef4444; }
.tt-answer { font-weight: 600; margin: 0 0 8px; }
.tt-explanation {
	font-size: 14px;
	background: #f8fafc;
	border-left: 4px solid var(--ts-primary);
	padding: 10px 12px;
	border-radius: 6px;
	margin: 0 0 14px;
}
.tt-nudge {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 12px;
}

/* D. 再掲CTA */
.tt-cta-block {
	margin: 18px 0;
}
.tt-cta-block .ts-btn-cta {
	max-width: 360px;
	margin: 0 auto;
}

/* E. SNS導線 */
.tt-sns {
	text-align: center;
	margin: 22px 0 8px;
}
.tt-sns-label {
	font-size: 13px;
	color: var(--ts-muted);
	margin: 0 0 10px;
}
.tt-sns-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.tt-sns-link {
	display: inline-block;
	padding: 8px 16px;
	border: 1.5px solid var(--ts-border);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--ts-fg);
}
.tt-sns-link:hover { border-color: var(--ts-primary); }

.toeic-top .ts-loading { text-align: center; color: var(--ts-muted); padding: 24px 0; }
.toeic-top .ts-trademark { font-size: 11px; color: var(--ts-muted); margin-top: 18px; text-align: center; }

@media (min-width: 600px) {
	.tt-hero-title { font-size: 34px; }
	.tt-hero { padding: 40px 24px 32px; }
}

/* ダークモード */
@media (prefers-color-scheme: dark) {
	.toeic-top {
		--ts-fg: #e5e7eb;
		--ts-muted: #9ca3af;
		--ts-border: #2a3242;
	}
	.tt-hero { background: linear-gradient(160deg, #16203a 0%, #0f1420 70%); }
	.tt-daily, .toeic-top .ts-choice, .tt-chip { background: #161c2b; }
	.toeic-top .ts-choice:hover { background: #20283b; }
	.toeic-top .ts-passage, .tt-explanation { background: #1b2233; }
	.tt-sns-link { color: var(--ts-fg); }
}
