@charset "UTF-8";
/* =========================================================
   レスポンシブ対応（タブレット・スマートフォン）
   ・PC版（960px以上）の表示は既存CSSのまま変更しない
   ・959px以下：タブレット・スマートフォン共通
   ・768〜959px：タブレット（ヘッダーはPC版を縮小して表示）
   ・767px以下：スマートフォン（ハンバーガーメニュー）
   ========================================================= */

/* PCでは表示しない要素 */
.sp-menu-btn,
.sp-overlay,
.sp-heading,
.sp-zoom-note {
	display: none;
}
/* 原寸表示リンク：PCではリンクとして扱わない（クリックはJSで無効化） */
a.sp-zoom {
	cursor: default;
}

/* =========================================================
   959px以下（タブレット・スマートフォン共通）
   ========================================================= */
@media screen and (max-width: 959px) {

	/* ---------- 全体 ---------- */
	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}
	body {
		/* 13px（PCと同じ）を基準に、画面幅に合わせてなめらかに変化 */
		font-size: clamp(0.8125rem, 0.76rem + 0.25vw, 0.875rem);
	}
	#header-inner,
	#container,
	#footer-inner {
		width: auto;
		padding-left: clamp(16px, 3vw, 24px);
		padding-right: clamp(16px, 3vw, 24px);
	}
	#contents img {
		max-width: 100%;
		height: auto;
	}
	/* 文節単位で改行して、不自然な改行位置を防ぐ（対応ブラウザのみ） */
	#contents p,
	#contents li,
	#contents dd,
	#contents td,
	#contents th {
		word-break: auto-phrase;
	}
	/* 長い英数字のはみ出し防止（表のセルは列幅を保つため対象外） */
	#contents p,
	#contents li,
	#contents dd {
		overflow-wrap: anywhere;
	}

	/* ---------- トップページ：スライダー ---------- */
	#slider {
		height: auto !important;
		/* 画像比率（約10:3）に合わせて高さを自動調整し、間延びを防ぐ */
		aspect-ratio: 10 / 3;
		overflow: hidden;
	}
	#slider img {
		max-height: none;
		object-fit: cover;
	}
	#slider #navi,
	#navi {
		width: auto;
		max-width: 100%;
	}

	/* ---------- コンテンツ ---------- */
	#container {
		padding-top: 20px;
	}
	#contents p.intro {
		font-size: clamp(0.875rem, 0.83rem + 0.15vw, 0.9375rem);
		line-height: 1.9;
	}
	#contents p.link a {
		display: inline-block;
		padding: 8px 28px 8px 20px;
		background-position: right 12px center;
	}
	#contents p.link a:hover {
		background-position: right 12px center;
	}

	/* ---------- 表：画面からはみ出す場合は横スクロール ---------- */
	.table-scroll {
		/* 前にある回り込み（float）の横に入り込まないよう、必ずその下に置く */
		clear: both;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	/* 表の文字はPC版と同じ13pxに固定し、改行位置をPC版とそろえる */
	.table-scroll table {
		font-size: 0.8125rem;
	}

	/* ---------- 下層ページ共通：テキスト見出し（h2） ---------- */
	#info #contents h2,
	#product #contents h2:not(:has(img)),
	#contact #contents h2,
	#thanks #contents h2,
	#privacy #contents h2,
	#recruit #contents h2:not(:has(img)) {
		font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
		margin: 1.6em 0 0.8em;
	}

	/* ---------- 会社紹介（info） ---------- */
	/* 2列（会社概要／会社沿革）を縦に並べる：左の会社概要が先 */
	#info div.information,
	#info div.history {
		width: auto;
		float: none;
		margin: 0 0 30px;
	}
	#info table.deco {
		width: 100%;
		/* PC版と同じ幅を下限にして、改行位置を保ったまま横スクロール */
		min-width: 470px;
	}

	/* ---------- 農薬事業（product） ---------- */
	#product table.summary {
		width: 100%;
		/* PC版と同じ幅を下限にして、改行位置を保ったまま横スクロール */
		min-width: 960px;
	}
	/* 主設備のラインナップ：写真2枚を横並び、説明文はその下に全幅で表示 */
	#product dl.linenap {
		padding-bottom: 30px;
	}
	#product dl.linenap dd {
		height: auto;
	}
	#product dl.linenap dd ul {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		row-gap: 12px;
	}
	#product dl.linenap li {
		float: none;
		width: calc(50% - 6px);
		margin-left: 0;
	}
	#product dl.linenap li img {
		display: block;
		width: 100%;
		max-height: none;
		/* 写真の比率をそろえて、間延びせずに並べる */
		aspect-ratio: 3 / 2;
		object-fit: cover;
	}
	#product dl.linenap dd li:last-child {
		width: 100%;
		line-height: 1.8;
	}

	/* ---------- 交通アクセス（access） ---------- */
	/* Googleマップ：PC版と同じ比率（960×500）のまま画面幅に合わせて縮小 */
	#contents p.map iframe {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 960 / 500;
	}

	/* ---------- 設備紹介（2013/10/facility） ---------- */
	/* タブレットはPC版と同じ3列（粉剤・水和剤・WSB）。写真は列幅に合わせて縮小 */
	#product #contents dl.prcs {
		width: calc((100% - 30px) / 3);
		padding: 0;
	}
	#product #contents dl.suiwa {
		margin: 0 15px;
	}
	#product #contents dl.prcs dt img {
		display: block;
		width: 100%;
	}
	#product #contents table.quality {
		/* PC版と同じ幅を下限にして、改行位置を保ったまま横スクロール */
		min-width: 787px;
	}

	/* ---------- 長崎県・川棚町の紹介（trip） ---------- */
	/* タブレットはPC版と同じ2列。写真は列幅に合わせて縮小 */
	#contents .tripLink {
		margin-bottom: 60px;
	}
	#contents .tripLink p.photo img {
		display: block;
		width: 100%;
	}
	#contents .tripLink dl dt {
		font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem);
	}

	/* ---------- お問い合わせ（contact） ---------- */
	/* 入力欄（左）→ 本文欄（右）→ 送信ボタンの順に縦に並べる */
	#contact p.txt {
		margin-bottom: 16px;
	}
	#mail-form {
		width: auto;
		height: auto;
	}
	#mail-form div.clm01 {
		float: none;
		margin: 0;
	}
	#mail-form div.clm01 dl {
		height: auto;
		margin-bottom: 14px;
	}
	#mail-form div.clm01 dt {
		float: none;
		margin: 0 0 4px;
		line-height: 1.6;
	}
	#mail-form div.clm01 dd {
		float: none;
	}
	#mail-form div.clm01 input[type="text"],
	#mail-form div.clm02 textarea {
		width: 100% !important;
		box-sizing: border-box;
	}
	#mail-form div.clm02 {
		margin: 0;
	}
	#mail-form div.clm02 textarea {
		height: 260px !important;
	}
	#mail-form p.submit {
		position: static;
		margin: 20px 0 0;
		text-align: center;
	}

	/* ---------- 採用情報（recruit） ---------- */
	/* ※現在、採用情報は非公開（HTML側でコメントアウト中） */
	#recruit table {
		/* PC版と同じ幅を下限にして、改行位置を保ったまま横スクロール */
		width: 600px;
	}

	/* ---------- フッター ---------- */
	#footer-inner p.anc {
		height: auto;
		right: clamp(16px, 3vw, 24px);
	}
	#footer-inner p.cp {
		padding: 30px 0;
	}
}

