:root {
	--ai-sub-bg: #121a16;
	--ai-main-bg: #0e1a14;
	--ai-border: #2a3a2e;
	--ai-header-bg: #1a221e;
	--ai-accent: #388e3c;
	--ai-accent-hover: #43a047;
	--ai-accent-muted: #2a3a2e;
	--ai-text: #e0e0e0;
	--ai-muted: #a0b8a4;
	--ai-item-bg: #0f1712;
	--ai-item-hover: #1a2a1e;
	--ai-item-active: #1e3a1e;
	--ai-input-bg: #0f1712;
	--ai-bubble-assistant: #1a221e;
	--ai-avatar-assistant: #2a3a2e;
	--ai-code-bg: #0d1117;
	--ai-inline-code: rgba(255,255,255,0.1);
	--ai-danger: #4a1e1e;
	--ai-danger-text: #ef9a9a;
}

/* 全体のベースカラー */
body {
	background: #0e1a14;
	color: #e0e0e0;
}

.logo a {
	color: #c8e6c9;
}

/* メイン領域 */
main {
	background: #0e1a14;
}

/* フッター */
footer {
	background: #1a221e;
	color: #a0b8a4;
}

.footer-content h3 {
	color: #c8e6c9;
}

.footer-links a,
a.footer-link-license {
	color: #a5d6a7;
}

.footer-links a:hover,
a.footer-link-license:hover {
	color: #c8e6c9;
}

.copyright {
	border-top-color: #2a3a2e;
	color: #a0b8a4;
}

/* ナビゲーションメニュー（モバイル展開時） */
@media (max-width: 767px) {
	.navbar {
		backdrop-filter: blur(10px);
	}
	.nav-menu a {
		border-bottom-color: rgba(200, 230, 201, 0.1);
	}
}

/* テーブル関連 */
table,
tr,
th,
td {
	border-color: #3a5a3e;
}

hr {
	background: #2a3a2e;
}

/* 引用ブロック */
blockquote {
	background-color: #1a2a1e;
	border-left-color: #4caf50;
	box-shadow: 0px 5px 5px -4px rgba(0, 0, 0, 0.3);
}

/* 目次（TOC） */
.toc {
	background-color: #1a2a1e;
	border-left-color: #4caf50;
	box-shadow: 0px 5px 5px -4px rgba(0, 0, 0, 0.3);
}

.toc a {
	color: #81c784;
}

/* リンク */
a {
	color: #66bb6a;
}

a:hover {
	color: #a5d6a7;
}

/* テキストカラークラス */

.text-default {
	color: #e0e0e0;
}

/* 検索結果 */
.search-snippet {
	color: #a0b8a4;
}

.search-results mark {
	background: #81c784;
	color: #1a2a1e;
}

.search-form input,
.search-form select {
	background: #1a221e;
	color: #e0e0e0;
	border: 1px solid #3a5a3e;
}

.search-form input:focus,
.search-form select:focus {
	border-color: #66bb6a;
	box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.2);
}

/* ボタン */
button,
.btn {
	background: #388e3c;
	color: #fff;
}

.btn.outline {
	background: transparent;
	color: #66bb6a;
	border-color: #66bb6a;
}

.btn.outline:hover {
	background: #388e3c;
	color: #fff;
}

