/*
 * ヌスラー プラグインの基本スタイル。
 * 色や角丸は下の変数で決まるので、テーマ側で上書きすれば見た目を変えられます。
 */
:root {
	--nsr-navy: #12284c;
	--nsr-orange: #e65c00;
	--nsr-orange-dark: #c94f00;
	--nsr-red: #d93a1a;
	--nsr-green: #1f8a4c;
	--nsr-text: #1c2536;
	--nsr-muted: #5b6577;
	--nsr-border: #d6dce8;
	--nsr-soft: #f3f5f9;
	--nsr-radius: 12px;
}

.nsr-icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.25em;
}

/* ボタン */
.nsr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 52px;
	padding: 0.6em 1.4em;
	border: 2px solid var(--nsr-navy);
	border-radius: var(--nsr-radius);
	background: #fff;
	color: var(--nsr-navy);
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
.nsr-btn:hover { background: var(--nsr-soft); }
.nsr-btn.-primary {
	border-color: var(--nsr-orange);
	background: var(--nsr-orange);
	color: #fff;
	font-size: 1.0625rem;
}
.nsr-btn.-primary:hover { border-color: var(--nsr-orange-dark); background: var(--nsr-orange-dark); }
.nsr-btn.-block { display: flex; width: 100%; }
.nsr-btn:focus-visible,
.nsr-card a:focus-visible {
	outline: 3px solid #2f7de1;
	outline-offset: 2px;
}

/* バッジ */
.nsr-badge {
	display: inline-block;
	padding: 0.15em 0.8em;
	border-radius: 999px;
	background: var(--nsr-red);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.6;
}
.nsr-badge.-found { background: var(--nsr-green); }

