/* =========================================================
   ROOT SEVEN Prediction Platform — ポップテーマ
   色を変えたいときは、下の「テーマカラー」だけ書き換えればOK。
   ========================================================= */

:root {
	/* ---- テーマカラー ---- */
	--r7-main: #ff5a5f;         /* メイン（ボタン・強調） */
	--r7-main-2: #ff9f1c;       /* メインのグラデーション相手 */
	--r7-sub: #12b886;          /* サブ（無料・成功） */
	--r7-sky: #3b8bff;          /* 会員限定 */
	--r7-sun: #ffc93c;          /* 先払い */
	--r7-grape: #8b5cf6;        /* 成果報酬 */
	--r7-ink: #2b2d42;          /* 文字 */
	--r7-mute: #7a7f99;         /* 補足文字 */
	--r7-line: #eceef5;         /* 罫線 */
	--r7-bg: #fff8f1;           /* 薄い背景 */
	--r7-card: #ffffff;         /* カード */

	/* ---- 形 ---- */
	--r7-radius: 20px;
	--r7-radius-s: 12px;
	--r7-shadow: 0 6px 20px rgba(43, 45, 66, .08), 0 2px 6px rgba(43, 45, 66, .05);
	--r7-shadow-hover: 0 14px 34px rgba(255, 90, 95, .18), 0 4px 10px rgba(43, 45, 66, .06);
	--r7-font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}

/* ---- 共通 ---- */
.r7-cards, .r7-detail, .r7-mypage, .r7-predictor, .r7-filter, .r7-notice, .r7-empty {
	font-family: var(--r7-font);
	color: var(--r7-ink);
}
.r7-detail *, .r7-mypage *, .r7-cards * { box-sizing: border-box; }
.r7-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.r7-small { font-size: 12px; color: var(--r7-mute); }
.r7-empty {
	text-align: center; padding: 40px 16px; color: var(--r7-mute);
	background: var(--r7-bg); border-radius: var(--r7-radius);
}
.r7-empty::before { content: "🏇"; display: block; font-size: 36px; margin-bottom: 6px; }

/* ---- 絞り込み ---- */
.r7-filter {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: 16px 0; padding: 12px 14px; background: var(--r7-bg); border-radius: 999px;
}
.r7-filter label { font-weight: 700; font-size: 14px; }
.r7-filter input[type=date] {
	font: inherit; border: 2px solid var(--r7-line); border-radius: 999px;
	padding: 6px 12px; background: #fff; margin-left: 6px;
}

/* ---- 予想カード一覧 ---- */
.r7-cards {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 18px; margin: 18px 0;
}
.r7-card {
	--r7-accent: var(--r7-main);
	position: relative; display: flex; flex-direction: column; gap: 4px;
	padding: 22px 18px 18px; border-radius: var(--r7-radius);
	background: var(--r7-card); box-shadow: var(--r7-shadow);
	text-decoration: none !important; color: inherit; overflow: hidden;
	transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s;
}
.r7-card::before {  /* 上の色帯 */
	content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
	background: linear-gradient(90deg, var(--r7-accent), color-mix(in srgb, var(--r7-accent) 55%, #fff));
}
.r7-card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--r7-shadow-hover); }
.r7-card--public_free { --r7-accent: var(--r7-sub); }
.r7-card--member_free { --r7-accent: var(--r7-sky); }
.r7-card--paid { --r7-accent: var(--r7-main); }

