/* 旧サイトの CSS で足りないところ（新しく書く CSS は Modern Web Guidance に従う。docs/12） */

/* トップページの下のヘッダーの帯（旧サイトは div の style 属性で白にしていた） */
html:root .top-header-bottom-wrap {
	background-color: #fff;
}

/* 旧サイトが端末で出し分けていた HTML は、両方を出して画面の幅で片方だけを見せる（781px 以下がスマホ。ONEstar と同じ境目。docs/14） */
@media (min-width: 782px) {
	html:root .ms-sp {
		display: none;
	}
}
@media (max-width: 781px) {
	html:root .ms-pc {
		display: none;
	}
}

/* movie：写真を包むボタン（旧サイトは写真そのものを押していた）。ボタンの既定の見た目を消して、旧 CSS（#movietmb img など）の見た目のまま */
html:root #movietmb .ms-movie-play {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	cursor: pointer;
}
html:root #movietmb .ms-movie-play:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* 読み上げだけに出す文字（画面には出さない） */
html:root .screen-reader-text:not(:focus):not(:active) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* days：旧サイトは記事の箱（.linkbox）全体を押すと記事へ移っていた（jQuery）。新しいサイトは見出しのリンクを箱いっぱいに広げる */
html:root .tripBox .linkbox {
	position: relative;
}
html:root .tripBox .linkbox h4 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* トップの facebook：Facebook のページの埋め込み（iframe。blocks/facebook）。旧サイトは SDK が作った iframe（枠なし・幅いっぱい） */
.ms-fb-page {
	display: block;
	max-width: 100%;
	border: 0;
	overflow: hidden;
}

/* トップのスライダー（blocks/slider）。旧サイトの #slider・#carousel（flexslider）と #mob_slider の見た目を、スクロールスナップで作り直したもの。
   旧 CSS（flexslider_top.css）は JavaScript が動くまで写真を隠す（.flexslider .slides > li { display: none }）ので、ここで出す */
.ms-slider {
	position: relative;
}
html:root #slider .ms-slider-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	touch-action: manipulation;
}
html:root #slider .ms-slider-track::-webkit-scrollbar {
	display: none;
}
html:root #slider .ms-slider-track > li {
	display: block;
	flex: 0 0 100%;
	scroll-snap-align: start;
	/* 旧 CSS（.slides li { transition: 0.2s linear }）は order まで 0.2 秒かけて変えるので、端の写真の寄せ（order）がすぐに効かない。切る */
	transition: none;
}
html:root #slider .ms-slider-track img {
	width: 100%;
	height: auto;
}
.ms-slider-track:focus-visible,
.ms-slider button:focus-visible {
	outline: 3px solid #42210b;
	outline-offset: -3px;
}
.ms-slider button {
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
	touch-action: manipulation;
}

/* 小さな写真の帯（パソコンの幅だけ。旧サイトの #carousel：1 つ 198×87px） */
html:root #carousel .ms-slider-thumbs {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
html:root #carousel .ms-slider-thumbs::-webkit-scrollbar {
	display: none;
}
html:root #carousel .ms-slider-thumbs > li {
	display: block;
	flex: 0 0 198px;
	scroll-snap-align: start;
}
.ms-slider-thumb {
	display: block;
	width: 100%;
	position: relative;
}
/* 今の写真の小さな写真：明るさ（旧サイトの flex-active-slide）に加えて、下に白い線を引いて形でも分かるようにする */
.ms-slider-thumb[aria-current="true"]::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: #fff;
	box-shadow: 0 -1px 0 rgba(66, 33, 11, 0.6);
}
html:root #carousel .ms-slider-thumb img {
	width: 198px;
	height: 87px;
	object-fit: cover;
}
/* 帯の矢印（旧 CSS は a に指定しているので、button に同じ見た目を付ける。マウスを乗せたときと、キーボードで選んだときに出す） */
html:root #carousel .flex-direction-nav button {
	display: block;
	width: 38px;
	height: 87px;
	position: absolute;
	top: 0;
	z-index: 10;
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.5s ease;
	/* 横から出てくる動きは「動きを減らす」設定でないときだけ */
	@media (prefers-reduced-motion: no-preference) {
		transition: opacity 0.5s ease, left 0.5s ease, right 0.5s ease;
	}
}
html:root #carousel .flex-direction-nav .flex-prev {
	left: -20px;
	background: transparent url(../legacy/images/flex_prev.png) no-repeat;
}
html:root #carousel .flex-direction-nav .flex-next {
	right: -20px;
	background: transparent url(../legacy/images/flex_next.png) no-repeat;
}
html:root #carousel:hover .flex-direction-nav .flex-prev,
html:root #carousel .flex-direction-nav .flex-prev:focus-visible {
	opacity: 1;
	left: 0;
}
html:root #carousel:hover .flex-direction-nav .flex-next,
html:root #carousel .flex-direction-nav .flex-next:focus-visible {
	opacity: 1;
	right: 0;
}

