/* -------------------- */
/* 基本スタイル */
/* -------------------- */
body {
  font-family: sans-serif;
  margin: 50px;
  color: black;
  background-color: #fff;
}

h1 { margin-bottom: 5px; }
p { margin-bottom: 20px; }

/* -------------------- */
/* 入力フォーム・セレクトボックス */
/* -------------------- */
#searchBox, select {
  margin: 10px 0;
  padding: 4px 6px;
  font-size: 1.2em;
  border-radius: 6px;
  border: 1px solid #818181;
  color: #000;
}

select {
  font-size: 0.9em;
  padding: 2px 4px;
  margin-right: 6px;
}

.defaultOption { color: #888; }
select option:not(.defaultOption) { color: black; }

.selectbox-3 {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin: 15px 0 0 0;
}

.selectbox-3::after {
  position: absolute;
  right: 15px;
  width: 10px;
  height: 7px;
  background-color: #787c85;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: '';
  pointer-events: none;
}

.selectbox-3 select {
  appearance: none;
  min-width: 80px;
  height: 2em;
  padding: .3em calc(.6em + 20px) .3em .6em;
  border: 1px solid #8e949f;
  border-radius: 12px;
  background-color: #fff;
  color: #585c65;
  font-size: 0.8em;
  cursor: pointer;
}

#detailedFilters.hidden { display: none !important; }

/* -------------------- */
/* ブックマーク・ボタン */
/* -------------------- */
#button-book {
  margin: 2px 5px;
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  background-color: #5c7ab8;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

#button-book:hover { background-color: #406ec9; }

/* -------------------- */
/* カード全体 */
/* -------------------- */
#copy-container {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scar-card {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 12px;
  background-color: #fff;
  font-size: 14px;
  margin-bottom: 8px;
}

/* ---------- ヘッダー ---------- */
.scar-card .header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px;
  position: relative;
}

/* 名前 */
.scar-card .name {
  font-weight: bold;
  font-size: 22px;
  color: black;
  padding-left: 6px;
  border-left: 4px solid #ccc;
  margin-bottom: 2px;
  margin-right: 10px;
}

/* 種別タグ */
.scar-card .typeTag {
  display: inline-block;
  background-color: #eee;
  color: #333;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* コピーアイコン（ボタン風） */
.scar-card .copy-icon-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  padding: 4px 8px;
  background-color: #eee;
  border-radius: 6px;
  font-size: 0.9em;
  color: #5c7ab8;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}

.scar-card .copy-icon-wrapper i {
  font-size: 1.2em;
}

.scar-card .copy-icon-wrapper:hover {
  transform: scale(1.2);
  color: #3860ff;
  background-color: #e0e0e0;
}

/* ---------- カード内容 ---------- */
.scar-card .card-content p {
  margin: 4px 0;
  line-height: 1.4;
}

/* ---------- ドラマ・決戦テキスト ---------- */
.scar-card .label {
  font-weight: bold;
  display: block; /* 改行を作る */
  margin-left: 8px;
  margin-bottom: 4px;
}

.scar-card .description {
  display: block; /* 改行して下に表示 */
  margin-left: 15px;
  margin-bottom: 12px;
}

/* -------------------- */
/* フィルターボタン・詳細表示 */
/* -------------------- */
.filterButton {
  font-size: 1em;
  padding: 4px 10px;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  border-bottom: 2px solid #ccc;
  position: relative;
}

.filterButton::before {
  content: "▶";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.3s ease;
}

.filterButton.open::before { transform: rotate(90deg); }

/* -------------------- */
/* ページ情報・アイテムリスト */
/* -------------------- */
.info { margin-bottom: 5px; padding: 2px; }
.item { padding: 20px 0; border-bottom: 1px solid #ccc; }

/* -------------------- */
/* トップボタン */
/* -------------------- */
.top-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5em 1em;
  background-color: #fff;
  color: #666;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9em;
  border: 1px solid #666;
}

.top-button::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 10px;
  border-top: 2px solid #666;
  border-right: 2px solid #666;
  transform: rotate(-135deg);
}

/* -------------------- */
/* ダークモードトグルボタン */
/* -------------------- */
.toggle-button-1 {
  position: fixed;
  top: 1.2em;
  right: 1.2em;
  width: 4em;
  height: 2em;
  border-radius: 2em;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 1000;
  font-size: 30px;
}

.toggle-button-1:has(:checked) { background-color: #444; }

.toggle-button-1 .icon {
  position: absolute;
  top: 0.15em;
  left: 0.15em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  transition: left 0.3s;
}

.toggle-button-1 .icon::before { content: "☀️"; }
.toggle-button-1:has(:checked) .icon { left: 2.1em; }
.toggle-button-1:has(:checked) .icon::before { content: "🌙"; }
.toggle-button-1 input { display: none; }