/* タイル */
.tile {
	background: #121a16;
	border-color: #2a3a2e;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tile h2,
.tile h2 a,
.tile h3,
.tile h3 a {
	color: #c8e6c9;
}

.tile p {
	color: #a0b8a4;
}

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

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

/* タイルの特殊背景色 */
.tile.logout {
	background-color: #2a1e1e;
	border-color: #4a2a2a;
}

.tile.admin {
	background-color: #1a2e1e;
	border-color: #2a4a2e;
}

.tile.notice-admin {
	background-color: #2a2e1e;
	border-color: #4a4a2a;
}

/* 通知アイテム */
.notice-item {
	background: #121a16;
	border-color: #2a3a2e;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.notice-item h3 {
	color: #c8e6c9;
}

.notice-item p {
	color: #a0b8a4;
}

/* アラート */
.alert {
	background: #1a221e;
	color: #f0f0f0;
}

.alert.error {
	background: #a52a2a;
}

.alert.warning {
	background: #b8860b;
	color: #fff;
}

.alert.success {
	background: #2e7d32;
}

.alert.info {
	background: #0f6b7a;
}

.alert2 {
	background: #1a221e;
	border-color: #0e1a14;
}

/* 詳細/要約要素 */
details {
	background: #0f1712;
	border-color: #2a3a2e;
}

details:hover {
	border-color: #66bb6a;
	box-shadow: 0 2px 8px rgba(102, 187, 106, 0.2);
}

summary {
	background: #0f1812;
	color: #81c784;
}

summary:hover {
	background: #1a2a1e;
}

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

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

details details {
	background: #1a2220;
}

details details summary {
	background: #2a3a2e;
	color: #a5d6a7;
}

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

/* 入力フォーム関連 */
.input,
select,
option,
textarea {
	background-color: #0f1712;
	color: #e0e0e0;
	border-color: #203122;
}

input[type="file"]::file-selector-button {
	background: #388e3c;
	color: #fff;
	border-color: #66bb6a;
}

input[type="file"]::file-selector-button:hover {
	background: #2a3a2e;
	color: #c8e6c9;
}

::picker(select) {
	border: 1.5px solid #3a5a3e;
	background-color: #0f1712;
}

option:hover {
	background-color: #2e4a2e;
	color: #81c784;
}

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

optgroup {
	color: #c8e6c9;
}

option:checked {
	background-color: #388e3c;
	color: #ffffff;
}

.input:focus,
select:focus,
textarea:focus {
	border-color: #66bb6a;
	box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.2);
}

.input-label {
	color: #a5d6a7;
}

/* チェックボックス/ラジオボタン */
.input[type="checkbox"],
.input[type="radio"] {
	border-color: #66bb6a;
	background-color: #1a221e;
}

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

.input[type="radio"]:checked::after {
	background-color: #66bb6a;
}

/* スライダートグル */
.slider {
	background: #3a5a3e;
}

input:checked + .slider {
	background: #66bb6a;
}

/* プロフィールカード */
.profile-container {
	background-color: #121a16;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.profile-header {
	background-color: #2e7d32;
}

.profile-other {
	color: #a0b8a4;
}

.profile-body li {
	color: #c8e6c9;
}

.profile-footer {
	border-top-color: #2a3a2e;
}

.login-date {
	color: #a0b8a4;
}

/* 現地調査・詳細セクション */
.detail-section {
	background: #131d18;
	border-color: #2a3a2e;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.detail-section h2 {
	border-bottom-color: #4caf50;
	color: #c8e6c9;
}

.detail-section table th,
.detail-section table td {
	border-bottom-color: #2a3a2e;
}

.detail-section table th {
	color: #a5d6a7;
}

.detail-section .tile {
	background: #131d18;
	border-color: #111a15;
	color: #a0b8a4;
}

.detail-section .tile h3 {
	color: #e8f5e9;
}

.detail-user {
	color: #a0b8a4;
}

