@font-face {
	font-family: "GD-HighwayGothic";
	src: url("../font/KodanGothic.woff2") format("woff2");
	font-display: swap;
}

@font-face {
	font-family: "Neue Haas Grotesk Text Pro";
	src: url("../font/NHaasGroteskTXPro.woff2") format("woff2");
	font-display: swap;
}

* {
	font-family: "JetBrains Mono","IBM Plex Sans JP","Noto Serif Hentaigana";
}

body {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	-webkit-text-size-adjust: 100%;
}

.page {
	display: flex;
	flex: 1;
	flex-direction: column;
	transition: opacity 0.3s, transform 0.3s;
	opacity: 0;
	transform: scale(0.95) translateZ(-50px);
	filter: blur(10px);
}

.page.fade-in,.back-to-top.fade-in {
	opacity: 1;
	transform: scale(1) translateZ(0px);
	filter: blur(0);
}

.page.fade-out,.back-to-top.fade-out {
	opacity: 0;
	transform: scale(1.05) translateZ(50px);
	filter: blur(5px);
}

#loading {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0,0,0,0.3);
	color: white;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 17.5px;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s;
}

#loading.show {
	opacity: 1 !important;
	visibility: visible !important;
}

pre,
.pre {
	font-family: Consolas,"Courier New",Courier,monospace;
	white-space: pre-wrap;
}

/* header */

header {
	background: #006432;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
	position: sticky;
	top: 0;
	z-index: 1001;
}

