/* bklang.net — fast local CSS (no Tailwind/font CDN) */
:root {
  --card-padding: 1.25rem;
  --card-radius: 0.75rem;
  --frosted-glass-blur: 12px;
  --primary: #416d9d;
  --primary-600: #305580;
  --primary-700: #254267;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: #1f2937;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Apple SD Gothic Neo", "Malgun Gothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #edf1f7;
  position: relative;
}
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -10;
  background: linear-gradient(145deg, #c7d7ea 0%, #e8eef6 42%, #d5e4d8 100%);
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #edf1f7; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #c3d0e3; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #416d9d; }

.site-card {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  border-radius: var(--card-radius);
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  contain: layout style;
}
.site-card-content { padding: var(--card-padding); }
.site-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  z-index: 10;
  border: 1px solid #416d9d;
}
.site-card:not(.style-2) .site-icon { width: 2.5rem; margin-right: 1rem; }
.site-card:not(.style-2) .site-title { transform-origin: left center; }

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}
.copy-success-animation { animation: fadeInOut 1.4s ease forwards; }

.line-clamp-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word;
}

.frosted-glass-effect {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(var(--frosted-glass-blur)) !important;
  -webkit-backdrop-filter: blur(var(--frosted-glass-blur)) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}
.frosted-glass-effect:hover {
  background: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12) !important;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  height: 2.5rem;
}
.nav-btn.inactive {
  background-color: rgba(255, 255, 255, 0.7);
  color: #374151;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.nav-btn.inactive:hover { background-color: white; color: #2563eb; }
.nav-btn.active {
  background-color: #2563eb;
  color: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.search-engine-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color .15s ease;
  opacity: 0.9;
  font-weight: 500;
  color: #1f2937;
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.search-engine-option:hover { background-color: rgba(255, 255, 255, 0.85); opacity: 1; }
.search-engine-option.active {
  color: #2563eb;
  background-color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  opacity: 1;
}

.site-title { font-size: 16px; color: #111827 !important; margin: 0; }
.site-card p { font-size: 14px; margin: 0; }

.site-icon-letter {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #254267;
  background: #e1e7f1;
}

.topbar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 24px);
}
.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.lang-switch a {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #374151;
  text-decoration: none;
  font-weight: 600;
}
.lang-switch a.on { background: #2563eb; color: #fff; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border: 0;
  font: inherit;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
}
.chip-btn:hover { background: #fff; color: #2563eb; }

.main-content { min-height: 100vh; }
.home-pad { padding: 72px 16px 32px; }
.search-wrap { position: relative; max-width: 36rem; margin: 0 auto 1.5rem; }
.engine-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  user-select: none;
  flex-wrap: wrap;
}
.search-box { position: relative; }
.search-input-target {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  outline: none;
  font: inherit;
  font-size: 1rem;
}
.search-input-target:focus {
  border-color: #9cb3d1;
  box-shadow: 0 0 0 3px rgba(65,109,157,.18);
}
.search-ico {
  position: absolute;
  left: 16px;
  top: 14px;
  width: 24px;
  height: 24px;
  color: #9ca3af;
  pointer-events: none;
}
.cat-wrap { max-width: 64rem; margin: 0 auto 1.25rem; }
#horizontalCategoryNav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}
.sites-wrap { max-width: 72rem; margin: 0 auto; }
.sites-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  justify-items: center;
}
@media (min-width: 768px) {
  .sites-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (min-width: 1024px) {
  .sites-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.flex { display: flex; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.block { display: block; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); }
.text-accent-700 { color: #265c44; }
.bg-accent-100 { background: #d9f0e5; }
.bg-secondary-100 { background: #f6ede1; }
.font-medium { font-weight: 500; }
.leading-relaxed { line-height: 1.625; }
.inline-flex { display: inline-flex; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.max-w-140 { max-width: 140px; }
.page-footer {
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.875rem;
  color: #374151;
}
.page-footer a { color: #374151; text-decoration: none; }
.page-footer a:hover { color: #2563eb; }
.copy-btn { border: 0; cursor: pointer; font: inherit; }
.hidden { display: none !important; }

.auth-panel {
  max-width: 420px;
  margin: 4rem auto;
  padding: 1.5rem;
  border-radius: 1rem;
}
.auth-panel label { display: block; font-size: 0.875rem; color: #374151; margin-bottom: 0.35rem; }
.auth-panel input, .auth-panel select, .auth-panel textarea {
  width: 100%;
  margin-bottom: 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #c3d0e3;
  border-radius: 0.5rem;
  background: rgba(255,255,255,.9);
  font: inherit;
}
.auth-panel .error {
  background: #fee2e2; color: #b91c1c; padding: 0.6rem 0.75rem;
  border-radius: 0.5rem; margin-bottom: 0.75rem; font-size: 0.875rem;
}
.btn-primary-solid {
  display: inline-flex; align-items: center; justify-content: center;
  background: #416d9d; color: #fff; border: 0; border-radius: 0.5rem;
  padding: 0.65rem 1rem; font-weight: 600; cursor: pointer; font: inherit;
  text-decoration: none;
}
.btn-primary-solid:hover { filter: brightness(1.05); color: #fff; text-decoration: none; }

@media (max-width: 410px) {
  .site-card .site-card-content { padding: 0.75rem !important; }
  .copy-text { display: none; }
  .copy-btn svg { margin-right: 0 !important; }
}

.visit-line {
  margin: 0.35rem 0 0;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.02em;
}
