/* ============================
   スマホ用スタイル（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: 10px 4px;
}

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

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

.accordion-header {
	padding: 12px 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: 6px 4px;
}

.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: 6px;
	padding: 6px;
}

.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: 4px 4px 30px;
}

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

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

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

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

/* ============================
   結果バッジ（金銀銅）
   ============================ */
.medal-icon {
	width: 28px;
	height: 28px;
	top: -4px;
	right: 0;
	border-width: 2px;
}

.medal-icon::after {
	width: 20px;
	height: 20px;
}

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

.horse-card {
	padding: 10px 8px;
}

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

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

.horse-wakuban {
	padding: 2px 5px;
	font-size: 0.72rem;
	white-space: nowrap;
	flex-shrink: 0;
	min-width: 2.2em;
	text-align: center;
}

.horse-umaban {
	font-size: 0.85rem;
	white-space: nowrap;
	flex-shrink: 0;
}

.horse-bamei {
	font-size: 1rem;
	padding-right: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.horse-info {
	gap: 4px 8px;
	font-size: 0.8rem;
}

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

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

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

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

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

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

.support-banner-label {
	white-space: normal;
	line-height: 1.5;
}

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

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

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

.foot-nav {
	gap: 12px;
	margin-bottom: 15px;
}

.foot-section {
	padding: 12px 10px;
	border-radius: 8px;
}

.foot-section-title {
	font-size: 0.75rem;
	margin-bottom: 8px;
	padding-bottom: 6px;
}

.foot-section-links {
	flex-direction: column;
	gap: 2px;
}

.foot-section-links a {
	font-size: 0.82rem;
	padding: 8px 6px 8px 0;
	white-space: normal;
	word-break: keep-all;
	overflow-wrap: break-word;
}

.foot-small-links {
	gap: 12px;
}

.foot-small-links a {
	font-size: 0.72rem;
}

#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: 8px 4px;
	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 4px 60px;
}