.header-inner {
	margin: 0 auto;
	padding: 0px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.logo a {
	color: #fff;
	text-decoration: none;
	font-size: 1.5rem;
	font-weight: bold;
}

.logo span {
	font-size: .9rem;
	font-weight: normal;
	margin-left: 8px;
	opacity: .8;
}

.logo img {
	height: 60px;
	width: auto;
	display: block;
}

/* main */

main {
	flex: 1;
	padding: 2px 6px;
}

/* footer */

footer {
	background: #3f463f;
	color: #ccc;
	padding: 10px 20px 20px;
	margin-top: 50px;
}

.footer-inner {
	margin: 0 auto;
	text-align: center;
}

.footer-content h3 {
	color: #fff;
	margin-bottom: 10px;
}

.footer-content p {
	font-size: .85rem;
	line-height: 1.6;
	margin: 0 auto 20px;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 20px 0;
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.footer-links a,
a.footer-link-license {
	color: #ddd;
	text-decoration: none;
	font-size: .85rem;
}

.footer-links a:hover,
a.footer-link-license:hover {
	color: #ebffef;
	font-weight: bold;
}

.copyright {
	margin-top: 30px;
	font-size: .75rem;
	border-top: 1px solid #333;
	padding-top: 20px;
	color: #ccc;
}

/* ========== ハンバーガーボタン ========== */
.hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 1000;
	padding: 8px;
}

.hamburger-line {
	display: block;
	width: 24px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
	opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.navbar {
	width: 100%;
	margin-top: 15px;
}

.nav-menu {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: flex-start;
	border-top: 1px solid rgba(255, 255, 255, .2);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.nav-menu li {
	flex: 1;
	text-align: center;
	position: relative;
}

.nav-menu a,
.nav-menu button {
	display: block;
	padding: 12px 10px;
	color: #fff;
	text-decoration: none;
	font-size: .9rem;
	transition: background .25s;
	border-radius: 15px;
	margin-left: 5px;
	white-space: nowrap;
	margin: 0 3px;
	background-color: transparent;
}

.nav-menu a:hover,
.nav-menu button:hover {
	background: rgba(255, 255, 255, .075);
}

.nav-menu a.active {
	background: rgba(255, 255, 255, .15);
}

@media(min-width: 768px) {
	.header-inner {
		flex-direction: row;
		justify-content: space-between;
	}

	.navbar {
		width: auto;
		margin-top: 0;
		overflow: auto;
	}

	.nav-menu {
		border-top: none;
	}

	.nav-menu a,
	.nav-menu button {
		padding: 10px 20px;
	}
}

@media(max-width: 767px) {
	.logo img {
		height: 50px;
		width: auto;
		display: block;
	}

	.header-inner {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		flex-wrap: wrap;
	}

	.hamburger {
		display: flex;
	}

	.navbar {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: rgba(0, 80, 50, 0.9);
		backdrop-filter: blur(10px);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease;
		margin-top: 0;
		z-index: 999;
	}

	.navbar.open {
		max-height: 700px;
	}

	.nav-menu {
		flex-direction: column;
		border-top: none;
	}

	.nav-menu li {
		flex: none;
		width: 100%;
	}

	.nav-menu a,
	.nav-menu button {
		padding: 15px 20px;
		border-radius: 15px;
		margin: 3px;
		font-size: 1rem;
		text-align: left;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.nav-menu li:last-child a {
		border-bottom: none;
	}
}

/* table */

hr {
	border-radius: 25px;
	margin: 20px 0 10px;
	border: 0;
	height: 1px;
	background: #e0e0e0;
}

table,
tr,
th,
td {
	border-collapse: collapse;
	border: .15em solid #444;
	padding: 6px;
}

/* inline images */

p img,
span img,
small img,
h1 img,
h2 img,
h3 img,
h4 img,
h5 img,
h6 img,
li img,
a img,
option img,
button img,
td img {
	height: 1.25em;
	vertical-align: middle;
}

.auto-img img {
	display: inline !important;
	margin: 0 !important;
	height: 1.25em !important;
	vertical-align: middle !important
}

p,
span {
	word-break: auto-phrase;
	line-height: 1.575;
}

img {
	border-radius: 5px;
	max-width: stretch;
	max-width: -webkit-fill-available;
	max-width: 100%;
	object-fit: contain;
}

.leaflet-container img {
	border-radius: 0;
}

/* color icon */
.color-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background-color: var(--bg-color,#fff);
	border: solid 1px #909090;
	vertical-align: middle;
}

/* click zoom */

img[data-img="click-large"] {
	cursor: zoom-in;
	border: solid 1px white;
}

img[data-img="click-large"]:hover {
	filter: brightness(1.05);
	border-color: #777;
}

.img-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .7);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	cursor: zoom-out;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
	z-index: 1001;
}

.img-overlay.show {
	opacity: 1;
	pointer-events: auto;
}

.img-overlay-img {
	max-width: 90%;
	max-height: 80%;
	border-radius: 8px;
	transform: scale(.95);
	transition: transform .25s;
	cursor: default;
}

.img-overlay.show .img-overlay-img {
	transform: scale(1);
}

.img-overlay small {
	margin-top: 12px;
	color: #fff;
	font-size: 14px;
	opacity: .8;
	font-family: monospace;
	background: rgba(0, 0, 0, .3);
	padding: 4px 8px;
	border-radius: 4px;
	user-select: text;
	cursor: text;
}

body:has(.img-overlay.show) {
	overflow: hidden;
}

.nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background: rgba(255, 255, 255, 0.2);
	color: white;
	font-size: 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	border-radius: 50%;
	transition: all 0.25s;
	z-index: 1001;
	opacity: 0;
	pointer-events: none;
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.img-overlay.show .nav-arrow {
	opacity: 0.7;
	pointer-events: auto;
}

.nav-arrow:hover {
	opacity: 1 !important;
	background: rgba(255, 255, 255, 0.3);
}

.nav-arrow.prev {
	left: 20px;
}

.nav-arrow.next {
	right: 20px;
}

.img-overlay[data-single="true"] .nav-arrow {
	display: none;
}

.img-overlay::after {
	position: absolute;
	bottom: 80px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
	font-family: monospace;
	opacity: 0;
	transition: opacity 0.25s;
	pointer-events: none;
}

.img-overlay.show::after {
	opacity: 0.5;
}

.nav-arrow::before {
	content: "";
	display: block;
	width: 14px;
	height: 14px;
	border-top: 3px solid white;
	border-right: 3px solid white;
	position: absolute;
	top: 50%;
	left: 50%;
	transform-origin: center;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.nav-arrow.prev::before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.nav-arrow.next::before {
	transform: translate(-70%, -50%) rotate(45deg);
}

blockquote {
	background-color: #f0f5f0;
	margin: 10px auto;
	padding: 15px;
	border-radius: 15px;
	box-shadow: 0px 5px 5px -4px rgba(0, 0, 0, .25);
	border-left: 3px solid #237447;
}

.text-red {
	color: #cc0000;
}

.text-orange {
	color: #e6950a;
}

.text-green {
	color: #237447;
}

.text-default {
	color: #000000;
}

a {
	text-decoration: none;
	color: blue;
}

a:hover {
	font-weight: bold;
}

.toc {
	background-color: #f0f5f0;
	border-left: 4px solid #237447;
	border-radius: 15px;
	box-shadow: 0px 5px 5px -4px rgba(0, 0, 0, .25);
	padding: 15px 15px 15px 35px;
	display: inline-block;
	min-width: 200px;
	margin: 0;
}

.toc ul {
	padding-left: 20px;
	margin: 0;
}

.toc li {
	margin: 5px 0;
}

.toc a {
	color: #237447;
}

.toc a:hover {
	font-weight: bold;
}

.search-results {
	list-style: none;
	padding: 0;
}

.search-results li {
	margin-bottom: 20px;
	border-left: 3px solid #237447;
	padding-left: 12px;
	padding: 10px;
}

.search-snippet {
	color: #555;
	font-size: .9rem;
	margin: 4px 0;
}

.search-results mark {
	background: #ffe066;
	border-radius: 2px;
	padding: 0 1px;
}

.search-form {
	display: flex;
	gap: 6px;
	margin-bottom: 20px;
	align-items: center;
	flex-wrap: wrap;
}

.search-form input {
	flex: 1;
	min-width: 150px;
	padding: 8px 12px;
	font-size: 1rem;
	caret-color: #0059be;
}

.search-form select {
	width: auto;
	min-width: 120px;
	padding: 8px 40px 8px 12px;
	font-size: 1rem;
}

.leaflet-container a.btn {
	color: white;
}

button,
.btn {
	display: inline-block;
	background: #006432;
	color: #fff;
	border: none;
	border-radius: 15px;
	padding: 8px 14px;
	cursor: pointer;
	text-decoration: none;
	font-family: inherit;
	font-size: inherit;
	line-height: normal;
	text-align: center;
	box-sizing: border-box;
	margin: 6px 0 6px 0;
	transition: all 0.2s ease;
}

select > button {
	all: unset;
	cursor: pointer;
}

.btn.red {
	background: #ec2d23;
}

.btn.blue {
	background: #1a73e8;
}

.btn.yellow {
	background: #f9ab00;
	color: #1a1a1a !important;
}

.btn.purple {
	background: #9334e6;
}

.btn.orange {
	background: #ff6d00;
}

.btn.pink {
	background: #e91e63;
}

.btn.cyan {
	background: #00bcd4;
	color: #1a1a1a !important;
}

.btn.teal {
	background: #009688;
}

.btn.indigo {
	background: #3f51b5;
}

.btn.lime {
	background: #cddc39;
	color: #1a1a1a !important;
}

.btn.brown {
	background: #795548;
}

.btn.gray {
	background: #6c757d;
}

.btn.dark {
	background: #2c3e50;
}

.btn.light {
	background: #f8f9fa;
	color: #333 !important;
	border: 1px solid #ddd;
}

.btn.light:hover {
	background: #e9ecef;
	filter: none;
}

.btn.outline {
	background: transparent;
	color: #006432 !important;
	border: 2px solid #006432;
}

.btn.outline:hover {
	background: #006432;
	color: #fff !important;
	filter: none;
}

.btn.outline.red {
	color: #ec2d23 !important;
	border-color: #ec2d23;
}
.btn.outline.red:hover {
	background: #ec2d23;
	color: #fff !important;
}

.btn.outline.blue {
	color: #1a73e8 !important;
	border-color: #1a73e8;
}
.btn.outline.blue:hover {
	background: #1a73e8;
	color: #fff !important;
}

.btn.outline.purple {
	color: #9334e6;
	border-color: #9334e6;
}
.btn.outline.purple:hover {
	background: #9334e6;
	color: #fff !important;
}

.btn.small {
	padding: 4px 10px;
	font-size: 0.85rem;
	border-radius: 10px;
}

.btn.large {
	padding: 12px 24px;
	font-size: 1.1rem;
	border-radius: 20px;
}

.btn.block {
	display: block;
	width: 100%;
}

.btn.icon-only {
	padding: 8px 10px;
}
.btn.icon-only i {
	margin-right: 0;
}

.btn.circle {
	border-radius: 50%;
	padding: 8px;
	width: 40px;
	height: 40px;
	line-height: 1;
}

button:hover:not(select > button),
.btn:hover {
	filter: brightness(1.25);
	font-weight: lighter;
}

a.btn.light,
a.btn.yellow,
a.btn.lime,
a.btn.cyan {
	color: #1a1a1a;
}

.btn.light:hover,
.btn.yellow:hover,
.btn.lime:hover,
.btn.cyan:hover {
	filter: brightness(0.95);
}

button:disabled,
.btn:disabled,
.btn.disabled {
	filter: grayscale(0.6);
	pointer-events: none;
	cursor: not-allowed;
	opacity: 0.7;
}

#text-selection-popup button {
	margin: 0;
}

#edit-memo-popup {
	position: absolute;
	display: none;
	background: #fffde7;
	color: #000000;
	border: 1px solid #f0c040;
	border-radius: 15px;
	padding: 6px 10px;
	font-size: .85rem;
	box-shadow: 0 2px 6px rgba(0,0,0,.2);
	max-width: 350px;
	z-index: 1002;
}

.back-to-top {
	position: fixed;
	right: 10px;
	bottom: 10px;
	width: 50px;
	height: 50px;
	background-color: #006432;
	color: white !important;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 999;
	transition: background-color 0.3s, opacity 0.3s, transform 0.3s;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	display: flex; 
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.95) translateZ(-50px);
	filter: blur(10px);
}