/* 止める／動かすボタン（自動で送るので必ず出す。WCAG 2.2.2）。写真の左上に小さく */
.ms-slider-pause {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 11;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 24px;
	padding: 2px 10px !important;
	border-radius: 12px !important;
	background: rgba(66, 33, 11, 0.75) !important;
	color: #fff !important;
	font-size: 11px !important;
	line-height: 1.6;
	letter-spacing: 0.05em;
}
.ms-slider-pause::before {
	content: "";
	width: 8px;
	height: 10px;
	border-inline: 3px solid currentColor;
	box-sizing: border-box;
}
.ms-slider-pause.is-stopped::before {
	width: 0;
	height: 0;
	border-inline: 0;
	border-block: 5px solid transparent;
	border-left: 8px solid currentColor;
}

/* パソコンの幅：前へ／次へは出さない（旧サイトの #slider も矢印を隠していた。帯の写真で選ぶ）。題名は旧 CSS（.slides span）で隠れる */
.ms-slider-controls {
	display: none;
}

/* スマホの幅：旧サイトの #mob_slider（写真の下に白い題名の欄、両はしに茶色の ＜ ＞） */
@media (max-width: 781px) {
	.ms-slider {
		margin-bottom: 15px;
	}
	html:root #slider .ms-slider-track .ms-slider-title {
		display: flex;
		align-items: center;
		width: 86%;
		min-height: 5.3em;
		margin: 0 auto;
		padding: 0 4%;
		box-sizing: border-box;
		background-color: #fff;
	}
	.ms-slider-controls {
		display: block;
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 5.3em;
		z-index: 10;
		pointer-events: none;
	}
	.ms-slider-controls button {
		position: absolute;
		top: 0;
		width: 7%;
		min-width: 24px;
		height: 100%;
		text-align: center;
		color: #fff !important;
		background-color: #472611 !important;
		pointer-events: auto;
	}
	.ms-slider-prev {
		left: 0;
	}
	.ms-slider-next {
		right: 0;
	}
}
/* 旧 CSS は .flexslider の中のリンクの枠を消している（a:focus { outline: none }）。キーボードで選んだときは出す */
html:root #slider .ms-slider-track a:focus-visible {
	outline: 3px solid #42210b;
	outline-offset: -3px;
}
/* スライダーの端のループ：--current（今の写真の番号。view.js が入れる）で、端の写真だけを隣へ寄せる（Modern Web Guidance の carousel「Looping」）。
   --current が無い（JavaScript が動かない）ときは order が 0 になり、並びのまま。sibling-count() が無いブラウザーは --children-count を使う */
html:root #slider .ms-slider-track > li:first-child {
	order: clamp(0, var(--current) - (var(--children-count, sibling-count()) - 3), 1);
}
html:root #slider .ms-slider-track > li:last-child {
	order: calc(-1 * clamp(0, 2 - var(--current), 1));
}

/* ページの見出し（一覧の「days」、記事の題名など）：ONEstar は見出しの行の高さを詰めている。旧サイトは本文と同じ 1.8（font.css の body） */
html:root #contents #main h1 {
	line-height: 1.8;
}

/* 「宮古島style」の一覧（blocks/style-list）：701〜1023px では、一覧の幅 1000px の指定（style_sp_2.css・style_pc_2.css）だけが効いて右が切れる
   （701〜781px はスマホの CSS の並べ方が 700px 以下にしか無い。782〜1023px はパソコンの CSS の 4 つずつの並べ方が 768px 以下にしか無い）。
   旧サイトのパソコンの CSS の 768px 以下の並べ方（4 つずつ）を、この幅に足す */
