.page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  margin: 0 0 22px;
}

.search-wrap { margin: 0 0 18px; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 6px 0 16px;
  background: #f1f8f4;
  border: 1.5px solid #c8e6c9; border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
body.dark .search-box {
  background: #0d1a12;
  border-color: #2e4a36;
}
.search-box:focus-within {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.22);
}
body.dark .search-box:focus-within {
  border-color: #81c784;
  box-shadow: 0 0 0 3px rgba(129, 199, 132, 0.22);
}
.search-box .search-icon { flex-shrink: 0; display: flex; align-items: center; color: #4a6350; }
body.dark .search-box .search-icon { color: #8fb89a; }

.search-box input[type="search"] {
  flex: 1; align-self: stretch; min-width: 0;
  margin: 0; padding: 0 8px 0 0;
  border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
  min-height: 0 !important;
  -webkit-appearance: none; appearance: none;
  font-family: inherit; font-weight: 500;
  color: #1b2e1f; outline: none;
}
.search-box input[type="search"]::-webkit-search-cancel-button,
.search-box input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; display: none; }
body.dark .search-box input { color: #e0f0e4; }
.search-box input::placeholder { color: #4a6350; font-weight: 450; }
body.dark .search-box input::placeholder { color: #8fb89a; }

.search-clear {
  border: none; background: rgba(74, 99, 80, 0.15);
  color: #4a6350; width: 36px; height: 36px; min-width: 36px; min-height: 36px; border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s, color 0.15s;
}
body.dark .search-clear {
  background: rgba(143, 184, 154, 0.2);
  color: #8fb89a;
}
.search-clear:hover {
  background: rgba(198, 40, 40, 0.25);
  color: #c62828;
}
body.dark .search-clear:hover {
  color: #ef9a9a;
}
.search-clear.visible { display: inline-flex; }

.search-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.search-count { font-size: 0.82rem; color: #4a6350; font-weight: 500; }
.search-count:not(:empty) { margin-top: 10px; }
body.dark .search-count { color: #8fb89a; }
.search-count strong { color: #2e7d32; font-weight: 700; }
body.dark .search-count strong { color: #81c784; }

.cat.cat-hidden, .item-card.item-hidden { display: none !important; }
.no-results {
  text-align: center; padding: 28px 16px; color: #4a6350;
  font-size: 0.95rem; display: none;
}
body.dark .no-results { color: #8fb89a; }
.no-results.visible { display: block; }

.icon {
  display: inline-block; width: 1.15em; height: 1.15em;
  vertical-align: -0.18em; flex-shrink: 0;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.cat-toggle .cat-label {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px 6px; min-width: 0;
}
.cat-label .icon { margin-right: 0; vertical-align: 0; }
.cat-label > span:not(.copy-link-btn) { line-height: 1.2; }
.item-name > .icon { margin-right: 6px; vertical-align: -0.2em; }
.banner > .icon { margin-right: 6px; vertical-align: -0.2em; }
.links-grid a .icon {
  width: 1em; height: 1em;
  vertical-align: -0.15em;
  margin-right: 3px; opacity: 0.9;
}

.copy-link-btn {
  background: #ffffff;
  border: 1px solid #c8e6c9;
  box-sizing: border-box;
  width: 30px; height: 28px; padding: 0;
  margin-left: 4px;
  color: #4a6350;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 6px;
  transition: all 0.15s;
  vertical-align: middle;
}
body.dark .copy-link-btn {
  background: #15251a;
  border-color: #2e4a36;
  color: #e0f0e4;
}
.copy-link-btn:hover {
  color: #2e7d32;
  background: #c8e6c9;
  border-color: #2e7d32;
}
body.dark .copy-link-btn:hover {
  color: #81c784;
  background: #1e3324;
  border-color: #81c784;
}
.copy-link-btn svg { width: 14px; height: 14px; }

body.dark .sp-btn {
  border: 1px solid #2e4a36;
  color: #e0f0e4;
}

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1b2e1f; color: #ffffff;
  padding: 10px 20px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}
body.dark .toast {
  background: #e0f0e4; color: #0d1a12;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.item-card.highlight {
  animation: flash-bg 2s ease-out;
}
@keyframes flash-bg {
  0% { background-color: #c8e6c9; border-color: #2e7d32; }
  100% { background-color: #ffffff; border-color: #c8e6c9; }
}
body.dark .item-card.highlight {
  animation: flash-bg-dark 2s ease-out;
}
@keyframes flash-bg-dark {
  0% { background-color: #1e3324; border-color: #81c784; }
  100% { background-color: #15251a; border-color: #2e4a36; }
}