.back-to-top:hover {
	background-color: #328a5a;
	color: white !important;
}

.back-to-top i {
	font-size: 20px;
	line-height: 1;
}

#text-selection-popup {
	display: none;
	position: absolute;
	z-index: 9999;
	flex-direction: row;
	gap: 2px;
	background: #2a3a2e;
	border: 1px solid #3a5a3e;
	border-radius: 10px;
	padding: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
	user-select: none;
	white-space: nowrap;
}

#text-selection-popup button {
	background: transparent;
	border: none;
	color: #e8f5eb;
	font-family: "IBM Plex Sans JP", "Noto Serif Hentaigana";
	font-size: .8rem;
	padding: 5px 9px;
	border-radius: 7px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: background .15s;
}

#text-selection-popup button:hover {
	background: #006432;
}

#text-selection-popup button:active {
	background: #237447;
}

mark.text-highlight {
	background: #ffe066;
	color: inherit;
	border-radius: 2px;
	cursor: pointer;
	padding: 0 1px;
}

mark.text-highlight:hover {
	background: #ffc107;
}

.input,
select,
option,
textarea {
	display: block;
	width: 100%;
	max-width: stretch;
	max-width: -webkit-fill-available;
	padding: 10px 14px;
	font-size: 1rem;
	color: #333;
	border: 1.5px solid #ccc;
	border-radius: 15px;
	background-color: #fff;
	box-sizing: border-box;
	caret-color: #006432;
	margin-top: 6px;
}

.basic-auth-div {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 5px;
}

.toggle-contianer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.toggle {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 28px;
}

.toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.slider {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 28px;
	cursor: pointer;
	transition: background .2s;
	border: 0.5px solid #ddd;
}

.slider::before {
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	left: 3px;
	top: 2px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s;
}

input:checked + .slider {
	background: #006432;
	border-color: #006432
}

input:checked + .slider::before {
	transform:translateX(24px);
}

input:focus + .slider {
	box-shadow:0 0 0 3px rgba(0,100,50,.15);
}

textarea {
	height: 200px;
	max-height: 100%;
}

select,::picker(select) {
	appearance: base-select;
}

select::picker-icon {
	display: none;
}

::picker(select) {
	border: 1.5px solid #ccc;
	border-radius: 15px;
	padding: 5px;
	background-color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

option {
	padding: 7px 10px;
	transition: background 0.2s;
	border: 0;
	margin-top: 3px;
}

option:hover {
	background-color: #e6f3e6;
	color: #006432;
	cursor: pointer;
}

select:has(option:disabled:checked) {
	color: #999;
}

option:disabled {
	color: #999;
	cursor: pointer;
}

option:checked {
	background-color: #d4f7d4;
	color: #006432;
	cursor: pointer;
}

option:checked:disabled {
	filter: grayscale(0.9);
	cursor: pointer;
}

option::checkmark {
	font-weight: 900;
	font-family: var(--fa-family-classic);
	content: "\f00c";
	margin-right: 4px;
}

select {
	cursor: pointer;
	background-image: url("../data/img/select.svg");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 1.1em;
	padding-right: 40px;
}

.input:focus, 
select:focus,
textarea:focus {
	outline: none;
	border-color: #006432;
	box-shadow: 0 0 0 3px rgba(0, 100, 50, 0.15);
}

.input[type="checkbox"],
.input[type="radio"] {
	display: inline-block;
	appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #006432;
	background-color: #fff;
	margin-right: 8px;
	vertical-align: middle;
	cursor: pointer;
	position: relative;
	transition: background 0.2s, border-color 0.2s;
}

input[type="file"]::file-selector-button {
	background: #f8f9fa;
	color: #333;
	border: 1px solid #ddd;
	padding: 4px 10px;
	font-size: 0.85rem;
	border-radius: 10px;
	cursor: pointer;
	font-family: inherit;
	transition: all 0.2s;
}

input[type="file"]::file-selector-button:hover {
	background: #e9ecef;
}

.input[type="radio"] {
	border-radius: 50%;
}

.input[type="checkbox"]:checked {
	background-color: #006432;
}

.input[type="checkbox"]:checked::after {
	font-weight: 900;
	font-family: var(--fa-family-classic);
	content: "\f00c";
	color: #fff;
	font-size: 14px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
}

.input[type="checkbox"]:checked:disabled {
	filter: brightness(0.5);
}

.input[type="radio"]:checked::after {
	content: "";
	width: 10px;
	height: 10px;
	background-color: #006432;
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
}

.input-group {
	margin-bottom: 1.2rem;
}

.input-label {
	display: block;
	font-weight: bold;
	margin-bottom: 6px;
	color: #444;
	font-size: 0.9rem;
}

.tile-container {
	display: grid;
	grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
	gap: 10px;
	padding: 10px 0;
}

.tile-container.facilities {
	grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
}

.tile {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 20px;
	border: 1px solid #e5e5e5;
	transition: box-shadow 0.2s, filter 0.2s;
	display: block;
	will-change: filter;
}

.tile img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto 10px;
	border-radius: 8px;
}