@media (min-width: 701px) and (max-width: 1023px) {
	html:root .style_list {
		width: 100%;
		margin: 0 auto 30px;
	}
	html:root .style_list .h_style01 {
		font-size: 200%;
		margin-bottom: 2%;
		padding-bottom: 1%;
	}
	html:root .style_list:after {
		content: "";
		clear: both;
		display: block;
	}
	html:root .style_list ul {
		width: 98%;
		margin: 30px auto 0;
	}
	html:root .style_list li {
		float: left;
		width: 25%;
		padding-top: 15px !important;
	}
	html:root .style_list li a {
		display: block;
		padding: 5px;
		min-height: 190px;
		border-bottom: 1px dotted #c4af96;
	}
	html:root .style_list li a p {
		padding: 0;
		margin: 0;
	}
	html:root .style_list li img {
		display: block;
		margin: auto;
		margin-bottom: 10px !important;
	}
	html:root .style_list li span {
		display: block;
		position: relative;
		text-align: center;
		margin-bottom: 10px;
	}
	html:root .style_list li span:after {
		content: "";
		display: block;
		position: absolute;
		bottom: 0;
		left: 40%;
		width: 20%;
		border-bottom: 1px solid #5e2506;
	}
}
/* 1024〜1419px：旧 CSS は 1025px からいきなり幅 1400px にするので、1400px より狭い画面では右が切れる。この幅では 1000px（1024px 以下と同じ）にする */
@media (min-width: 1024px) and (max-width: 1419px) {
	html:root .style_list {
		width: 1000px;
	}
}

/* 記事の一覧のカード（.archive-list。トップの popular posts も同じ）：旧 CSS はリンクの枠を消し（font.css の a { outline: none }）、題名と説明をマウスを乗せたときだけ出す。
   キーボードで選んだとき（:focus-visible）も枠を出し、マウスを乗せたときと同じく題名と説明を出す */
html:root .archive-list ul li a:focus-visible {
	outline: 3px solid #42210b;
	outline-offset: 2px;
}
html:root .archive-list ul li a:focus-visible h2,
html:root .archive-list ul li a:focus-visible h4,
html:root .archive-list ul li a:focus-visible p {
	display: block;
	opacity: 1;
}
html:root .archive-list ul li a:focus-visible .mask {
	background-color: rgba(66, 33, 11, 0.5);
	height: 100%;
}

/* 記事の一覧のカード：782〜1079px は、旧 CSS（style_pc_2.css）の 3 列（1 つ 330px・全体 1020px）が画面に入りきらず右が切れる
   （common.css は 999px 以下で箱を 94% にする。1000〜1079px も箱の左右の余白の分だけ足りない）。旧 CSS の 768px 以下の 2 列の並べ方をこの幅に足す */
@media (min-width: 782px) and (max-width: 1079px) {
	/* 1000〜1079px は箱（幅 1000px＋左右 3%）が画面より広くなるので、999px 以下（common.css）と同じく 94% にする */
	html:root #contents .container {
		width: 94%;
	}
	/* 記事のページの前後の記事・関連記事・本文の箱（旧 CSS は幅 1000px）も、旧 CSS の 768px 以下と同じ幅にする（docs/15） */
	html:root .navigation.post-navigation,
	html:root .related_article {
		width: 94%;
		padding: 0 3%;
		margin: auto;
	}
	html:root .box:not(.entry-trip) {
		padding: 2em 0;
		margin: 0 auto;
		width: 96%;
	}
	html:root .archive-list ul:not(.wpp-list) {
		width: 100%;
		margin-right: -10px;
	}
	html:root .archive-list ul:not(.wpp-list) li {
		width: 49.5%;
		height: auto;
		margin-right: 0;
		float: left;
		overflow: hidden;
		margin-bottom: 0;
	}
	html:root .archive-list ul:not(.wpp-list) li:nth-child(odd) {
		margin-right: 1%;
	}
	html:root .archive-list ul:not(.wpp-list) li a:hover .mask,
	html:root .archive-list ul:not(.wpp-list) li a:focus-visible .mask {
		height: 97%;
	}
	html:root .archive-list ul:not(.wpp-list) li h2 {
		width: 100%;
		padding: 1.5% 0 1%;
		font-size: 85%;
		font-weight: 100;
		position: absolute;
		top: 0;
		text-align: center;
		display: block;
		background: rgba(66, 33, 11, 0.7);
	}
	html:root .archive-list ul:not(.wpp-list) li p {
		display: none !important;
	}
}

/* ページ送り（blocks/archive）：旧 CSS のページ送りの見た目は style_pc_2.css にしか無い。スマホの幅（781px 以下）にも同じ見た目を、少し小さくして付ける。
   入りきらないときは折り返す */