/* バッジ（状態・データ） */
.badge.status-0 { background: #1e3a1e; color: #c8e6c9; }
.badge.status-1 { background: #4a3a1e; color: #ffe0b2; }
.badge.status-2 { background: #2a2a2a; color: #ccc; }
.badge.status--1 { background: #4a1e1e; color: #ef9a9a; }
.badge.status--2 { background: #2a2a2a; color: #aaa; }
.badge.status-3 { background: #1e3a4a; color: #b3e5fc; }
.badge.data--1 { background: #4a3a1e; color: #ffe0b2; }
.badge.data-0 { background: #1e3a1e; color: #c8e6c9; }
.badge.user-0 { background: #1a3a1e; color: #a3d9a5; }
.badge.user-1 { background: #3d3518; color: #ffd54f; }
.badge.user--1 { background: #3d3200; color: #ffe082; }
.badge.user--2 { background: #3d1a1a; color: #ef9a9a; }
.badge.user--3 { background: #2a2a2a; color: #b0b0b0; }

/* サーベイタブ */
.survey-tabs {
	border-bottom-color: #2a3a2e;
}

.survey-tab {
	color: #a0b8a4;
}

.survey-tab:hover {
	color: #a5d6a7;
	background: rgba(165, 214, 167, 0.1);
}

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

/* テーブルコンテナ（横スクロール） */
.table-container {
	border-color: #2a3a2e;
}

.table-container th {
	background: #1a221e;
	color: #a5d6a7;
}

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

/* ユーザーページ関連 */
.user-description {
	background: #1a221e;
}

.user-surveys {
	border-top-color: #2a3a2e;
}

/* サイドバー（右カラム） */
.right {
	background-color: #121a16;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.right h2 {
	border-color: #66bb6a;
	background-color: #1a221e;
}

/* マップコンテナ */
#map {
	background: #1a221e;
}

/* モーダル */
.modal {
	background: rgba(0, 0, 0, 0.85);
}

.modal-content {
	background: #0a140f;
}

.modal-header {
	border-bottom-color: #2a3a2e;
}

.modal-close {
	color: #a5d6a7;
}

.modal-close:hover {
	background-color: #c62828;
	color: #fff;
}

/* カレンダー */
.cal-month-year {
	color: #c8e6c9;
}

.cal-month-year:hover {
	background: rgba(200, 230, 201, 0.05);
}

.cal-month-grid {
	background: #1a221e;
}

.cal-month-btn {
	color: #a5d6a7;
}

.cal-month-btn:hover {
	background: rgba(200, 230, 201, 0.05);
	color: #e8f5e9;
}

.cal-month-btn.active {
	background: #4caf50;
	color: #fff;
}

.cal-weekdays {
	color: #81a884;
}

.cal-day {
	color: #e0e0e0;
}

.cal-day:hover {
	background: #1e2e1e;
}

.cal-day.today {
	border-color: #81c784;
	color: #81c784;
}

.cal-day.selected {
	background: #388e3c !important;
	border-color: #388e3c;
	color: #fff;
}

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

.cal-day.saturday {
	color: #90caf9;
}

.cal-footer {
	border-top-color: #2a3a2e;
}

.cal-grid-scroll {
	background: #1a221e;
}

.cal-year-btn {
	color: #a5d6a7;
}

.cal-year-btn:hover {
	background: rgba(200, 230, 201, 0.05);
	color: #e8f5e9;
}

.cal-year-btn.active {
	background: #4caf50;
	color: #fff;
}

.cal-select-title {
	color: #c8e6c9;
}

/* テキスト選択ポップアップ */
#text-selection-popup {
	background: #1e2e1e;
	border-color: #2e4a2e;
}

#text-selection-popup button {
	color: #e8f5e9;
}

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

/* メモポップアップ */
#edit-memo-popup {
	background: #2a2e1e;
	border-color: #8a9a3e;
	color: #e0e0e0;
}

/* 画像オーバーレイ（ズーム表示） */
.img-overlay {
	background: rgba(0, 0, 0, 0.85);
}

.img-overlay small {
	background: rgba(0, 0, 0, 0.5);
	color: #c8e6c9;
}

/* その他補足 */
.credit-user {
	border-color: #3a5a3e;
}

.a-license {
	color: #a5d6a7;
}

.a-license:hover {
	color: #c8e6c9;
}

.tile.flex .thumbnail {
	background: #1a221e;
}

.tile.flex .info h3 {
	color: #c8e6c9;
}

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

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

.tile.flex .icon-info span {
	color: #e0e0e0;
}

#chat-container {
	background: #1a2a1f;
	border-color: #2a3a2f;
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#messages {
	background: #1a2a1f;
}

.assistant .avatar {
	background: #2a3a2f;
	color: #ccc;
}

.assistant .message-content {
	background: #223322;
	color: #e0e0e0;
}

.message-content h1,
.message-content h2,
.message-content h3 {
	color: #e0e0e0;
}

.message-content code {
	background: rgba(255,255,255,0.1);
}

.message-content pre {
	background: #0d1117;
	color: #d4d4d4;
}

.message-content a {
	color: #7eb8ff;
}

.user .message-content a {
	color: #fff;
}

.user .message-content code {
	background: rgba(255,255,255,0.2);
}

.thinking-details {
	border-color: #2a3a2f;
	background: #1a2a1f;
}

.thinking-details summary {
	color: #888;
}

.thinking-details[open] summary {
	border-bottom-color: #2a3a2f;
	background: #223322;
}

.thinking-content {
	color: #999;
}

.input-area {
	background: #1a2a1f;
	border-top-color: #2a3a2f;
}

#prompt {
	background: #223322;
	border-color: #2a3a2f;
	color: #e0e0e0;
}

#prompt::placeholder {
	color: #666;
}

#clearBtn {
	background: #2a3a2f;
	color: #999;
}

#clearBtn:hover {
	background: #3a4a3f;
}

#sendBtn:disabled {
	background: #3a3a3a;
}

.source-links {
	background: #1a2a3f;
	border-left-color: #7eb8ff;
	color: #999;
}

.source-links a {
	color: #7eb8ff;
}