.tile:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.tile:active {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
}

a.tile:hover {
	filter: brightness(0.85);
}

a.tile:active {
	filter: brightness(0.8);
}

.tile h2,
.tile h2 a {
	font-size: 1.2rem;
	margin: 0 0 10px 0;
	color: #333;
}

.tile h2 a:hover {
	color: #777;
}

.tile h3,
.tile h3 a {
	font-size: 1.2rem;
	margin: 0 0 10px 0;
	color: #333;
}

.tile h3 a:hover {
	color: #777;
}

.tile p {
	font-size: 0.9rem;
	color: #666;
	margin: 0;
	line-height: 1.5;
}

.tile.logout {
	background-color: #ffeaea;
}

.tile.admin {
	background-color: #cbffe2;
}

.tile.notice-admin {
	background-color: #fffdcb;
}

.notice-item {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 20px;
	border: 1px solid #e5e5e5;
	transition: box-shadow 0.2s;
}

.notice-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}

.notice-item:active {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
}

.notice-item h3 {
	font-size: 1.2rem;
	color: #333;
	margin-block-start: 0em;
}

.notice-item p {
	font-size: 0.9rem;
	color: #666;
	margin: 0;
	line-height: 1.5;
}

.notice-item.cursor-default {
	cursor: auto;
}

.notice-item .margin-left {
	margin-left: 6px;
}