@media (max-width: 781px) {
	html:root .wp-pagenavi {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 0.5em 0.4em;
		padding: 15px 0;
	}
	html:root .wp-pagenavi .pages {
		margin-right: 0.5em;
		font-size: 1.8em;
	}
	html:root .wp-pagenavi .current,
	html:root .wp-pagenavi .page {
		display: inline-block;
		width: 1.8em;
		font-size: 1.3em;
		line-height: 1.8;
		text-align: center;
		border-radius: 50%;
	}
	html:root .wp-pagenavi .current {
		color: #f4f0e9;
		background-color: #42210b;
		border: 1px solid #42210b;
	}
	html:root .wp-pagenavi .page {
		color: #42210b;
		background-color: #f4f0e9;
		border: 1px solid #42210b;
	}
	html:root .wp-pagenavi .nextpostslink,
	html:root .wp-pagenavi .previouspostslink {
		padding: 0 0.3em 0.1em;
		font-size: 2em;
		line-height: 1;
	}
}

/* キーボードで選んだときの枠（すべてのリンク）：旧 CSS（font.css）はすべてのリンクの枠を消している（a { outline: none }）。
   キーボードで選んだとき（:focus-visible）だけ、どのリンクを選んでいるか分かる枠を出す（ページ送り・宮古島style の一覧・メニューなど） */
html:root :where(.wp-site-blocks) a:focus-visible {
	outline: 3px solid #42210b;
	outline-offset: 2px;
}
/* ページ送り（782px 以上）：旧 CSS は番号と「1 / 34」にしか余白が無く、« First・«・...・» の間が詰まる（旧サイトの HTML も空白なし）。番号と同じ 0.6em を空ける */
@media (min-width: 782px) {
	html:root .wp-pagenavi .first,
	html:root .wp-pagenavi .previouspostslink,
	html:root .wp-pagenavi .extend,
	html:root .wp-pagenavi .nextpostslink {
		margin-right: 0.6em;
		vertical-align: middle;
	}
	html:root .wp-pagenavi .previouspostslink {
		padding: 0 0.3em 0.1em;
		font-size: 2.6em;
		border-radius: 5px;
	}
	html:root .wp-pagenavi .first,
	html:root .wp-pagenavi .last {
		vertical-align: middle;
	}
}

/* 記事のページ（docs/15） */
/* 前後の記事（trip。blocks/post-nav）：旧サイトは ul.commonbtn に style="width:90%; margin:0 auto;" を書いていた */
html:root .ms-post-nav.commonbtn {
	width: 90%;
	margin-left: auto;
	margin-right: auto;
}
/* 前後の記事（days）：旧サイトの「前の投稿」「次の投稿」（span.screen-reader-text。旧 CSS で見えていた）と同じ見た目 */
html:root .nav-links a span.ms-nav-label {
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	padding: 0.5em 1em;
}
/* days の記事の上の「scroll down」の矢印（旧サイトは Font Awesome の fa-chevron-down。新しいサイトは CSS の線で描く） */
html:root .screen .scroll_down .ms-chevron {
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-top: 0.3em;
	border-right: 3px solid currentColor;
	border-bottom: 3px solid currentColor;
	transform: rotate(45deg);
}
/* 記事の下の「この記事が気に入ったら」の Facebook ページへのリンク（blocks/share-box。旧サイトの「いいね」ボタンの代わり） */
html:root .share_box .ms-fb-follow {
	padding-top: 0;
}
html:root .share_box .ms-fb-follow a {
	margin: 10px auto;
	color: #42210b;
}
/* days の記事の上の写真（section.screen）の高さ：旧サイトは JavaScript で「画面の高さの 95%」を入れていた。CSS で同じにする
   （dvh：スマホのアドレスバーが出入りしても画面からはみ出さない。対応していないブラウザーは vh。Modern Web Guidance の responsive-design） */
html:root .screen {
	height: 95vh;
	height: 95dvh;
}
/* 関連記事の見出し（blocks/related の h3）：ONEstar の見出しの書体・大きさを打ち消し、旧サイトと同じ本文の書体（12px・太字） */
html:root .related_article h3 {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.8;
	letter-spacing: inherit;
}
/* days の記事の上の写真（blocks/entry-hero の section.screen.ms-screen）：旧サイトは CSS の背景（パソコンでは画面に固定・スマホでは一緒に流れる）。
   新しいサイトは <img>（srcset）なので、写真を枠いっぱいに敷き、パソコンの幅では clip-path の枠の中で画面に固定して、同じ見え方にする。
   スマホ用の CSS（style_sp_2.css。Plugin::styles() が 781px 以下で選ぶ）と同じ切り替えの幅で、一緒に流れる見え方に戻す */