/* =========================================================
   768〜959px（タブレット）
   ヘッダーはPC版と同じレイアウトのまま、画面幅に合わせて縮小
   --u：PC版の1px に相当する長さ（960px → 画面の内側幅）
   ========================================================= */
@media screen and (min-width: 768px) and (max-width: 959px) {

	body {
		--u: calc((100vw - 40px) / 960);
		/* ヘッダー背景の帯（150px）も同じ比率で縮小 */
		background-size: auto calc(150 * var(--u));
	}
	#header-inner {
		height: calc(150 * var(--u));
		padding-left: 20px;
		padding-right: 20px;
	}
	#header h1 {
		top: calc(20 * var(--u));
	}
	#header h1 img {
		width: calc(510 * var(--u));
		height: auto;
	}
	#header ul.hnav {
		top: calc(10 * var(--u));
		right: 20px;
		font-size: max(11px, calc(13 * var(--u)));
	}
	#header ul.hnav li {
		margin-left: calc(10 * var(--u));
		padding-left: calc(10 * var(--u));
	}
	#header p.tel {
		top: calc(40 * var(--u));
		right: 20px;
	}
	#header p.tel img {
		width: calc(251 * var(--u));
		height: auto;
	}
	#header #gnav li a {
		height: calc(70 * var(--u));
		/* ボタン画像（通常／ホバーの2段）を高さに合わせて縮小 */
		background-size: 100% auto;
	}
	#header #gnav li.g01 a { width: calc(110 * var(--u)); }
	#header #gnav li.g02 a { width: calc(140 * var(--u)); }
	#header #gnav li.g03 a { width: calc(190 * var(--u)); }
	#header #gnav li.g04 a { width: calc(180 * var(--u)); }
	#header #gnav li.g05 a { width: calc(180 * var(--u)); }
	#header #gnav li.g06 a { width: calc(240 * var(--u)); }
	#header #gnav li a:hover {
		background-position: 0 100%;
	}
	/* 旧デザインのナビ画像（幅が異なる）を使うページ：送信完了・求人詳細（body.nav-old） */
	.nav-old #header #gnav li.g01 a { width: calc(130 * var(--u)); }
	.nav-old #header #gnav li.g02 a { width: calc(260 * var(--u)); }
	.nav-old #header #gnav li.g03 a { width: calc(210 * var(--u)); }
	.nav-old #header #gnav li.g04 a { width: calc(180 * var(--u)); }
	.nav-old #header #gnav li.g05 a { width: calc(180 * var(--u)); }
	/* 採用情報ボタン（採用情報ページのみ表示） */
	#header p.recruit {
		top: calc(10 * var(--u));
		right: calc(20px + 280 * var(--u));
		width: calc(130 * var(--u));
		height: calc(50 * var(--u));
	}
	#header p.recruit a {
		line-height: calc(52 * var(--u));
		font-size: max(11px, calc(13 * var(--u)));
	}
}

