/* ============================
   スマホ用スタイル（767px以下）
   ============================ */

/* ============================
   ヘッダー
   ============================ */
#head_wrap .inner {
	padding: 0 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

#mobile-head {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-width: 0;
}

#mobile-head h1 {
	font-size: 1.1rem;
}

#mobile-head h1 a {
	gap: 6px;
}

#mobile-head h1 .site-logo {
	height: 26px;
}

/* ハンバーガーメニューは使用しない */
#nav-toggle {
	display: none;
}

/* グローバルナビはカレンダーアイコンのみ右上に表示 */
#global-nav {
	display: block;
	flex: 0 0 auto;
}

#global-nav ul {
	display: flex;
	list-style: none;
	align-items: center;
	padding: 0;
}

#global-nav ul li {
	border-bottom: none;
	padding: 0;
}

/* ============================
   コンテンツエリア
   ============================ */
#content {
	padding-top: 60px;
}

#main {
	padding: 15px 8px;
}

/* ============================
   ページタイトル
   ============================ */
.page-title {
	font-size: 1.4rem;
	margin: 20px 0 25px;
	padding-bottom: 10px;
}

/* ============================
   アコーディオン
   ============================ */
.accordion-wrap {
	max-width: 100%;
}

.accordion-header {
	padding: 14px 8px;
}

.accordion-header .keibajyo-name {
	font-size: 1rem;
}

.accordion-header .keibajyo-en {
	font-size: 0.75rem;
	margin-left: 6px;
}

.accordion-icon .material-symbols-outlined {
	font-size: 1.5rem;
}

/* ============================
   レースリスト
   ============================ */
.race-list {
	padding: 8px 6px;
}

.race-item {
	padding: 12px 0;
}

.race-item-header {
	gap: 8px;
}

.race-no {
	padding: 2px 8px;
	font-size: 0.8rem;
	min-width: 35px;
}

.race-time {
	font-size: 0.9rem;
}

.race-name {
	font-size: 0.85rem;
	flex: 1 1 100%;
	order: 3;
	margin-top: 4px;
}

.race-status {
	margin-left: auto;
	order: 2;
}

.status-badge {
	padding: 3px 10px;
	font-size: 0.75rem;
}

.race-item-body {
	margin-top: 8px;
	padding: 8px;
}

.race-detail-link {
	gap: 6px;
}

.bamei-highlight {
	font-size: 0.9rem;
	padding: 2px 6px;
}

.bamei-normal {
	font-size: 0.85rem;
	padding: 1px 4px;
}

/* ============================
   結果アイコン
   ============================ */
.result-icon {
	width: 20px;
	height: 20px;
	border-width: 2px;
}

/* ============================
   アイコン凡例
   ============================ */
.icon-legend {
	margin: 25px auto;
	padding: 15px;
}

.icon-legend-title {
	font-size: 1rem;
	margin-bottom: 12px;
	padding-bottom: 8px;
}

.icon-legend-list {
	grid-template-columns: 1fr;
	gap: 10px;
}

.icon-legend-list li {
	font-size: 0.85rem;
}

.icon-legend-list .result-icon {
	width: 18px;
	height: 18px;
}

/* ============================
   予想詳細ページ
   ============================ */
.article-detail {
	padding: 10px;
}

.article-h1 {
	font-size: 1.2rem;
	margin: 15px 0 20px;
}

.article-detail-content {
	padding: 15px;
}

.race-info {
	padding: 12px;
	font-size: 0.9rem;
}

.race-title {
	font-size: 1.05rem;
	margin: 15px 0;
	padding-bottom: 8px;
}

/* ============================
   結果バッジ（金銀銅）
   ============================ */
.medal-icon {
	width: 32px;
	height: 32px;
	top: -5px;
}

/* ============================
   馬カード
   ============================ */
.yosou-horses {
	gap: 10px;
	margin: 15px 0;
}

.horse-card {
	padding: 12px;
}

.horse-card-header {
	gap: 8px;
	margin-bottom: 8px;
}

.horse-rank {
	font-size: 1.15rem;
}

.horse-wakuban {
	padding: 2px 6px;
	font-size: 0.75rem;
}

.horse-umaban {
	font-size: 0.9rem;
}

.horse-bamei {
	font-size: 1rem;
}

.horse-info {
	gap: 6px 10px;
	font-size: 0.8rem;
}

/* 騎手・厩舎は1行ずつ、人気・着順は同じ行に表示 */
.horse-info li:nth-child(1),
.horse-info li:nth-child(2) {
	flex: 1 1 100%;
}

/* ============================
   アプリ誘導
   ============================ */
.app-guide {
	margin: 20px 0;
	padding: 15px;
}

.app-guide p {
	font-size: 0.85rem;
}

/* ============================
   公開日時
   ============================ */