.alert {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(-100px);
	background: #333;
	color: #fff;
	padding: 12px 24px;
	border-radius: 12px;
	font-size: 14px;
	z-index: 9999;
	opacity: 0;
	transition: all 0.3s;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.alert.bottom {
	top: auto;
	bottom: 20px;
	transform: translateX(-50%) translateY(100px);
}

.alert.error {
	background: #dc3545;
}

.alert.warning {
	background: #ffcc22;
	color: #000000;
}

.alert.success {
	background: #28a745;
}

.alert.info {
	background: #17a2b8;
}

.alert2 {
	padding: 10px 18px;
	background: #333;
	border: solid 1px #111;
	color: #ffffff;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
	border-radius: 15px;
	font-size: 14px;
	margin-top: 6px;
}

.alert2.error {
	background: #dc3545;
	border-color: red;
}

.alert2.warning {
	background: #ffdb66;
	border-color: #ffc926;
	color: #000000;
}

.alert2.success {
	background: #28a745;
	border-color: green;
}

.alert2.info {
	background: #23c1d9;
	border-color: deepskyblue;
	color: #000000;
}

.logo-text::before {
	font-family: "GD-HighwayGothic";
	content: "ハイウェイラジオ 情報まとめ";
}

.logo-text-2 {
	font-family: "GD-HighwayGothic";
}

details {
	background: #f8faf8;
	border-radius: 15px;
	margin: 5px 0 5px 0;
	border: 1px solid #e0e5e0;
	transition: all 0.2s ease;
}

details:hover {
	border-color: #006432;
	box-shadow: 0 2px 8px rgba(0, 100, 50, 0.1);
}	

summary {
	padding: 10px 12px;
	font-weight: 600;
	cursor: pointer;
	background: #f0f5f0;
	border-radius: 15px;
	color: #006432;
	position: relative;
	list-style: none;
	transition: background 0.2s;
}

summary::-webkit-details-marker {
	display: none;
}

summary::before {
	content: "▶";
	display: inline-block;
	margin-right: 12px;
	font-size: 12px;
	transition: transform 0.2s ease;
	color: #006432;
}

details[open] summary::before {
	transform: rotate(90deg);
}

summary:hover {
	background: #e8f0e8;
}

details[open] summary {
	border-radius: 15px 15px 0 0;
	background: #006432;
	color: #fff;
}

details[open] summary::before {
	color: #fff;
}

details[open] summary:hover {
	background: #237447;
}

details[open] > :not(summary) {
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

details details {
	margin: 12px 0 0 20px;
	background: #ffffff;
}

details details summary {
	background: #eef3ee;
	color: #237447;
	font-weight: 500;
	padding: 12px 16px;
}

details details[open] summary {
	background: #237447;
	color: #fff;
}

details.compact summary {
	padding: 10px 16px;
	font-size: 0.9rem;
}

.cf-turnstile {
	height: 65px;
	margin-bottom: 5px;
}

.radius-25 {
	border-radius: 25px;
}

.radius-50 {
	border-radius: 50px;
}

.credit-user {
	display: inline-block;
	border: solid black 1px;
	border-radius: 15px;
	margin: 10px;
	padding: 5px 25px 5px 25px;
	justify-content: center;
	text-align: center;
}

.credit-user .user {
	font-weight: bold;
	font-size: 18px;
}

#map {
	width: 100%;
	height: 600px;
}

.profile-container {
	background-color: white;
	border-radius: 25px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	max-width: 400px;
	text-align: center;
	overflow: hidden;
	margin: 0 auto;
}

.profile-header {
	padding: 20px;
	background-color: #2a8d57;
	color: white;
}

.profile-picture {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid white;
}

.profile-name {
	margin-top: 10px;
	margin-bottom: 0;
}

.profile-sub {
	opacity: 0.9;
	margin-top: 6px;
}

.profile-other {
	font-size: 14px;
	color: #3a5e3a;
	margin-bottom: 0;
}

.profile-other > .point {
	font-size: 17px;
	font-weight: bold;
}

.profile-body {
	padding: 20px;
}

.profile-body h2 {
	margin-bottom: 10px;
}

.profile-body ul {
	list-style-type: none;
	padding: 0;
}

.profile-body li {
	margin-bottom: 10px;
	font-size: 13.5px;
}

.profile-footer {
	padding: 20px;
	border-top: 1px solid #e0e0e0;
}

.login-date {
	font-size: 12px;
	margin: 4px 0 4px;
	color: #6b6b6b;
}

.image-stack {
	display: grid;
	width: 500px;
	max-width: 100%;
}

.image-stack img,
.image-stack .text-overlay {
	grid-row: 1;
	grid-column: 1;
	border-radius: 0;
}

.image-stack img {
	max-width: 100%;
	max-height: 100%;
}

.foreground,.foreground2 {
	width: 100%;
	height: 100%;
	animation: blink 0.6s steps(1) infinite;
}

@keyframes blink {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

.text-overlay,.text-overlay-2 {
	white-space: nowrap;
	grid-row: 1;
	grid-column: 1;
	align-self: start;
	justify-self: center;
	color: white;
	pointer-events: none;
	z-index: 2;
}

.text-overlay, .text-overlay-2 {
	font-family: "DotGothic16";
}

.text-overlay *, .text-overlay-2 * {
	font-family: inherit;
}

.image-stack .icon-overlay {
	grid-row: 1;
	grid-column: 1;
	align-self: center;
	justify-self: start;
	margin-left: 4%;
	margin-top: -9.5%;
	z-index: 2;
	width: 26.5%;
	height: auto;
	border-radius: 0;
	image-rendering: pixelated;
}

.text-overlay {
	margin-top: 4.5%;
}

.text-overlay-2 {
	margin-top: 25%;
}

.center {
	align-self: start;
	font-size: 50px;
	transform: scaleX(1);
	transform-origin: center center;
	text-align: center;
	justify-self: center;
	margin-left: 25%;
}

.img-black {
	background-color: #161616;
	border-radius: 0;
}

.line-editors-container {
	display: flex;
	gap: 16px;
}

.line-editor-block {
	flex: 1;
	min-width: 0;
}

.line-editor-map {
	height: 500px;
}

@media(max-width: 768px) {
	.line-editors-container {
		flex-direction: column;
	}
	
	.line-editor-map {
		height: 350px;
	}
}

.check-add-form,
.check-edit-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 500px) {
	.check-add-form,
	.check-edit-form {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 900px) {
	.check-add-form,
	.check-edit-form {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.check-add-form .full-width,
.check-edit-form .full-width {
	grid-column: 1 / -1;
}

.check-add-form button[type="submit"],
.check-edit-form button[type="submit"] {
	grid-column: 1 / -1;
	justify-self: center;
}

.detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 16px;
}

#detail-map {
	height: 500px;
	border-radius: 16px;
}

.detail-section.full-width {
	grid-column: 1 / -1;
}

@media (max-width: 768px) {
	.detail-grid {
		grid-template-columns: 1fr;
		max-width: 100%;
	}

	.detail-section {
		min-width: 0; /* ← これ！！ */
		max-width: 100%; /* ← 保険 */
	}

	#detail-map {
		height: 420px;
		border-radius: 16px;
	}
}

.detail-section {
	background: #fff;
	border-radius: 16px;
	padding: 24px;
	border: 1px solid #e5e5e5;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.detail-section h2 {
	font-size: 1.2rem;
	margin: 0 0 16px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid #006432;
	color: #333;
}

.detail-section h2 i {
	margin-right: 8px;
	color: #006432;
}

/* テーブル */
.detail-section table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 10px;
}

.detail-section table th,
.detail-section table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.95rem;
}

.detail-section table th {
	color: #666;
	font-weight: 600;
}

.detail-section table tr:last-child th,
.detail-section table tr:last-child td {
	border-bottom: none;
}

/* バッジ */
.badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 600;
	margin: 1px;
	vertical-align: middle;
}