/* =========================================================
   767px以下（スマートフォン）
   ========================================================= */
@media screen and (max-width: 767px) {

	body {
		background: #fff;
	}
	body.is-menu-open {
		overflow: hidden;
	}

	/* ---------- ヘッダー ---------- */
	#header {
		margin-bottom: 0;
		border-bottom: 4px solid #fbf6ed;
	}
	#header-inner {
		height: clamp(56px, 8vw, 72px);
	}
	#header h1 {
		top: 50%;
		left: clamp(16px, 3vw, 24px);
		-webkit-transform: translateY(-50%);
		transform: translateY(-50%);
		line-height: 0;
	}
	#header h1 img {
		/* ロゴ：ボタン分の余白を残して縮小 */
		width: min(510px, calc(100vw - 100px));
		height: auto;
	}

	/* ---------- ハンバーガーボタン ---------- */
	.sp-menu-btn {
		display: block;
		position: absolute;
		top: 50%;
		right: clamp(8px, 2vw, 16px);
		z-index: 1002;
		width: 48px;
		height: 48px;
		margin-top: -24px;
		padding: 0;
		border: none;
		background: transparent;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.sp-menu-btn span {
		display: block;
		position: absolute;
		left: 12px;
		width: 24px;
		height: 2px;
		background: #346585;
		border-radius: 1px;
		transition: transform 0.3s, opacity 0.3s, top 0.3s;
	}
	.sp-menu-btn span:nth-child(1) { top: 16px; }
	.sp-menu-btn span:nth-child(2) { top: 23px; }
	.sp-menu-btn span:nth-child(3) { top: 30px; }
	.is-menu-open .sp-menu-btn span:nth-child(1) {
		top: 23px;
		transform: rotate(45deg);
	}
	.is-menu-open .sp-menu-btn span:nth-child(2) {
		opacity: 0;
	}
	.is-menu-open .sp-menu-btn span:nth-child(3) {
		top: 23px;
		transform: rotate(-45deg);
	}
	.sp-menu-btn:focus-visible {
		outline: 2px solid #069;
		outline-offset: 2px;
	}

	/* ---------- スライドメニュー ---------- */
	.sp-drawer {
		position: fixed;
		top: 0;
		right: 0;
		z-index: 1001;
		width: min(300px, 85vw);
		height: 100vh;
		height: 100dvh;
		padding: 72px 0 24px;
		box-sizing: border-box;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: #fbf6ed;
		box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
		display: flex;
		flex-direction: column;
		-webkit-transform: translateX(100%);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.35s ease, visibility 0s linear 0.35s;
	}
	.is-menu-open .sp-drawer {
		-webkit-transform: translateX(0);
		transform: translateX(0);
		visibility: visible;
		transition: transform 0.35s ease, visibility 0s linear 0s;
	}
	/* メニュー内では絶対配置を解除して縦に並べる */
	#header .sp-drawer #gnav,
	#header .sp-drawer ul.hnav,
	#header .sp-drawer p.tel {
		position: static;
	}
	#header .sp-drawer #gnav {
		order: 1;
		border-top: 1px dotted #c9c0ad;
	}
	#header .sp-drawer #gnav li {
		float: none;
		border-bottom: 1px dotted #c9c0ad;
		padding-left: 16px;
	}
	#header .sp-drawer #gnav li a {
		max-width: 100%;
	}
	#header .sp-drawer ul.hnav {
		order: 2;
		padding: 20px 16px 0;
	}
	#header .sp-drawer ul.hnav li {
		float: none;
		margin: 0;
		padding: 0;
		background: none;
	}
	#header .sp-drawer ul.hnav li a {
		display: block;
		padding: 10px 4px;
		line-height: 1.5;
	}
	#header .sp-drawer p.tel {
		order: 3;
		padding: 16px 20px 0;
	}
	#header .sp-drawer p.tel img {
		max-width: 100%;
		height: auto;
	}
	/* 採用情報ボタン（採用情報ページのみ）：メニューの一番上に表示 */
	#header .sp-drawer p.recruit {
		position: static;
		order: 0;
		display: block;
		width: auto;
		height: auto;
		margin: 0 16px 16px;
	}
	#header .sp-drawer p.recruit a {
		display: block;
		line-height: 48px;
	}

	/* 背景の半透明カバー */
	.sp-overlay {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1000;
		background: rgba(0, 0, 0, 0.4);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.35s, visibility 0s linear 0.35s;
	}
	.is-menu-open .sp-overlay {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.35s, visibility 0s linear 0s;
	}

	/* ---------- 見出し：縦書き画像を横書きテキストに切り替え（タブレットはPCと同じ縦書き） ---------- */
	#contents h2.hl-img {
		width: auto;
		float: none;
		margin: 10px 10px 26px; /* 突き出した罫線の分の余白 */
		text-align: center;
	}
	#contents h2.hl-img img {
		display: none;
	}
	#contents h2 .sp-heading {
		display: block;
		position: relative;
		padding: 0.6em 0.8em;
		font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
		font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
		font-weight: normal;
		letter-spacing: 0.2em;
		text-indent: 0.2em; /* 字間の分を補正して中央に見せる */
		line-height: 1.4;
		color: #555;
	}
	/* PC版の画像に合わせ、罫線を角で10pxずつ突き出してクロスさせる */
	#contents h2 .sp-heading::before,
	#contents h2 .sp-heading::after {
		content: "";
		position: absolute;
		pointer-events: none;
	}
	#contents h2 .sp-heading::before {
		/* 上下の横線 */
		top: 0;
		bottom: 0;
		left: -10px;
		right: -10px;
		border-top: 1px dotted #b9b9b9;
		border-bottom: 1px dotted #b9b9b9;
	}
	#contents h2 .sp-heading::after {
		/* 左右の縦線 */
		top: -10px;
		bottom: -10px;
		left: 0;
		right: 0;
		border-left: 1px dotted #b9b9b9;
		border-right: 1px dotted #b9b9b9;
	}
	#contents p.intro {
		padding: 0 0 20px;
	}

	/* ---------- 交通アクセス（access） ---------- */
	#contents ol li {
		margin-left: 2em;
	}
	/* 入れ子の説明文の左右余白を詰めて、1行の文字数を確保 */
	#contents dl dd dl dd {
		padding: 10px 0;
	}
	/* 住所・電話番号：区切りごとに改行して、途中で折り返さない */
	/* （交通アクセス・プライバシーポリシー共通） */
	#contents .acs-item {
		display: block;
	}
	#contents .acs-sep,
	#contents .acs-item + br {
		/* 区切り文字と、項目のあとの改行（空行になるため）を非表示 */
		display: none;
	}
	#contents p.map iframe {
		/* 地図が小さくなりすぎないよう高さの下限を設定 */
		min-height: 300px;
	}

	/* ---------- 設備紹介（2013/10/facility） ---------- */
	/* 3列を縦に並べる：左（粉剤）→ 中（水和剤）→ 右（WSB）の順 */
	#product #contents dl.prcs {
		width: auto;
		float: none;
		margin: 0 0 24px;
	}

	/* ---------- 長崎県・川棚町の紹介（trip） ---------- */
	/* 2列を縦に並べる：左（ながさき旅ネット）が先 */
	#contents .tripLink {
		width: auto;
		float: none;
		margin: 0 0 40px;
	}

	/* ---------- お問い合わせ（contact） ---------- */
	/* 入力時にiPhoneで画面が拡大されないよう16px以上にする */
	#mail-form div.clm01 input[type="text"],
	#mail-form div.clm02 textarea {
		font-size: 16px;
	}

	/* ---------- 画像の原寸表示（工場配置図など） ---------- */
	a.sp-zoom {
		display: block;
		cursor: zoom-in;
	}
	#contents p.sp-zoom-note {
		display: block;
		margin-top: 6px;
		font-size: 0.85em;
		color: #666;
		text-align: right;
	}
	#contents p.sp-zoom-note::before {
		content: "\1F50D\FE0E";
		margin-right: 4px;
	}
	.sp-zoom-modal {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 2000;
		background: rgba(0, 0, 0, 0.85);
	}
	.sp-zoom-modal .sp-zoom-scroll {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		padding: 60px 16px 16px;
		box-sizing: border-box;
	}
	.sp-zoom-modal .sp-zoom-scroll img {
		/* 原寸（画像本来のサイズ）で表示し、縦横にスクロール */
		display: block;
		max-width: none;
		width: auto;
		height: auto;
		background: #fff;
	}
	.sp-zoom-modal .sp-zoom-close {
		position: absolute;
		top: 8px;
		right: 8px;
		z-index: 1;
		width: 44px;
		height: 44px;
		padding: 0;
		border: none;
		border-radius: 50%;
		background: #fff;
		color: #333;
		font-size: 24px;
		line-height: 44px;
		cursor: pointer;
	}
	body.is-zoom-open {
		overflow: hidden;
	}

	/* ---------- フッター ---------- */
	#footer-inner p.anc {
		top: -36px;
	}
	#footer-inner p.anc img {
		width: 100px;
		height: auto;
	}
	#container {
		padding-bottom: 50px;
	}
}