/* お知らせ枠 */
.nsr-alert {
	display: flex;
	gap: 0.75em;
	margin: 0 0 1.5rem;
	padding: 1em;
	border: 1px solid var(--nsr-border);
	border-radius: var(--nsr-radius);
	background: var(--nsr-soft);
	color: var(--nsr-text);
	font-size: 0.9375rem;
	line-height: 1.7;
}
.nsr-alert > .nsr-icon { margin-top: 0.2em; color: var(--nsr-navy); }
.nsr-alert ul { margin: 0.4em 0 0; padding-left: 1.2em; }
.nsr-alert li { margin: 0.2em 0; }
.nsr-alert p { margin: 0.4em 0 0; }
.nsr-alert.-safety { border-color: #f3c9a5; background: #fff6ee; }
.nsr-alert.-safety > .nsr-icon { color: var(--nsr-orange); }
.nsr-alert.-error { display: block; border-color: #efb3a6; background: #fdf1ee; color: #9c2a12; }
.nsr-alert.-found { border-color: #b5dcc4; background: #eff8f2; }
.nsr-alert.-found > .nsr-icon { color: var(--nsr-green); }

.nsr-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	margin: 1.25rem 0;
	padding: 0.6em 1em;
	border-radius: 8px;
	background: var(--nsr-soft);
	color: var(--nsr-muted);
	font-size: 0.875rem;
}
.nsr-empty { padding: 2rem 1rem; border-radius: var(--nsr-radius); background: var(--nsr-soft); text-align: center; }

/* 一覧とカード */
.nsr-list { display: grid; gap: 12px; }
@media (min-width: 782px) { .nsr-list { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .nsr-list { grid-template-columns: repeat(3, 1fr); } }

.nsr-card {
	position: relative;
	display: grid;
	grid-template-columns: 104px 1fr;
	gap: 12px;
	align-items: center;
	padding: 12px;
	border: 1px solid var(--nsr-border);
	border-radius: var(--nsr-radius);
	background: #fff;
}
.nsr-card__thumb {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	background: var(--nsr-soft);
}
.nsr-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.nsr-card__noimg { display: grid; place-items: center; height: 100%; color: #9aa5b8; }
.nsr-card__noimg .nsr-icon { width: 48px; height: 48px; }
.nsr-card__body { min-width: 0; }
.nsr-card__title { margin: 0.3em 0 0.2em; font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.nsr-card__title a { color: var(--nsr-text); text-decoration: none; }
.nsr-card__title a::after { content: ""; position: absolute; inset: 0; } /* カード全体を押せるようにする */
.nsr-card__meta { margin: 0; padding: 0; list-style: none; color: var(--nsr-text); font-size: 0.875rem; }
.nsr-card__meta li { display: flex; align-items: center; gap: 0.3em; margin: 0.1em 0; }
.nsr-card__meta .nsr-icon { color: var(--nsr-muted); }
.nsr-card__plate {
	display: inline-block;
	margin: 0.4em 0 0;
	padding: 0.1em 0.8em;
	border-radius: 999px;
	background: var(--nsr-soft);
	color: var(--nsr-muted);
	font-size: 0.8125rem;
}
.nsr-card__more {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border: 2px solid var(--nsr-navy);
	border-radius: 8px;
	color: var(--nsr-navy);
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
}
.nsr-card.-found { background: #fafbfc; }

/* 絞り込み */
.nsr-filter {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 0 0 1.5rem;
	padding: 16px;
	border: 1px solid var(--nsr-border);
	border-radius: var(--nsr-radius);
	background: #fff;
}
.nsr-filter__item { display: block; min-width: 0; }
.nsr-filter__item > span { display: block; margin-bottom: 4px; color: var(--nsr-muted); font-size: 0.8125rem; font-weight: 700; }
.nsr-filter__item.-wide,
.nsr-filter .nsr-btn { grid-column: 1 / -1; }
.nsr-filter select,
.nsr-filter input,
.nsr-form select,
.nsr-form textarea,
.nsr-form input:not([type="checkbox"]):not([type="hidden"]) {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0.5em 0.75em;
	border: 1px solid #aab3c4;
	border-radius: 8px;
	background: #fff;
	color: var(--nsr-text);
	font: inherit;
	font-size: 16px; /* iOS でズームされない最小サイズ */
}
.nsr-form input[type="file"] { padding: 0.6em; }
.nsr-filter select:focus,
.nsr-filter input:focus,
.nsr-form select:focus,
.nsr-form textarea:focus,
.nsr-form input:focus { outline: 3px solid #2f7de1; outline-offset: 1px; }
@media (min-width: 1000px) {
	.nsr-filter { grid-template-columns: repeat(3, 1fr) 1.4fr auto; align-items: end; }
	.nsr-filter__item.-wide,
	.nsr-filter .nsr-btn { grid-column: auto; }
	.nsr-filter .nsr-btn { min-height: 48px; }
}
.nsr-search__count { margin: 0 0 0.75rem; font-size: 1.0625rem; font-weight: 700; }
.nsr-search__count strong { color: var(--nsr-orange); font-size: 1.5em; }
.nsr-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 1.5rem 0; }
.nsr-pager .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.6em;
	border: 1px solid var(--nsr-border);
	border-radius: 8px;
	background: #fff;
	color: var(--nsr-navy);
	font-weight: 700;
	text-decoration: none;
}
.nsr-pager .page-numbers.current { border-color: var(--nsr-navy); background: var(--nsr-navy); color: #fff; }

/* フォーム */
.nsr-form { max-width: 720px; margin: 0 auto; }
.nsr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nsr-fieldset {
	margin: 0 0 1.5rem;
	padding: 16px;
	border: 1px solid var(--nsr-border);
	border-radius: var(--nsr-radius);
	background: #fff;
}
.nsr-fieldset legend {
	padding: 0 0.5em;
	color: var(--nsr-navy);
	font-size: 1.125rem;
	font-weight: 700;
}
.nsr-fieldset legend small {
	margin-left: 0.75em;
	padding: 0.15em 0.7em;
	border-radius: 999px;
	background: var(--nsr-soft);
	color: var(--nsr-muted);
	font-size: 0.75rem;
	font-weight: 700;
}
.nsr-fieldset__lead { margin: 0 0 1rem; font-size: 0.9375rem; }
.nsr-field { margin: 0 0 1.25rem; }
.nsr-field:last-child { margin-bottom: 0; }
.nsr-field__label { display: block; margin-bottom: 6px; font-weight: 700; }
.nsr-field__req,
.nsr-field__opt,
.nsr-field__private {
	display: inline-block;
	margin-left: 0.6em;
	padding: 0 0.6em;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.8;
	vertical-align: 0.1em;
}
.nsr-field__req { background: var(--nsr-red); color: #fff; }
.nsr-field__opt { background: var(--nsr-soft); color: var(--nsr-muted); }
.nsr-field__private { background: var(--nsr-navy); color: #fff; }
.nsr-field__help { margin: 6px 0 0; color: var(--nsr-muted); font-size: 0.8125rem; line-height: 1.6; }
.nsr-field__error { margin: 6px 0 0; color: #b3261e; font-size: 0.875rem; font-weight: 700; }
.nsr-field.is-error input,
.nsr-field.is-error select,
.nsr-field.is-error textarea { border-color: #b3261e; background: #fff8f7; }
.nsr-check {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	min-height: 44px;
	padding: 0.5em 0;
	line-height: 1.6;
	cursor: pointer;
}
.nsr-check input { flex: none; width: 22px; height: 22px; margin: 0.15em 0 0; accent-color: var(--nsr-navy); }
.nsr-details { margin: 0 0 1.5rem; }
.nsr-fieldset .nsr-details { margin: 1rem 0 0; }
.nsr-details summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--nsr-navy);
	font-weight: 700;
	cursor: pointer;
}
.nsr-details[open] summary { margin-bottom: 0.75rem; }
.nsr-form__confirm { margin: 0 0 1.25rem; padding: 8px 16px; border-radius: var(--nsr-radius); background: var(--nsr-soft); }
.nsr-form__confirm .nsr-field { margin: 0; }
.nsr-form__note { margin: 0.75rem 0 0; color: var(--nsr-muted); font-size: 0.875rem; text-align: center; }
.nsr-target {
	display: grid;
	gap: 2px;
	padding: 12px 16px;
	border-left: 4px solid var(--nsr-orange);
	border-radius: 4px;
	background: var(--nsr-soft);
}
.nsr-target__label { color: var(--nsr-muted); font-size: 0.8125rem; }
.nsr-target strong { font-size: 1.125rem; }
.nsr-target a { margin-top: 4px; font-size: 0.875rem; }
.nsr-done { max-width: 720px; margin: 0 auto; padding: 24px 20px; border: 2px solid var(--nsr-green); border-radius: var(--nsr-radius); background: #fff; }
.nsr-done h2 { margin: 0 0 0.75rem; color: var(--nsr-green); font-size: 1.375rem; }

/* 詳細 */
.nsr-detail { max-width: 880px; margin: 0 auto; }
.nsr-detail__status { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin: 0 0 1rem; }
.nsr-detail__status .nsr-badge { font-size: 1rem; }
.nsr-detail__updated { color: var(--nsr-muted); font-size: 0.875rem; }
.nsr-detail__main { display: grid; gap: 16px; margin-bottom: 1.5rem; }
@media (min-width: 782px) { .nsr-detail__main:has(.nsr-detail__photo) { grid-template-columns: 1fr 1fr; align-items: start; } }
.nsr-detail__photo { margin: 0; }
.nsr-detail__photo img { display: block; width: 100%; height: auto; border-radius: var(--nsr-radius); }
.nsr-detail__list { margin: 0; border: 1px solid var(--nsr-border); border-radius: var(--nsr-radius); background: #fff; }
.nsr-detail__list > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 0.75em; padding: 0.7em 1em; }
.nsr-detail__list > div + div { border-top: 1px solid var(--nsr-border); }
.nsr-detail__list dt { color: var(--nsr-muted); font-size: 0.875rem; font-weight: 700; }
.nsr-detail__list dd { margin: 0; font-weight: 700; }
.nsr-detail h2,
.nsr-manage h2 { margin: 0 0 0.75rem; padding: 0; border: 0; background: none; color: var(--nsr-navy); font-size: 1.1875rem; }
.nsr-detail__features { margin-bottom: 1.5rem; }
.nsr-detail__report { margin-bottom: 1.5rem; padding: 16px; border: 2px solid var(--nsr-navy); border-radius: var(--nsr-radius); background: #fff; }
.nsr-detail__back { text-align: center; }

/* 持ち主用の管理ページ */
.nsr-manage { max-width: 720px; margin: 0 auto; }
.nsr-manage__box { margin: 0 0 1.5rem; padding: 16px; border: 1px solid var(--nsr-border); border-radius: var(--nsr-radius); background: #fff; }
.nsr-manage__actions { display: grid; gap: 12px; }
.nsr-sightings { margin: 0 0 1rem; padding: 0; list-style: none; }
.nsr-sightings li { padding: 12px 0; border-top: 1px solid var(--nsr-border); }
.nsr-sightings p { margin: 0.2em 0; }
.nsr-sightings__when { color: var(--nsr-muted); font-size: 0.875rem; font-weight: 700; }
.nsr-sightings__place { font-weight: 700; }
.nsr-details summary { gap: 0.4em; list-style: none; }
.nsr-details summary::-webkit-details-marker { display: none; }
.nsr-details summary::before { content: "＋"; }
.nsr-details[open] summary::before { content: "－"; }

/* Xの投稿をもとに掲載した車両 */
.nsr-detail__source { margin: 1.25rem 0; padding: 0.8em 1em; border-radius: 8px; background: var(--nsr-soft); color: var(--nsr-muted); font-size: 0.875rem; line-height: 1.7; }

/* 詳細ページ内の目撃情報フォーム */
.nsr-detail__report .nsr-form { max-width: none; margin: 0; }
.nsr-detail__report .nsr-fieldset { padding: 12px 14px; }
.nsr-detail__report .nsr-done { padding: 16px; border-width: 1px; }
.nsr-detail__srclink { margin: 1rem 0 0; text-align: center; font-size: 0.875rem; }

/* 都道府県の地図（タイル） */
.nsr-map { max-width: 640px; margin: 0 auto; }
.nsr-map__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: 1fr;
	gap: 3px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nsr-map__grid > li { margin: 0; padding: 0; aspect-ratio: 1; }
.nsr-tile {
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	border-radius: 5px;
	font-size: clamp(9px, 2.7vw, 13px);
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	letter-spacing: -0.02em;
}
.nsr-tile.-lv0 { background: #e9edf4; color: #4b5870; }
.nsr-tile.-lv1 { background: #fcd9ba; color: var(--nsr-navy); }
.nsr-tile.-lv2 { background: #f59a52; color: var(--nsr-navy); }
.nsr-tile.-lv3 { background: var(--nsr-orange-dark); color: #fff; }
a.nsr-tile:hover { outline: 2px solid var(--nsr-navy); }
a.nsr-tile:focus-visible { outline: 3px solid #2f7de1; outline-offset: 1px; }
a.nsr-tile.is-selected { outline: 3px solid var(--nsr-navy); outline-offset: 1px; }
.nsr-map__panel { min-height: 4.5rem; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--nsr-radius); background: var(--nsr-soft); }
.nsr-map__panel p { margin: 0 0 0.6em; }
.nsr-map__panel .nsr-btn { min-height: 48px; }
.nsr-map__panel .nsr-map__hint { margin: 0; color: var(--nsr-muted); font-size: 0.9375rem; }
.nsr-map__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--nsr-muted); font-size: 0.8125rem; }
.nsr-map__legend li { display: flex; align-items: center; gap: 5px; margin: 0; }
.nsr-map__legend .nsr-tile { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.nsr-map__note { margin: 4px 0 0; color: var(--nsr-muted); font-size: 0.75rem; text-align: center; }

/* 都道府県ページ */
.nsr-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 1rem; color: var(--nsr-muted); font-size: 0.8125rem; }
.nsr-crumb a { color: var(--nsr-muted); }
.nsr-area__lead { margin: 0 0 1rem; line-height: 1.8; }
.nsr-area__lead strong { color: var(--nsr-orange-dark); font-size: 1.15em; }
.nsr-areamap { margin: 0 0 2rem; }
.nsr-areamap__canvas { z-index: 0; width: 100%; height: 320px; border: 1px solid var(--nsr-border); border-radius: var(--nsr-radius); background: #e9edf4; }
@media (min-width: 782px) { .nsr-areamap__canvas { height: 440px; } }
.nsr-areamap__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; padding: 0; list-style: none; color: var(--nsr-muted); font-size: 0.8125rem; }
.nsr-areamap__legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.nsr-areamap__legend .nsr-pin { position: static; width: 20px; height: 20px; transform: rotate(-45deg); }
.nsr-areamap__legend .nsr-pin::after { top: 5px; left: 5px; width: 8px; height: 8px; }
.nsr-areamap__me { display: inline-block; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--nsr-navy); box-shadow: 0 0 0 1px var(--nsr-navy); }
.nsr-areamap__msg { min-height: 1.4em; margin: 0.25rem 0; font-size: 0.875rem; }
.nsr-areamap__note { margin: 0; color: var(--nsr-muted); font-size: 0.8125rem; line-height: 1.7; }
.nsr-pin-wrap { background: none; border: 0; }
.nsr-pin { position: relative; display: block; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; background: var(--nsr-orange); transform: rotate(-45deg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.nsr-pin::after { content: ""; position: absolute; top: 8px; left: 8px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.nsr-pin.-found { background: var(--nsr-green); }
.nsr-pin-wrap .nsr-pin { margin: 4px 0 0; }
.nsr-popup { display: grid; gap: 4px; min-width: 150px; }
.nsr-popup a { color: var(--nsr-navy); }
.nsr-popup .nsr-badge { justify-self: start; font-size: 0.75rem; }
.nsr-areanav { margin: 2rem 0 0; }
.nsr-areanav h2 { margin: 0 0 0.6rem; padding: 0; border: 0; background: none; color: var(--nsr-navy); font-size: 1.0625rem; }
.nsr-areanav ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nsr-areanav li { margin: 0; }
.nsr-areanav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--nsr-border); border-radius: 999px; background: #fff; color: var(--nsr-navy); font-size: 0.875rem; text-decoration: none; }
.nsr-areanav a[aria-current="page"] { border-color: var(--nsr-navy); background: var(--nsr-navy); color: #fff; }