html:root .ms-screen {
	overflow: hidden;
	clip-path: inset(0);
}
html:root .ms-screen .ms-screen-img {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
html:root .ms-screen .caption,
html:root .ms-screen .scroll_down {
	z-index: 1;
}
@media (max-width: 781px) {
	html:root .ms-screen .ms-screen-img {
		position: absolute;
	}
}
/* お問い合わせ（/inquiry/。Snow Monkey Forms）：旧 CSS の reset が入力欄を content-box にするので、枠と余白の分だけ右へはみ出す。
   入力欄は余白を含めて欄の幅に収める */
html:root .inquiry .smf-form :is(input, textarea, select) {
	box-sizing: border-box;
	max-width: 100%;
}
/* 小さなヘッダー（header#smallheader。assets/js/smallheader.js）：旧サイトは jQuery の fadeIn（1 秒）・fadeOut（0.5 秒）。
   隠している間は visibility: hidden（キーボードで選べない・読み上げない）。
   旧サイトは幅 478px 以下で出さなかったが、旧 CSS の小さなヘッダーはロゴと 5 つのメニューで幅が約 660px あり、それより狭いと右（access・event）が
   画面の外に切れていた。新しいサイトは、上の大きなヘッダーの「menu」ボタンが出る幅（669px 以下。旧 common.css）では出さない（docs/15）。
   旧 CSS の幅（96.2%＋左右 2%、999px 以下では 100%・最小 700px）は左右の余白の分だけ画面より広く、横にはみ出すので、余白を含めて画面の幅にする */
html:root :where(.wp-site-blocks) header#smallheader.ms-legacy {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
html:root :where(.wp-site-blocks) header#smallheader.ms-legacy.is-shown {
	visibility: visible;
	opacity: 1;
	transition: opacity 1s ease, visibility 0s linear 0s;
}
/* 幅が狭くなったとき（窓を縮めた・文字を拡大した）は、中を選んでいたら smallheader.js が大きなヘッダーの「menu」ボタンへ移す。
   それまでの間に選んでいる所が消えないよう、中を選んでいる間は隠さない（:focus-within。外へ移ったら隠れる） */
@media (max-width: 669px) {
	html:root :where(.wp-site-blocks) header#smallheader.ms-legacy:not(:focus-within) {
		display: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	html:root :where(.wp-site-blocks) header#smallheader.ms-legacy,
	html:root :where(.wp-site-blocks) header#smallheader.ms-legacy.is-shown {
		transition: none;
	}
}
/* 上の大きなヘッダー：旧 common.css は 700px 以下でメニュー（.container）を隠すが、「menu」ボタンが出るのは 669px 以下なので、
   670〜700px ではどちらも見えず、style・days などへ行けなかった（旧サイトの誤り）。この幅ではメニューを 701px 以上と同じに出したままにする
   （701px と同じ形で画面に収まることを確かめた。docs/15） */
@media (min-width: 670px) and (max-width: 700px) {
	html:root :where(.wp-site-blocks) header#bigheader .container {
		display: table-cell;
	}
}

/* トップの見出し（スマホ）：旧 CSS は「all」ボタンの分だけ左を空けていた（padding-left: 20%）ので、ボタンの無い見出し（bus routes・
   宮古島観光デジタルマップ）が右に寄っていた。スマホでは左を空けず、「all」ボタンは見出しの右端に重ねて、文字を真ん中にする（2026-11-22 代表者） */
@media (max-width: 781px) {
	html:root .article02 .h_style01,
	html:root .article03 .info .h_style01 {
		padding-inline-start: 0;
	}
	html:root .h_style01 .all_btn {
		position: absolute;
		inset-block-start: 1em;
		inset-inline-end: 0;
		float: none;
	}
	/* 押せる広さを 44px 四方まで広げる（見た目の大きさは同じ。Modern Web Guidance の form-factor-adaptation） */
	html:root .h_style01 .all_btn::after,
	html:root .h_style01 .all_btn2::after {
		content: "";
		position: absolute;
		inset: -8px 0;
	}
}