.r7-card__race {
	display: inline-block; align-self: flex-start;
	font-size: 12px; font-weight: 700; color: var(--r7-mute);
	background: var(--r7-bg); padding: 3px 10px; border-radius: 999px;
}
.r7-card__title { font-weight: 800; font-size: 17px; line-height: 1.45; margin: 6px 0 2px; }
.r7-card__by { font-size: 13px; color: var(--r7-mute); font-weight: 500; }
.r7-card__by::before { content: "🎯 "; }
.r7-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.r7-card__deadline { font-size: 12px; font-weight: 700; color: #e8590c; }
.r7-card__deadline::before { content: "⏰ "; }

/* ---- バッジ ---- */
.r7-badge {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 12px; line-height: 1; font-weight: 800; letter-spacing: .02em;
	padding: 6px 11px; border-radius: 999px; color: #fff;
	background: var(--r7-mute); box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
}
.r7-badge--public_free { background: linear-gradient(135deg, #20c997, var(--r7-sub)); }
.r7-badge--public_free::before { content: "✨"; }
.r7-badge--member_free { background: linear-gradient(135deg, #5ea8ff, var(--r7-sky)); }
.r7-badge--member_free::before { content: "🔑"; }
.r7-badge--prepaid { background: linear-gradient(135deg, #ffe066, var(--r7-sun)); color: #6b4700; }
.r7-badge--prepaid::before { content: "🪙"; }
.r7-badge--performance,
.r7-badge--performance_with_cap,
.r7-badge--fixed_plus_performance { background: linear-gradient(135deg, #b197fc, var(--r7-grape)); }
.r7-badge--performance::before,
.r7-badge--performance_with_cap::before,
.r7-badge--fixed_plus_performance::before { content: "🏆"; }

/* ---- 結果 ---- */
.r7-result {
	margin-top: 10px; font-size: 13px; font-weight: 500;
	background: var(--r7-bg); border-radius: var(--r7-radius-s); padding: 8px 12px;
}
.r7-result strong { color: var(--r7-main); font-size: 15px; }

/* ---- 予想詳細 ---- */
.r7-detail { --r7-accent: var(--r7-main); }
.r7-detail--public_free { --r7-accent: var(--r7-sub); }
.r7-detail--member_free { --r7-accent: var(--r7-sky); }
.r7-detail__head {
	position: relative; padding: 22px 20px 18px; border-radius: var(--r7-radius);
	background:
		radial-gradient(circle at 100% 0, color-mix(in srgb, var(--r7-accent) 22%, transparent) 0, transparent 55%),
		var(--r7-bg);
}
.r7-detail__title { font-family: var(--r7-font) !important; margin: 8px 0 4px; font-size: clamp(22px, 5vw, 30px); font-weight: 800; line-height: 1.3; }
.r7-teaser { margin: 16px 4px; line-height: 1.8; }
.r7-owned {
	display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 999px;
	font-size: 13px; font-weight: 700; color: #087f5b; background: #e6fcf5;
}
.r7-owned::before { content: "✅ "; }
.r7-body {
	margin: 18px 0; padding: 20px; line-height: 1.9;
	border-radius: var(--r7-radius); background: #fff;
	border: 3px dashed color-mix(in srgb, var(--r7-accent) 45%, #fff);
}

/* ---- 購入ボックス ---- */
.r7-locked {
	margin: 20px 0; padding: 22px 18px; border-radius: var(--r7-radius);
	background: #fff; box-shadow: var(--r7-shadow);
}
.r7-locked > p:first-child { font-weight: 700; margin-top: 0; }
.r7-locked > p:first-child::before { content: "🔒 "; }
.r7-plans { padding-left: 0; list-style: none; }
.r7-plans li { padding: 10px 14px; margin: 6px 0; background: var(--r7-bg); border-radius: var(--r7-radius-s); }

.r7-plan {
	position: relative; display: block; margin: 10px 0; padding: 14px 16px 14px 48px;
	border: 2px solid var(--r7-line); border-radius: 16px; background: #fff;
	cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.r7-plan:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--r7-main) 40%, var(--r7-line)); }
.r7-plan input[type=radio] {
	position: absolute; left: 16px; top: 17px; width: 20px; height: 20px;
	accent-color: var(--r7-main); margin: 0;
}
.r7-plan:has(input:checked) {
	border-color: var(--r7-main);
	background: linear-gradient(135deg, #fff5f5, #fff9ef);
	box-shadow: 0 6px 16px rgba(255, 90, 95, .15);
}
.r7-plan strong { font-size: 16px; font-weight: 800; }
.r7-plan span { font-weight: 700; color: var(--r7-main); }
.r7-plan small { display: inline-block; margin-top: 4px; color: var(--r7-mute); line-height: 1.6; }
.r7-plan--disabled { opacity: .5; cursor: not-allowed; }
.r7-plan--disabled:hover { transform: none; border-color: var(--r7-line); }
.r7-warn { color: #e03131 !important; font-weight: 700; }

.r7-balance {
	display: flex; justify-content: space-between; align-items: center;
	margin: 14px 0; padding: 12px 16px; border-radius: var(--r7-radius-s);
	background: var(--r7-bg); font-weight: 500;
}
.r7-balance strong { font-size: 20px; color: var(--r7-ink); }
.r7-agree { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 16px; font-size: 14px; line-height: 1.6; cursor: pointer; }
.r7-agree input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--r7-main); flex: none; }

/* ---- ボタン ---- */
.r7-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 11px 22px; border-radius: 999px; border: 2px solid var(--r7-line);
	background: #fff; color: var(--r7-ink) !important; text-decoration: none !important;
	font: 700 15px/1.2 var(--r7-font); cursor: pointer;
	transition: transform .15s cubic-bezier(.34, 1.56, .64, 1), box-shadow .15s;
}
.r7-btn:hover { transform: translateY(-2px); box-shadow: var(--r7-shadow); }
.r7-btn:active { transform: translateY(1px) scale(.98); }
.r7-btn--primary {
	border: 0; color: #fff !important;
	background: linear-gradient(135deg, var(--r7-main), var(--r7-main-2));
	box-shadow: 0 6px 0 color-mix(in srgb, var(--r7-main) 70%, #000), 0 10px 20px rgba(255, 90, 95, .25);
}
.r7-btn--primary:hover { box-shadow: 0 8px 0 color-mix(in srgb, var(--r7-main) 70%, #000), 0 14px 24px rgba(255, 90, 95, .3); }
.r7-btn--primary:active { box-shadow: 0 2px 0 color-mix(in srgb, var(--r7-main) 70%, #000); }
.r7-purchase .r7-btn--primary { width: 100%; padding: 16px; font-size: 17px; }
.r7-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.r7-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---- お知らせ ---- */
.r7-notice {
	display: flex; gap: 10px; align-items: flex-start;
	padding: 12px 16px; border-radius: 16px; margin: 12px 0; font-weight: 700; line-height: 1.6;
	animation: r7-pop .35s cubic-bezier(.34, 1.56, .64, 1);
}
.r7-error { background: #fff0f0; color: #c92a2a; }
.r7-error::before { content: "⚠️"; }
.r7-success { background: #ebfbee; color: #2b8a3e; }
.r7-success::before { content: "🎉"; }
@keyframes r7-pop { from { transform: scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- 表 ---- */
.r7-table-wrap {
	overflow-x: auto; margin: 14px 0; border-radius: var(--r7-radius-s);
	background: #fff; box-shadow: var(--r7-shadow);
}
.r7-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.r7-table th {
	background: var(--r7-bg); font-size: 12px; font-weight: 800; color: var(--r7-mute);
	white-space: nowrap;
}
.r7-table th, .r7-table td { border: 0; border-bottom: 1px solid var(--r7-line); padding: 10px 12px; text-align: left; }
.r7-table tbody tr:last-child td { border-bottom: 0; }
.r7-table tbody tr:hover td { background: #fffaf5; }
.r7-table tfoot th, .r7-table tfoot td { font-weight: 800; background: var(--r7-bg); border-bottom: 0; }

/* ---- マイページ ---- */
.r7-tabs {
	display: flex; gap: 6px; padding: 6px; margin-bottom: 18px;
	background: var(--r7-bg); border-radius: 999px; overflow-x: auto;
	scrollbar-width: none;
}
.r7-tabs::-webkit-scrollbar { display: none; }
.r7-tabs a {
	flex: none; padding: 9px 16px; border-radius: 999px; white-space: nowrap;
	text-decoration: none !important; color: var(--r7-mute); font-weight: 700; font-size: 14px;
	transition: background .15s, color .15s;
}
.r7-tabs a:hover { color: var(--r7-ink); }
.r7-tabs a.is-active {
	color: #fff; background: linear-gradient(135deg, var(--r7-main), var(--r7-main-2));
	box-shadow: 0 4px 12px rgba(255, 90, 95, .3);
}

.r7-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.r7-stats > div {
	position: relative; padding: 16px; border-radius: var(--r7-radius);
	color: #fff; overflow: hidden; box-shadow: var(--r7-shadow);
	background: linear-gradient(135deg, var(--r7-main), var(--r7-main-2));
}
.r7-stats > div:nth-child(2) { background: linear-gradient(135deg, #b197fc, var(--r7-grape)); }
.r7-stats > div:nth-child(3) { background: linear-gradient(135deg, #5ea8ff, var(--r7-sky)); }
.r7-stats > div::after {  /* 飾りの丸 */
	content: ""; position: absolute; right: -18px; bottom: -18px; width: 70px; height: 70px;
	border-radius: 50%; background: rgba(255, 255, 255, .18);
}
.r7-stats span { display: block; font-size: 12px; font-weight: 700; opacity: .9; }
.r7-stats strong { display: block; margin-top: 4px; font-size: 24px; font-weight: 800; }

.r7-mypage h3, .r7-mypage h4 { font-weight: 800; }
.r7-bank {
	white-space: pre-wrap; font-family: var(--r7-font); font-weight: 700; line-height: 1.8;
	background: #fff; padding: 14px 16px; border-radius: var(--r7-radius-s);
	border: 2px dashed var(--r7-line);
}

/* ---- 予想者 ---- */
.r7-predictor { text-align: center; padding: 24px 16px; background: var(--r7-bg); border-radius: var(--r7-radius); }
.r7-predictor__icon {
	width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
	border: 4px solid #fff; box-shadow: var(--r7-shadow);
}
.r7-predictor .r7-stats { text-align: left; }

.r7-plus { color: var(--r7-sub) !important; font-weight: 800; }
.r7-minus { color: var(--r7-main) !important; font-weight: 800; }

/* ---- 会員登録・ログイン・アカウント ---- */
.r7-auth, .r7-hello, .r7-referral { font-family: var(--r7-font); color: var(--r7-ink); }
.r7-auth {
	max-width: 460px; margin: 16px auto; padding: 26px 22px;
	background: #fff; border-radius: var(--r7-radius); box-shadow: var(--r7-shadow);
}
.r7-auth h3 { margin-top: 0; font-weight: 800; }
.r7-form { display: flex; flex-direction: column; gap: 14px; }
.r7-field { display: flex; flex-direction: column; gap: 6px; }
.r7-field > span { font-weight: 800; font-size: 14px; }
.r7-field em {
	font-style: normal; font-size: 11px; font-weight: 800; color: #fff;
	background: var(--r7-main); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 1px;
}
.r7-field em.is-optional { background: var(--r7-mute); }
.r7-field small { color: var(--r7-mute); font-size: 12px; }
.r7-field input,
.r7-auth #loginform input[type=text],
.r7-auth #loginform input[type=password],
.r7-copy input {
	width: 100%; font: 500 16px/1.4 var(--r7-font); color: var(--r7-ink);
	padding: 12px 14px; border: 2px solid var(--r7-line); border-radius: var(--r7-radius-s);
	background: #fcfcfe; transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
}
.r7-field input:focus, .r7-auth #loginform input:focus, .r7-copy input:focus {
	outline: none; border-color: var(--r7-main); background: #fff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--r7-main) 15%, transparent);
}
.r7-field-error { display: block; color: #c92a2a; font-size: 13px; font-weight: 700; }
.r7-field-error::before { content: "⚠️ "; }
.r7-field:has(.r7-field-error) input { border-color: #ff8787; background: #fff5f5; }
.r7-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.r7-btn--block { width: 100%; padding: 15px; font-size: 16px; }
.r7-auth__alt { text-align: center; font-size: 14px; margin: 16px 0 0; }
.r7-auth__register { margin-top: 20px; padding-top: 18px; border-top: 2px dashed var(--r7-line); text-align: center; }
.r7-auth__register p { font-weight: 800; margin: 0 0 10px; }
.r7-auth #loginform p { margin: 0 0 14px; }
.r7-auth #loginform label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.r7-auth #loginform .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.r7-auth #loginform input[type=submit] {
	width: 100%; padding: 14px; border: 0; border-radius: 999px; cursor: pointer;
	font: 800 16px/1.2 var(--r7-font); color: #fff;
	background: linear-gradient(135deg, var(--r7-main), var(--r7-main-2));
	box-shadow: 0 5px 0 color-mix(in srgb, var(--r7-main) 70%, #000);
}
.r7-fieldset { border: 2px dashed var(--r7-line); border-radius: var(--r7-radius-s); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.r7-fieldset legend { font-size: 12px; font-weight: 800; color: var(--r7-mute); padding: 0 6px; }
.r7-account { max-width: 520px; }

.r7-hello { margin: 0 0 12px; font-size: 15px; }
.r7-referral {
	margin: 18px 0; padding: 18px; border-radius: var(--r7-radius);
	background: linear-gradient(135deg, #fff4e6, #fff0f6);
}
.r7-referral h4 { margin: 0 0 6px; font-weight: 800; }
.r7-referral h4::before { content: "🎁 "; }
.r7-code {
	display: inline-block; font-size: 20px; letter-spacing: .12em; padding: 2px 12px;
	background: #fff; border-radius: 10px; color: var(--r7-main);
}
.r7-copy { display: flex; gap: 8px; }
.r7-copy input { font-size: 13px; padding: 10px 12px; }
.r7-copy .r7-btn { flex: none; padding: 10px 16px; font-size: 14px; }

/* ---- スマホ ---- */
@media (max-width: 600px) {
	.r7-cards { gap: 14px; }
	.r7-table { font-size: 13px; }
	.r7-table th, .r7-table td { padding: 8px; }
	.r7-stats { grid-template-columns: 1fr 1fr; }
	.r7-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.r7-stats strong { font-size: 20px; }
	.r7-filter { border-radius: var(--r7-radius); }
}

/* ---- 動きを減らす設定の人には動かさない ---- */
@media (prefers-reduced-motion: reduce) {
	.r7-card, .r7-btn, .r7-plan, .r7-notice { transition: none; animation: none; }
	.r7-card:hover, .r7-btn:hover { transform: none; }
}

/* =========================================================
   v0.2.2 マイページのホーム・お知らせ・的中実績・ページ送り
   ========================================================= */
.r7-home { margin: 22px 0; }
.r7-home h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 800; }
.r7-home--notices h4::before { content: "📣"; }
.r7-home--upcoming h4::before { content: "🏁"; }
.r7-home--hits h4::before { content: "🎯"; }
.r7-unread {
	display: inline-block; font-size: 11px; font-weight: 800; color: #fff; line-height: 1;
	background: var(--r7-main); border-radius: 999px; padding: 4px 8px;
}
.r7-news { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: var(--r7-radius-s); box-shadow: var(--r7-shadow); overflow: hidden; }
.r7-news li { border-bottom: 1px solid var(--r7-line); }
.r7-news li:last-child { border-bottom: 0; }
.r7-news a { display: block; padding: 12px 14px; color: var(--r7-ink); text-decoration: none; font-weight: 500; }
.r7-news a:hover { background: #fffaf5; }
.r7-news time { color: var(--r7-mute); font-size: 12px; font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.r7-news li.is-unread a { font-weight: 800; }
.r7-news li.is-unread a::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--r7-main); margin-right: 8px; vertical-align: 1px; }
.r7-notice-body { background: #fff; border-radius: var(--r7-radius); box-shadow: var(--r7-shadow); padding: 18px 20px; line-height: 1.9; }
.r7-notice-body h3 { margin: 0 0 10px; font-weight: 800; }

.r7-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0; font-family: var(--r7-font); }
.r7-pager a:not(.r7-btn), .r7-pager span {
	min-width: 36px; text-align: center; padding: 8px 10px; border-radius: 999px;
	text-decoration: none; font-weight: 700; color: var(--r7-ink); background: var(--r7-bg);
}
.r7-pager .is-current { color: #fff; background: linear-gradient(135deg, var(--r7-main), var(--r7-main-2)); }
.r7-pager .r7-btn { padding: 8px 14px; font-size: 14px; }

.r7-hit { --r7-accent: var(--r7-sub); }
.r7-hit--big { --r7-accent: var(--r7-main); }
.r7-hit--hall { --r7-accent: var(--r7-sun); background: linear-gradient(160deg, #fffbe6, #fff); }
.r7-hit__grade {
	position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; color: #fff;
	background: var(--r7-accent); border-radius: 999px; padding: 4px 10px;
}
.r7-hit--hall .r7-hit__grade { color: #6b4700; }
.r7-hit--hall .r7-hit__grade::before { content: "👑 "; }
.r7-hit__roi { margin-top: 8px; font-weight: 700; }
.r7-hit__roi strong { font-size: 22px; color: var(--r7-main); }
.r7-hit__roi small { color: var(--r7-mute); font-weight: 500; margin-left: 4px; }
.r7-hits-page { font-family: var(--r7-font); color: var(--r7-ink); }