/* 状態バッジ */
.badge.status-0 { background: #d4edda; color: #155724; }  /* 運用中 */
.badge.status-1 { background: #fff3cd; color: #856404; }  /* 準備中 */
.badge.status-2 { background: #e2e3e5; color: #383d41; }  /* 休止中 */
.badge.status--1 { background: #f8d7da; color: #721c24; } /* 廃止 */
.badge.status--2 { background: #e2e3e5; color: #6c757d; } /* 不明 */
.badge.status-3 { background: #cce5ff; color: #004085; }  /* 移管 */

/* データ状態バッジ */
.badge.data--1 { background: #fff3cd; color: #856404; } /* 仮データ */
.badge.data-0 { background: #d4edda; color: #155724; }   /* 本データ */

/* ユーザー状態バッジ */
.badge.user-0 { background: #d4edda; color: #155724; }
.badge.user-1 { background: #fff3cd; color: #856404; }
.badge.user--1 { background: #ffeaa7; color: #7e610a; }
.badge.user--2 { background: #f8d7da; color: #721c24; }
.badge.user--3 { background: #e2e3e5; color: #383d41; }

/* 説明文 */
.detail-section p {
	line-height: 1.7;
	margin-bottom: 16px;
}

/* 現地調査タイル */
.detail-section .tile-container {
	margin-top: 12px;
}

.detail-section .tile {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 16px;
}

.detail-section .tile h3 {
	font-size: 1rem;
	margin: 0 0 8px 0;
	color: #333;
}

.detail-section .survey-content .tile img {
	max-width: 100%;
	height: 200px;
	border-radius: 8px;
	margin: 4px;
}

.detail-section .tile .btn.small {
	margin-right: 4px;
}

.detail-user {
	font-size: 0.85rem;
	color: #888;
	margin-bottom: 8px;
}

.survey-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 16px;
	border-bottom: 2px solid #e5e5e5;
	padding-bottom: 0;
}

.survey-tab {
	padding: 10px 20px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	color: #666;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	border-radius: 0;
	font-family: inherit;
}

.survey-tab:hover {
	color: #006432;
	background: rgba(0, 100, 50, 0.05);
	border-radius: 15px;
}

.survey-tab.active:hover {
	border-radius: 0;
}

.survey-tab.active {
	color: #006432;
	border-bottom-color: #006432;
	background: transparent;
}

.survey-content {
	display: none;
}

.survey-content.active {
	display: block;
}

.survey-content .tile-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@media (max-width: 768px) {
	.survey-content .tile-container {
		grid-template-columns: 1fr;
	}
	
	.survey-tab {
		padding: 8px 14px;
		font-size: 0.85rem;
	}
}

.img-preview-x-btn {
	position: absolute;
	top: 4px;
	right: 4px;
	padding: 0 !important;
	font-size: 0.7rem;
	border-radius: 50% !important;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.tile-container > div > img {
	margin: 0 5px 0 5px;
}

.hidden {
	visibility: hidden;
}

.survey-date-hidden {
	position: absolute;
	visibility: hidden;
	height: 0;
	margin: 0;
	padding: 0;
}

.table-container {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 16px 0;
	border: 1px solid #e5e5e5;
}

.table-container table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	white-space: nowrap;
}

.table-container th,
.table-container td {
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	word-break: break-word;
	white-space: nowrap;
}

@media(min-width: 768px) {
	.table-container th,
	.table-container td {
		white-space: normal;
	}
}

.table-container th {
	background: #f8f9fa;
	font-weight: 600;
	color: #555;
	position: sticky;
	top: 0;
}

.table-container tr:last-child td {
	border-bottom: none;
}

.table-container tr:hover td {
	background: #ddf0dd;
}

.text-right {
	text-align: right;
}

/* ユーザープロフィールページ */
.user-header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 24px;
}

.user-icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
}

.user-info {
	flex: 1;
}

.user-name {
	font-size: 1.5rem;
	margin: 0 0 4px 0;
}

.user-point {
	font-size: 1rem;
	color: #666;
	margin: 4px 0 0 0;
}

.user-description {
	margin: 4px;
	padding: 4px 16px;
	background: #f8f9fa;
	border-radius: 12px;
	line-height: 1.6;
}

.user-surveys {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 2px solid #e5e5e5;
}

.user-surveys h2 {
	font-size: 1.3rem;
	margin-bottom: 16px;
}

.tile.flex {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	flex-wrap: wrap;
}

.tile.flex .thumbnail {
	width: 170.67px;
	height: 128px;
	border-radius: 10px;
	flex-shrink: 0;
	background: #f0f0f0;
}

.tile.flex .info {
	flex: 1 1 200px;
	min-width: 200px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.tile.flex .info h3 {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 1.3rem;
	color: #333;
	word-break: keep-all;
	overflow-wrap: break-word;
}

.tile.flex .icon-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 2em;
	color: #666;
	min-width: 40px;
	margin-left: 8px;
}

.tile.flex .icon-info i {
	color: #006432;
}

.tile.flex .icon-info span {
	font-weight: 600;
	color: #333;
}

.tile.flex .station-meta {
	flex: 1 1 100%;
	min-width: 200px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: #666;
}

@media (max-width: 500px) {
	.tile.flex {
		gap: 12px;
		padding: 12px;
	}

	.tile.flex .thumbnail {
		width: 48px;
		height: 48px;
	}

	.tile.flex .info {
		flex: 1 1 0;
		min-width: 0;
	}

	.tile.flex .icon-info {
		font-size: 1.25rem;
		margin-left: 4px;
	}
}

.main-side-container {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 20px;
}

.left {
	min-width: 0;
}

.right {
	background-color: #f1f1f1;
	border-radius: 15px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	padding: 20px;
}

.right h2 {
	font-size: 1.4rem;
	border: 1px solid #006432;
	background-color: white;
	text-align: center;
	border-radius: 1rem;
	padding: 0.25rem;
	margin: 0.5rem;
	position: relative;
}

#map {
	border-radius: 15px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media(max-width: 1200px) {
	.main-side-container {
		grid-template-columns: 1fr;
	}
}

.a-license {
	color: #ffffff;
}

.a-license:hover {
	font-weight: normal;
	text-decoration: underline;
}

.status-grid {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 3px 12px;
	margin-top: 6px;
}

.status-grid strong {
	text-align: right;
}

.modal-toggle {
	display: none;
}

.modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 1002;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.modal-toggle:checked ~ .modal {
	opacity: 1;
	pointer-events: auto;
}

.modal-content {
	background: #fff;
	border-radius: 16px;
	padding: 24px;
	max-width: 700px;
	width: 100%;
	max-height: 80vh;
	position: relative;
	transform: translateY(20px);
	transition: transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.modal-body {
	overflow: auto;
	flex: 1;
	min-height: 0;
}

.modal-toggle:checked ~ .modal .modal-content {
	transform: translateY(0);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.modal-header h2 {
	margin: 0;
	font-size: 1.25rem;
}

.modal-close {
	font-size: 1rem;
	cursor: pointer;
	color: #777;
	text-decoration: none;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background-color 0.2s, color 0.2s;
}

.modal-close i {
	width: 20px;
	height: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.modal-close:hover {
	background-color: #ff0000;
	color: #ffffff;
}

body:has(.modal-toggle:checked) {
	overflow: hidden;
}

.cursor-pointer {
	cursor: pointer;
}

.calendar-container {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	user-select: none;
}

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

.cal-month-year {
	font-size: 1.1rem;
	font-weight: 600;
	color: #333;
	cursor: pointer;
	padding: 6px 12px;
	border-radius: 15px;
	transition: background .2s;
}

.cal-month-year:hover {
	background: rgba(0, 0, 0, .05);
}

.cal-month-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding: 8px;
	margin-bottom: 12px;
	background: #f5f5f5;
	border-radius: 15px;
}

.cal-month-btn {
	background: none;
	border: none;
	color: #666;
	padding: 10px;
	border-radius: 15px;
	cursor: pointer;
	font-size: .9rem;
	transition: all .2s;
}

.cal-month-btn:hover {
	background: rgba(0, 0, 0, .05);
	color: #333;
}

.cal-month-btn.active {
	background: #4a9eff;
	color: #fff;
	font-weight: 600;
}

.cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	margin-bottom: 8px;
	font-size: .75rem;
	color: #999;
	font-weight: 600;
}

.cal-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	max-width: 100%;
}

.cal-day {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 2px solid transparent;
	color: #333;
	font-size: .9rem;
	cursor: pointer;
	border-radius: 15px;
	transition: all .15s;
}

.cal-day:hover {
	background: #e8f0fe;
}

.cal-day.empty {
	cursor: default;
}

.cal-day.today {
	border-color: #10a137;
	font-weight: 600;
	color: #10a137;
}

.cal-day.selected {
	background: #10a137 !important;
	border-color: #10a137;
	color: #fff;
	font-weight: 600;
}

.cal-day.sunday {
	color: #e53935;
}

.cal-day.saturday {
	color: #1e88e5;
}

.cal-day.selected.sunday,
.cal-day.selected.saturday {
	color: #fff;
}

.cal-footer {
	display: flex;
	justify-content: space-between;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.cal-year-grid {
	display: block;
	margin-bottom: 12px;
}

.cal-grid-scroll {
	display: grid;
	grid-template-columns: repeat(4,1fr);
	gap: 8px;
	max-height: 240px;
	overflow-y: auto;
	padding: 8px;
	background: #f5f5f5;
	border-radius: 15px;
}

.cal-year-btn {
	background: none;
	border: none;
	color: #666;
	padding: 12px 8px;
	border-radius: 15px;
	cursor: pointer;
	font-size: .9rem;
	transition: all .2s;
	text-align: center;
}

.cal-year-btn:hover {
	background: rgba(0, 0, 0, .05);
	color: #333;
}

.cal-year-btn.active {
	background: #4a9eff;
	color: #fff;
	font-weight: 600;
}

.cal-select-header {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
	padding: 0 4px;
}

.cal-select-title {
	margin-left: 8px;
	font-weight: 600;
	font-size: 1rem;
	color: #333;
}

.pc {
	display: initial;
}

.sp {
	display: none;
}

@media(max-width: 767px) {
	.pc {
		display: none;
	}

	.sp {
		display: initial;
	}
}

.user-icon-small {
	border-radius: 50%;
	margin-right: 6px;
}

body .leaflet-popup-content p {
	margin: 3px auto !important;
}

/* ============================================
AIチャット - コンパクト版（メッセージ部分は維持）
============================================ */

.ai-container {
	display: flex;
	gap: 12px;
	max-width: 1600px;
	margin: 0 auto;
}

/* サイドバー */
.ai-sub {
	width: 260px;
	flex-shrink: 0;
	background: var(--ai-sub-bg, #121a16);
	border-radius: 16px;
	border: 1px solid var(--ai-border, #2a3a2e);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ai-sub-header {
	padding: 12px;
	border-bottom: 1px solid var(--ai-border, #2a3a2e);
	background: var(--ai-header-bg, #1a221e);
}

.ai-sub-header h3 {
	margin: 0;
	font-size: 0.9rem;
	color: var(--ai-accent, #c8e6c9);
}

.ai-sub-header p {
	display: none; /* 非表示 */
}

.ai-conversation-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}

.ai-conversation-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	margin-bottom: 4px;
	background: var(--ai-item-bg, #0f1712);
	border-radius: 12px;
	cursor: pointer;
	border: 1px solid transparent;
}

.ai-conversation-icon {
	width: 28px;
	height: 28px;
	background: var(--ai-accent-muted, #2a3a2e);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ai-conversation-info {
	flex: 1;
	min-width: 0;
}

.ai-conversation-title {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--ai-text, #e0e0e0);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ai-conversation-date {
	font-size: 0.65rem;
	color: var(--ai-muted, #a0b8a4);
}

.ai-conversation-delete {
	opacity: 0;
	background: none;
	border: none;
	color: var(--ai-muted, #a0b8a4);
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
}

.ai-conversation-item:hover .ai-conversation-delete {
	opacity: 1;
}

.ai-new-chat {
	margin: 8px;
	padding: 8px;
	background: var(--ai-accent, #388e3c);
	border: none;
	border-radius: 12px;
	color: white;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 0.8rem;
}

/* メインエリア */
.ai-main {
	flex: 1;
	min-width: 0;
	background: var(--ai-main-bg, #0e1a14);
	border-radius: 16px;
	border: 1px solid var(--ai-border, #2a3a2e);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 90vh;
}

/* ヘッダー - コンパクト1行 */
.ai-main-header {
	padding: 6px 12px;
	border-bottom: 1px solid var(--ai-border, #2a3a2e);
	background: var(--ai-header-bg, #1a221e);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
}

.ai-main-header h2 {
	margin: 0;
	font-size: 0.9rem;
	color: var(--ai-accent, #c8e6c9);
	white-space: nowrap;
}

.ai-model-selector {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.ai-model-selector label {
	font-size: 0.7rem;
	color: var(--ai-muted, #a0b8a4);
}

.ai-model-selector select {
	width: auto;
	padding: 3px 6px;
	font-size: 0.7rem;
	background: var(--ai-input-bg, #0f1712);
	border: 1px solid var(--ai-border, #3a5a3e);
	border-radius: 12px;
	color: var(--ai-text, #e0e0e0);
}

.ai-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.ai-controls select,
.ai-controls button {
	padding: 3px 6px;
	font-size: 0.7rem;
	background: var(--ai-input-bg, #0f1712);
	border: 1px solid var(--ai-border, #3a5a3e);
	border-radius: 12px;
	color: var(--ai-text, #e0e0e0);
	cursor: pointer;
}

.ai-search-toggle {
	display: flex;
	align-items: center;
	gap: 3px;
	cursor: pointer;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--ai-input-bg, #0f1712);
	border: 1px solid var(--ai-border, #3a5a3e);
}

.ai-search-toggle input {
	margin: 0;
	width: 11px;
	height: 11px;
	border-radius: 50%;
}

.ai-image-name {
	font-size: 9px;
	color: var(--ai-muted, #a0b8a4);
	max-width: 80px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ========== メッセージエリア（元のスタイルを維持しつつパディングだけ縮小） ========== */
.ai-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ai-message {
	display: flex;
	gap: 10px;
	animation: ai-message-fade-in 0.3s ease;
}

@keyframes ai-message-fade-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ai-message.user {
	flex-direction: row-reverse;
}

.ai-avatar {
	width: 30px;
	height: 30px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1rem;
}

.ai-message.user .ai-avatar {
	background: var(--ai-accent, #388e3c);
}

.ai-message.assistant .ai-avatar {
	background: var(--ai-avatar-assistant, #2a3a2e);
}

.ai-bubble {
	max-width: 75%;
	padding: 8px 12px;
	border-radius: 16px;
	line-height: 1.5;
	font-size: 0.85rem;
}

.ai-message.user .ai-bubble {
	background: var(--ai-accent, #388e3c);
	color: white;
	border-bottom-right-radius: 4px;
}

.ai-message.assistant .ai-bubble {
	background: var(--ai-bubble-assistant, #1a221e);
	color: var(--ai-text, #e0e0e0);
	border-bottom-left-radius: 4px;
	border: 1px solid var(--ai-border, #2a3a2e);
}

/* コードブロック */
.ai-bubble pre {
	margin: 6px 0;
	padding: 8px;
	background: var(--ai-code-bg, #0d1117);
	border-radius: 10px;
	overflow-x: auto;
	font-size: 0.75rem;
}

.ai-bubble code {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.85em;
	padding: 2px 4px;
	background: var(--ai-inline-code, rgba(255,255,255,0.1));
	border-radius: 4px;
}

.ai-bubble pre code {
	background: none;
	padding: 0;
}

/* 入力エリア */
.ai-input-area {
	padding: 10px 12px;
	border-top: 1px solid var(--ai-border, #2a3a2e);
	background: var(--ai-header-bg, #1a221e);
}

.ai-input-wrapper {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.ai-input-wrapper textarea {
	flex: 1;
	min-height: 34px;
	max-height: 120px;
	resize: vertical;
	padding: 8px 12px;
	background: var(--ai-input-bg, #0f1712);
	border: 1px solid var(--ai-border, #3a5a3e);
	border-radius: 18px;
	color: var(--ai-text, #e0e0e0);
	font-size: 0.85rem;
	line-height: 1.4;
}

.ai-input-wrapper textarea:focus {
	outline: none;
	border-color: var(--ai-accent, #66bb6a);
	box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.2);
}

.ai-send-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ai-accent, #388e3c);
	border: none;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ai-status {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 4px;
	padding: 0 4px;
	font-size: 0.65rem;
	color: var(--ai-muted, #a0b8a4);
}

/* 参照元リンク */
.source-links {
	margin-top: 6px;
	padding: 4px 8px;
	font-size: 0.7rem;
	background: var(--ai-code-bg, #0d1117);
	border-radius: 8px;
}

/* 思考中表示 */
.thinking-details {
	margin-bottom: 6px;
	border: 1px solid var(--ai-border, #2a3a2e);
	border-radius: 10px;
	background: var(--ai-item-bg, #0f1712);
}

.thinking-details summary {
	padding: 4px 8px;
	font-size: 0.7rem;
	cursor: pointer;
	color: var(--ai-muted, #a0b8a4);
}

.thinking-content {
	padding: 6px 8px;
	font-size: 0.75rem;
	color: var(--ai-muted, #a0b8a4);
	font-style: italic;
}

.ai-main-header select,
.ai-main-header .ai-model-selector select,
.ai-main-header .ai-controls select {
	width: auto;
	display: inline-block;
	margin-top: 0;
}

/* レスポンシブ */
@media (max-width: 768px) {
	.ai-container {
		flex-direction: column;
		gap: 8px;
	}

	.ai-main {
		flex: auto;
	}
	
	.ai-sub {
		width: 100%;
		max-height: 260px;
	}
	
	.ai-bubble {
		max-width: 85%;
	}
	
	.ai-messages {
		padding: 8px;
		gap: 10px;
	}
	
	.ai-main-header {
		padding: 4px 8px;
	}
	
	.ai-main-header h2 {
		font-size: 0.8rem;
	}
	
	#prompt {
		font-size: 16px;
	}
}

.ai-header-flex {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 8px;
}

.ai-header-right {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* 画像プレビュー */
.ai-image-preview {
	position: relative;
	display: inline-block;
	margin-bottom: 8px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--ai-border, #2a3a2e);
	max-width: 200px;
}

.ai-image-preview img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 150px;
	object-fit: cover;
}

.ai-remove-image {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.7);
	border: none;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
}

.ai-remove-image:hover {
	background: rgba(220, 38, 38, 0.9);
}

/* 画像添付ボタン */
.ai-image-attach-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ai-input-bg, #0f1712);
	border: 1px solid var(--ai-border, #3a5a3e);
	color: var(--ai-muted, #a0b8a4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.2s;
}

.ai-image-attach-btn:hover {
	color: var(--ai-accent, #66bb6a);
	border-color: var(--ai-accent, #66bb6a);
}

/* メッセージ内の画像 */
.ai-message-image {
	display: block;
	max-width: 250px;
	max-height: 250px;
	width: auto;
	height: auto;
	border-radius: 12px;
	margin-bottom: 6px;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: transform 0.2s;
}

.ai-message-image:hover {
	transform: scale(1.02);
}

.ai-message-image:only-child {
	margin-bottom: 0;
}

.ai-drag-overlay {
	transition: opacity 0.2s;
}

.ic-number {
	display: inline-block;
	font-family: "GD-HighwayGothic";
	background-color: white;
	color: green;
	padding: 3px 0 0 0;
	border: solid 2px;
	border-radius: 10px;
	font-weight: 500;
	text-align: center;
	white-space: nowrap;
	width: 45px;
}

.space-6px {
	height: 6px;
}