.ocr-hero { padding: 72px 20px 58px; background: #f5f6f1; }.ocr-hero-layout { display: block; }.ocr-app-icon { display: block; width: 128px; margin: 32px auto 0; }
.ocr-hero .page-title { font-size: 2.8rem; }
.ocr-lead { font-size: .9rem; }
.ocr-download-link { gap: 16px; margin-top: 20px; }
.ocr-hero-meta { display: block; font-size: .7rem; }.ocr-hero-meta span { display: inline-block; margin: 5px 4px 0 0; }
.ocr-toc { display: block; padding: 0 20px; }.ocr-toc a { display: block; padding: 15px 18px; border-right: 0; border-bottom: 1px solid #e3e0d8; }.ocr-toc a:first-child { border-left: 4px solid #1a6b4b; }
.ocr-section { padding: 64px 20px; }.ocr-section .section-heading { margin-bottom: 28px; }.ocr-section h2 { font-size: 2rem; }
.ocr-feature-grid, .ocr-steps, .ocr-api-list, .ocr-faq-list { grid-template-columns: 1fr; gap: 10px; }.ocr-feature-card, .ocr-step, .ocr-api-card { padding: 20px; }
.ocr-engine-row { grid-template-columns: 1fr; gap: 5px; padding: 15px; }.ocr-engine-head { display: none; }.ocr-api-card ol { min-height: 0; }

/* portfolio landing page */
#head_wrap .inner { padding: 12px 16px; }
#mobile-head h1 { font-size: .88rem; }
.brand-mark { width: 26px; height: 26px; margin-right: 6px; }
.site-brand-logo { width: 136px; }
#global-nav ul { gap: 0; }
#global-nav ul li a { padding: 6px 5px; font-size: .58rem; }
#global-nav ul li a.nav-contact { padding: 6px 8px; }
#content { padding-top: 54px; }
.portfolio-hero, .portfolio-section { display: block; padding: 72px 20px; }
.portfolio-hero { min-height: auto; }
.hero-copy h1 { font-size: clamp(2rem, 8.5vw, 2.7rem); }
.hero-lead { font-size: .9rem; }
.hero-visual { margin-top: 48px; max-height: none; }
.section-heading { margin-bottom: 28px; }
.profile-copy, .section-intro { font-size: .9rem; }
.work-grid, .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.work-card { display: block; }
.card-placeholder { aspect-ratio: 1 / 1; }
.work-card-body { padding: 12px; }
.work-card h3 { font-size: .95rem; font-weight: normal; margin-bottom: 8px; padding-bottom: 3px; }
.work-card-body > p:not(.card-label) { min-height: calc(1.6em * 3); font-size: .78rem; line-height: 1.6; }
.card-label { font-size: .47rem; letter-spacing: .1em; }
.image-hover-label { font-size: .72rem; }
.site-link-banner { margin-top: 12px; padding: 9px 10px; font-size: .68rem; }
.app-store-link { min-height: 42px; padding: 6px 8px; gap: 7px; }
.app-store-link i { font-size: 1.1rem; }
.app-store-link span { font-size: .72rem; }
.app-store-link small { font-size: .4rem; }
.portfolio-section:has(.partner-grid) .section-heading, .portfolio-section:has(.partner-grid) .section-intro { display: block; margin-right: 0; }
.portfolio-section:has(.partner-grid) .section-intro { margin: 0 0 28px; }
.contact-layout { display: block; }
.auth-form { margin-top: 42px; }
.portfolio-footer { display: block; padding: 32px 20px; }
.portfolio-footer nav { margin: 24px 0 12px; }
.portfolio-footer #copy { margin-left: 0; }

/* 画像透過ツール */
.tool-page { padding: 64px 20px 80px; }
.tool-heading { margin-bottom: 30px; }
.tool-heading h1 { font-size: 2.25rem; }
.tool-heading p:last-child { font-size: .9rem; }
.touka-tool { padding: 16px; }
.touka-upload { width: 100%; justify-content: center; }
.touka-control-row { grid-template-columns: 1fr; gap: 20px; }
.touka-controls { padding: 16px; }
.touka-canvas-wrap { min-height: 200px; padding: 10px; }
.touka-actions { justify-content: stretch; }
.touka-download { width: 100%; justify-content: center; }
.svg-tool { padding: 16px; }
.svg-preview { min-height: 200px; padding: 10px; }
.svg-file-info { text-align: left; }
.svg-result-heading { align-items: start; flex-direction: column; gap: 14px; }
.svg-copy-button { width: 100%; }
.svg-source { min-height: 220px; font-size: .68rem; }
.svg-actions { justify-content: stretch; }
.svg-actions .portfolio-button { width: 100%; justify-content: center; }
.svg-guide { margin-top: 52px; }
.icons-tool { padding: 16px; }
.icons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.icon-output-card { padding: 8px; }
.icon-output-preview { min-height: 100px; padding: 8px; }
.icon-output-preview canvas { max-height: 100px; }
.icons-actions { justify-content: stretch; }
.icons-actions .portfolio-button { width: 100%; justify-content: center; }
.resize-tool { padding: 16px; }
.resize-controls { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.resize-lock { grid-column: 1 / -1; padding-bottom: 0; }
.resize-quality-field { grid-column: 1 / -1; }
.resize-preview-wrap { min-height: 200px; padding: 10px; }
.resize-result { display: block; }
.resize-result .portfolio-button { width: 100%; justify-content: center; margin-top: 14px; }
.convert-tool { padding: 16px; }
.convert-controls { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
.convert-preview-wrap { min-height: 200px; padding: 10px; }
.convert-result { display: block; }
.convert-result .portfolio-button { width: 100%; justify-content: center; margin-top: 14px; }
.color-tool { padding: 16px; }
.color-workspace { grid-template-columns: 1fr; gap: 16px; }
.color-canvas-wrap { min-height: 200px; padding: 10px; }
.color-result { padding: 16px; }
.qr-tool { display: block; padding: 16px; }
.qr-options { grid-template-columns: auto 1fr auto 1fr; }
.qr-options label:nth-of-type(3) { grid-column: 1; }
.qr-generate { width: 100%; justify-content: center; }
.qr-result { margin-top: 28px; }
.qr-preview { min-height: 220px; }
.favicon-tool, .crop-tool, .meta-tool, .dummy-tool, .json-tool { padding: 16px; }
.favicon-preview-grid { gap: 10px; padding: 14px; justify-content: space-between; }
.favicon-preview-item canvas { max-width: 60px; max-height: 60px; }
.meta-tool, .dummy-tool { display: block; }
.meta-output, .dummy-preview { margin-top: 28px; }
.dummy-form .portfolio-button { width: 100%; justify-content: center; }
.crop-preview-wrap, .dummy-preview { min-height: 200px; padding: 10px; }
.crop-actions .portfolio-button { width: 100%; justify-content: center; }
.json-actions { flex-wrap: wrap; }
.json-actions .svg-copy-button { flex: 1; min-width: 90px; }
.css-tool { padding: 16px; }
.css-options { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
.css-options label { justify-content: space-between; }
.css-editors { grid-template-columns: 1fr; gap: 12px; }
.css-editor { min-height: 240px; }
.css-actions { justify-content: stretch; }
.css-actions .svg-copy-button { flex: 1; }
.javascript-tool { padding: 16px; }
.javascript-options { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
.javascript-options label { justify-content: space-between; }
.javascript-editors { grid-template-columns: 1fr; gap: 12px; }
.javascript-editor { min-height: 240px; }
.javascript-actions { justify-content: stretch; }
.javascript-actions .svg-copy-button { flex: 1; }
.utility-tool { padding: 16px; }.utility-controls, .password-options { align-items: stretch; flex-direction: column; padding: 14px; }.utility-controls label, .password-options label { justify-content: space-between; }.utility-controls .svg-copy-button { width: 100%; }.utility-editors, .utility-form-grid { grid-template-columns: 1fr; gap: 12px; }.utility-tool textarea { min-height: 220px; }.palette-tool { grid-template-columns: 1fr; align-items: start; }.palette-tool .svg-copy-button { width: 100%; }.sample-grid, .javascript-sample-grid { grid-template-columns: 1fr; }.sample-card { padding: 16px; }.javascript-sample { padding: 16px; }.javascript-sample > div { align-items: center; }.javascript-sample .svg-copy-button { width: auto; }
.font-tool { padding: 16px; }
.font-preview-area { padding: 16px; }
.font-preview-text { font-size: 1.5rem; }
.font-result-heading { align-items: start; gap: 10px; }
.font-result-heading .svg-copy-button { width: auto; }
.font-result .portfolio-button { width: 100%; justify-content: center; }
.ogp-tool { display: block; padding: 16px; }
.ogp-form-row { justify-content: space-between; }
.ogp-generate { width: 100%; justify-content: center; }
.ogp-preview-wrap { margin-top: 28px; }
.ogp-preview-wrap p { text-align: left; }
.touka-guide { margin-top: 52px; }
.tool-guide { padding: 0 20px 64px; }.tool-guide .touka-guide-heading { margin-bottom: 28px; }
.touka-guide-heading h2 { font-size: 2rem; }
.touka-guide-grid { grid-template-columns: 1fr; gap: 10px; }
.touka-guide-card { padding: 18px; }
.touka-notes { padding: 18px; }

.static-page-content {
	padding: 20px 8px;
	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;
}

.contact-card { padding: 24px 12px; }
.contact-page .page-title { margin-bottom: 24px; }
.contact-detail-form { display: block; }
.contact-form > p { margin-bottom: 16px; }
.contact-form input.text, .contact-form textarea.text, .contact-form select.text { min-height: 44px; }
.contact-policy-title { margin-top: 28px !important; }
.contact-result { padding: 24px 16px; }
.contact-form .submit-btn { width: 100%; justify-content: center; }

/* ============================
   ホームページ インフォメーション（スマホ用）
   ============================ */
.home-info-section {
	padding: 15px 4px;
}

.home-info-section:last-child {
	padding-bottom: 60px;
}

.home-info-title {
	font-size: 1.05rem;
	margin: 0 0 0.6em;
	padding-bottom: 0.3em;
}

.home-info-links {
	margin: 0.6em 0 0 1em;
}

/* ============================
   FAQページ（スマホ用）
   ============================ */
.faq-page-content {
	padding: 16px 8px 24px;
	background: #f7f8f9;
}

.faq-page-content > p {
	margin: 0.8em 0 1.4em;
}

.faq-category-title {
	font-size: 1.1rem;
	margin: 1.6em 0 0.8em;
	padding-left: 10px;
}

.faq-section-item .accordion-header {
	padding: 15px 18px;
}

.faq-question {
	font-size: 0.95rem;
	line-height: 1.6;
	padding-right: 10px;
}

.faq-answer {
	padding: 18px 20px;
	font-size: 0.9rem;
	line-height: 1.9;
	background: #fcfdfc;
}

.faq-note {
	font-size: 0.8rem;
	padding: 12px 14px;
}

/* ============================
   的中実績ページ（スマホ用）
   ============================ */
.hitrate-content h2 {
	font-size: 1.05rem;
	margin: 1.6em 0 0.6em;
	padding-bottom: 0.3em;
}

.hitrate-table th {
	font-size: 0.85rem;
	padding: 10px 8px;
}

.hitrate-table td {
	padding: 12px 8px;
	font-size: 0.9rem;
}

.hitrate-mark {
	font-size: 1.2rem !important;
}

.hitrate-gamble-warning {
	font-size: 0.82rem;
	padding: 12px 14px;
}