.open-time {
	margin-top: 20px;
	padding-top: 12px;
	font-size: 0.8rem;
}

/* ============================
   フッター
   ============================ */
footer {
	padding: 20px 8px;
}

.app-store-banner {
	padding: 12px 7px;
	margin-bottom: 20px;
	gap: 8px;
}

.app-store-banner-btn {
	font-size: 0.78rem;
	padding: 6px 10px;
}

.foot-menu {
	gap: 10px;
	margin-bottom: 15px;
}

.foot-menu li a {
	font-size: 0.8rem;
	padding: 4px 8px;
}

#copy {
	font-size: 0.75rem;
}

/* ============================
   ページトップ
   ============================ */
#page_top {
	width: 40px;
	height: 40px;
	bottom: 15px;
	right: 15px;
}

#page_top a::before {
	font-size: 1.2rem;
}

/* ============================
   パンくず
   ============================ */
.breadcrumb {
	padding: 10px 8px;
	font-size: 0.8rem;
}

.breadcrumb ul {
	flex-wrap: wrap;
}

/* ============================
   ページネーション
   ============================ */
.pagination {
	gap: 3px;
	margin: 20px 0;
}

.pagination a,
.pagination .current {
	padding: 6px 10px;
	font-size: 0.85rem;
}

/* ============================
   404ページ
   ============================ */
.error-page {
	padding: 40px 8px;
}

.error-page h1 {
	font-size: 1.5rem;
}

/* ============================
   カレンダー（メニュー）
   ============================ */
.calendar-menu-item {
	position: static;
}

/* 右上にカレンダーアイコンのみ表示 */
.calendar-toggle {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 6px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s;
	line-height: 1;
}

.calendar-toggle:hover {
	background: rgba(255,255,255,0.15);
}

.calendar-toggle .material-symbols-outlined {
	font-size: 1.8rem;
}

/* スマホではラベル文字は非表示（アイコンのみ） */
.calendar-toggle-label {
	display: none;
}

/* カレンダーは画面いっぱいに大きく表示 */
.calendar-dropdown {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0,0,0,0.6);
	z-index: 2000;
	display: none;
	overflow-y: auto;
	padding: 70px 8px 20px;
}

.calendar-dropdown.open {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

/* カレンダーパネル */
.calendar-panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	background: #fff;
	border-radius: 12px;
	padding: 15px 8px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.3);
	z-index: 1;
}

/* 閉じるボタン（パネル右上に絶対配置） */
.calendar-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
	width: 38px;
	height: 38px;
	border: none;
	border-radius: 50%;
	background: #e8f5ee;
	color: #1a5f3f;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
}

.calendar-close .material-symbols-outlined {
	font-size: 1.4rem;
}

.calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	padding: 0 40px 0 0;
}

.calendar-nav {
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
	color: #1a5f3f;
	padding: 4px 14px;
	border-radius: 4px;
	line-height: 1;
}

.calendar-nav:hover {
	background: #e8f5ee;
}

.calendar-month-year {
	font-size: 1.2rem;
	font-weight: bold;
	color: #1a5f3f;
}

.calendar-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

.calendar-table th {
	font-size: 0.9rem;
	color: #999;
	padding: 10px 0;
	text-align: center;
	font-weight: normal;
}

.calendar-table th.sun { color: #e53935; }
.calendar-table th.mon { color: #333; }
.calendar-table th.tue { color: #333; }
.calendar-table th.wed { color: #333; }
.calendar-table th.thu { color: #333; }
.calendar-table th.fri { color: #333; }
.calendar-table th.sat { color: #1e88e5; }

.calendar-day {
	height: 52px;
	text-align: center;
	padding: 6px 0;
	cursor: default;
	border-radius: 6px;
	transition: background 0.2s;
	font-size: 1rem;
	vertical-align: middle;
}

.calendar-day.other-month {
	color: #ccc;
}

.calendar-day.has-data {
	background: #e8f5ee;
	font-weight: bold;
	cursor: pointer;
	color: #1a5f3f;
}

.calendar-day.has-data:hover {
	background: #d0f0e0;
}

.calendar-day.today {
	border: 1px solid #1a5f3f;
	color: #1a5f3f;
}

.calendar-day.disabled {
	color: #ccc;
	cursor: not-allowed;
}

/* ============================
   固定ページ（プライバシーポリシー / 利用規約）
   ============================ */
.static-page-section {
	padding: 20px 8px 60px;
}

.static-page-content {
	padding: 25px 10px;
	font-size: 0.9rem;
	line-height: 1.8;
}

.static-page-content h2 {
	font-size: 1.05rem;
	margin: 1.6em 0 0.6em;
	padding-bottom: 0.3em;
}

.static-page-content ul {
	margin: 0.6em 0 0.6em 1em;
}

.static-page-date {
	font-size: 0.85rem;
	margin-top: 2em !important;
}