@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap");

:root {
  --primary-color: #4caf50;
  /* Bright Leaf Green */
  --primary-dark: #388e3c;
  --accent-color: #1972d0;
  /* Request Accent Blue */
  --accent-light: #cddc39;
  /* Fresh Lime Sun-drenched */
  --text-main: #34495e;
  --text-muted: #394958;
  --bg-light: #f9fbf2;
  /* Very Bright Creamy Lime */
  --bg-white: #ffffff;
  --border-color: #e8f5e9;
  --font-main: "Noto Sans JP", "Inter", sans-serif;
  --max-width: 1200px;

  /* UI State Colors - Updated for Bright & Light Forest Theme */
  --status-primary: #4caf50;
  --status-primary-hover: #1972d0;
  /* Hover with Accent Blue */
  --status-primary-dark: #388e3c;
  --status-success: #198754;
  --status-success-hover: #157347;
  --status-success-dark: #146c43;
  --status-success-bg: #d1e7dd;
  --status-success-subtle: #badbcc;
  --status-danger: #dc3545;
  --status-danger-hover: #bb2d3b;
  --status-danger-dark: #b02a37;
  --status-danger-subtle: #ffebee;
  --status-warning: #ffc107;
  --status-warning-bg: #fff3cd;
  --status-warning-subtle: #ffecb5;
  --status-muted: #394958;
  --status-muted-hover: #5c636a;
  --status-muted-dark: #565e64;
  --status-info: #0dcaf0;
  --status-info-dark: #055160;
  --status-info-bg: #cff4fc;
  --status-info-subtle: #b6effb;

  /* Backgrounds */
  --bg-light: #f4f7f6;
  --bg-subtle: #e9ecef;
  --bg-white: #ffffff;
  --bg-admin: #f4f6f9;
  --bg-dark: #343a40;

  /* Member Type Colors */
  --member-municipality: #007bff;
  /* Bright Blue */
  --member-intermediate: #28a745;
  --member-recycler: #fd7e14;
  --member-other: #6c757d;
  --member-admin: #dc3545;
  /* Admin color */

  /* Icon Colors */
  --icon-red: #f40f02;
  --icon-orange: #d24726;
  --icon-green: #1d6f42;
  --icon-blue: #2b579a;

  /* Custom Accents */
  --accent-hover: #1565c0;

  /* Generic Colors */
  --color-white: #ffffff;
  --color-info: #17a2b8;
}

/* Admin Panel - Preserve Original Blue Theme */
.admin-body {
  --primary-color: #0056b3;
  --primary-dark: #004098;
  --status-primary: #0d6efd;
  --status-primary-hover: #0b5ed7;
  --status-primary-dark: #0a58ca;
  --member-municipality: #007bff;
}

/* Member Type Colors */
.text-municipality {
  color: var(--member-municipality) !important;
}

.bg-municipality {
  background-color: var(--member-municipality) !important;
  color: white !important;
}

.text-intermediate {
  color: var(--member-intermediate) !important;
}

.bg-intermediate {
  background-color: var(--member-intermediate) !important;
  color: white !important;
}

.text-recycler {
  color: var(--member-recycler) !important;
}

.bg-recycler {
  background-color: var(--member-recycler) !important;
  color: white !important;
}

.text-other {
  color: var(--member-other) !important;
}

.bg-other {
  background-color: var(--member-other) !important;
  color: white !important;
}

.text-admin {
  color: var(--member-admin) !important;
}

.bg-admin {
  background-color: var(--member-admin) !important;
  color: white !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.6;
}

/* Sticky Footer for main-body */
body.main-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.main-body main {
  flex-grow: 1;
}

.text-required {
  color: var(--status-danger);
  margin-left: 4px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* Header */
header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1565c0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: var(--accent-color);
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
  position: relative;
  padding-bottom: 5px;
}

nav a:hover {
  color: var(--primary-color);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.utility-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  align-items: center;
}

.btn-utility {
  padding: 5px 15px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-utility:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.utility-text {
  padding: 5px 15px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: inline-block;
}

/* Hero Section */
.main-body .hero {
  position: relative;
  height: 500px;
  background: linear-gradient(135deg, #4caf50 0%, #cddc39 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  padding: 20px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.hero p {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.hero-btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent-color);
  color: white;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover {
  background: var(--accent-hover);
  /* Slightly Darker Green */
  transform: translateY(-2px);
}

/* Section Common */
.section {
  padding: 80px 20px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 50px;
  color: var(--primary-dark);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  margin: 15px auto 0;
}

/* Features / Topics */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.4);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img {
  height: 200px;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 3rem;
}

.card-content {
  padding: 24px;
}

.card-content h5 {
  height: 3rem;
  font-size: 1.2rem;
}

.card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: white;
  padding: 50px 20px;
  text-align: center;
}

footer p {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Forms & Auth Pages */
.login-container,
.form-container {
  background: white;
  padding: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 80px auto;
}

.login-container {
  max-width: 500px;
}

.form-container {
  max-width: 500px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--primary-dark);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.list-unstyled li {
  list-style: none;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.error-msg {
  color: var(--status-danger);
  background: var(--status-danger-subtle);
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: center;
}

.utility-links {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

.utility-links a {
  color: var(--text-muted);
  text-decoration: underline;
}

.utility-links a:hover {
  color: var(--primary-color);
}

.success-message {
  text-align: center;
}

.success-icon {
  font-size: 4rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

/* Board specific (used in matchboard.php) */
.board-list {
  display: grid;
  gap: 20px;
}

.board-item {
  background: white;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: 0.3s;
}

.board-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.board-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.badge {
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent-color);
  color: white;
  padding: 15px 25px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Admin Panel Styles */
.admin-body {
  background-color: var(--bg-admin);
}

.admin-header {
  background: var(--bg-dark) !important;
  border-bottom: none !important;
}

.admin-header .logo {
  color: white !important;
}

.admin-header nav a {
  color: rgba(255, 255, 255, 0.8) !important;
}

.admin-header nav a:hover {
  color: white !important;
}

.admin-badge {
  background: var(--status-danger);
  color: var(--bg-white);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 70px);
  /* Adjust based on header height */
}

.admin-sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  flex-shrink: 0;
}

.admin-sidebar ul {
  list-style: none;
}

.admin-sidebar a {
  display: block;
  padding: 12px 20px;
  color: var(--text-main);
  font-weight: 500;
  border-left: 3px solid transparent;
}

.admin-sidebar a i {
  width: 20px;
  text-align: center;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--bg-light);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.admin-main {
  flex-grow: 1;
  padding: 30px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  display: block;
  /* Block layout for forms/tables */
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-dark);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Small Horizontal Card */
.card-sm {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* Stretch to fill height */
}

.card-sm .card-img {
  width: 120px;
  height: auto;
  /* Allow auto height */
  min-height: 120px;
  flex-shrink: 0;
}

.card-sm .card-content {
  padding: 15px;
  flex-grow: 1;
}

.card-sm h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card-sm p {
  font-size: 1rem;
  margin-bottom: 0;
}

/* Download List (dl_list1.php) */
.main-body .hero.hero-short,
.hero.hero-short {
  height: 200px;
  background-position: center bottom;
}

/* Board pages */
.main-body .hero.hero-board,
.hero.hero-board {
  height: 300px;
  background-position: center bottom;
}

.dl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.dl-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dl-icon {
  font-size: 2.5rem;
  width: 60px;
  text-align: center;
}

/* Download Icon Colors */
.dl-icon.icon-red {
  color: var(--icon-red);
}

.dl-icon.icon-orange {
  color: var(--icon-orange);
}

.dl-icon.icon-green {
  color: var(--icon-green);
}

.dl-icon.icon-blue {
  color: var(--icon-blue);
}

.dl-title {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.dl-meta {
  color: var(--text-muted);
  margin: 0;
}

.hero-btn.btn-sm-custom {
  font-size: 0.9rem;
  padding: 10px 20px;
}

/* Profile Edit */
.w-30p {
  width: 30% !important;
}

.w-300 {
  width: 300px !important;
}

.bg-changed {
  background-color: var(--status-warning-bg) !important;
}

.input-disabled {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 4px;
}

.btn-blue {
  background-color: var(--member-municipality) !important;
}

.btn-blue:hover {
  background-color: var(--status-primary-hover) !important;
}

.bg-theme-light {
  background-color: var(--bg-light) !important;
}

/* Refactored Utility Classes (2026-02-19) */
/* Index & Cards */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Board & Posts */
.post-container {
  max-width: 800px;
  margin: 0 auto;
}

.text-center-mt30 {
  text-align: center;
  margin-top: 30px;
}

.btn-plain {
  border: none;
  cursor: pointer;
}

.post-actions {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 15px;
}

.reply-form-container {
  margin-top: 15px;
  background: var(--bg-light);
  padding: 15px;
  border-radius: 4px;
}

.replies-container {
  margin-top: 20px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.reply-meta {
  font-size: 0.85rem;
}

.btn-reply {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-reply-action {
  color: var(--primary-color);
  font-weight: 500;
}

.btn-edit-action {
  color: var(--text-muted);
}

.btn-edit-action:hover {
  color: var(--primary-color);
}

.textarea-sm {
  min-height: 80px !important;
}

.btn-primary-theme {
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
}

.reply-text {
  font-size: 0.95rem;
}

/* Header & Admin */
.header-container-fluid {
  max-width: 100% !important;
  padding: 0 30px !important;
}

.admin-user-info {
  color: rgba(255, 255, 255, 0.8);
  margin-right: 15px;
  font-size: 0.9rem;
}

.btn-outline-white {
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: white !important;
}

.icon-mr {
  margin-right: 10px;
}

/* Auth / Password Reset */
.btn-link-block {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

/* Admin Specific */
.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.admin-title {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin: 0;
}

.admin-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Utilities */
.flex-column {
  flex-direction: column !important;
}

.mw-900 {
  max-width: 900px !important;
}

.mw-300 {
  max-width: 300px !important;
}

.w-80 {
  width: 80px !important;
}

.w-100px {
  width: 100px !important;
}

.w-120 {
  width: 120px !important;
}

.w-150 {
  width: 150px !important;
}

.bg-danger {
  background-color: var(--status-danger) !important;
}

.bg-info {
  background-color: var(--color-info) !important;
}

/* Board Post ID Display */
.post-id-text {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.8rem;
  color: var(--bg-subtle);
  user-select: text;
}

/* News & Topics */
.news-section {
  background-color: var(--bg-white);
}

.news-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.4);
  align-items: baseline;
  gap: 20px;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 100px;
  font-family: "Inter", sans-serif;
}

.news-title-link {
  font-weight: 500;
  color: var(--text-main);
  flex-grow: 1;
}

.news-title-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.news-detail-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
}

.news-detail-header {
  margin-bottom: 40px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 20px;
}

.news-detail-date {
  font-size: 1rem;
  display: block;
  margin-bottom: 10px;
}

.news-detail-title {
  font-size: 2.2rem;
  color: var(--primary-dark);
}

.news-detail-content {
  line-height: 1.8;
  font-size: 1.1rem;
  white-space: pre-wrap;
  margin-bottom: 60px;
}

.news-detail-content a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: 500;
}

.news-detail-content a:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

/* 掲示板のリンク装飾 */
.board-item p a,
.reply-text a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: 500;
}

.board-item p a:hover,
.reply-text a:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.news-navigation {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

/* Custom Checkbox Design */
.form-check {
  display: flex;
  align-items: center;
  min-height: 1.5rem;
  padding-left: 0;
  margin-bottom: 0.5rem;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #cbd5e0;
  background-color: var(--bg-white);
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  margin: 0;
  flex-shrink: 0;
}

/* Checkbox specific */
.form-check-input[type="checkbox"] {
  border-radius: 4px;
}

.form-check-input[type="checkbox"]:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 75%;
}

/* Radio specific */
.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked {
  border-color: var(--primary-color);
}

.form-check-input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.25);
  border-color: var(--primary-color);
}

.admin-body .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.form-check-input:disabled {
  background-color: var(--bg-subtle);
  border-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-check-label {
  cursor: pointer;
  vertical-align: middle;
  margin-left: 8px;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.25rem;
}

.form-check-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 1.5rem;
}

.form-check-inline .form-check-input {
  margin-right: 0.5rem;
}

/* Admin Components */
.form-check.is-disabled {
  background-color: var(--bg-light);
  padding: 10px 15px;
  border-radius: 6px;
  border: 1px dashed var(--border-color);
  opacity: 0.7;
  cursor: not-allowed;
  transition: all 0.3s ease;
}

.form-check.is-disabled .form-check-label {
  color: var(--status-muted) !important;
  font-weight: 500;
}

.form-check.is-disabled .form-check-input {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Custom Search Bar - Modern & Compact Pill Design */
.search-bar {
  max-width: 100%;
  margin: 0 auto 35px;
}

.search-bar-inner {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 7px 7px 7px 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  gap: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar-inner:hover,
.search-bar-inner:focus-within {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.search-field {
  display: flex;
  flex-direction: column;
  flex: 1;
  border-right: 1px solid #f0f0f0;
  padding-right: 15px;
}

.search-field:nth-last-child(2) {
  border-right: none;
}

.search-field label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1px;
  letter-spacing: 0.08em;
}

.search-field select,
.search-field input {
  border: none;
  padding: 0;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--text-main);
  font-weight: 500;
  height: 24px;
  line-height: normal;
}

.search-field select {
  cursor: pointer;
  appearance: none;
}

.search-field input::placeholder {
  color: #cbd5e0;
  font-weight: 400;
}

.search-btn-container {
  flex-shrink: 0;
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: rotate(15deg) scale(1.1);
  box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.search-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.search-reset-link:hover {
  color: var(--status-danger);
  transform: translateX(-3px);
}

@media (max-width: 992px) {
  .search-bar-inner {
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 20px;
  }

  .search-field {
    min-width: 45%;
    margin-bottom: 15px;
    border-right: none;
  }

  .search-field:nth-child(odd) {
    border-right: 1px solid #f0f0f0;
  }

  .search-field:nth-last-child(2) {
    min-width: 100%;
    margin-bottom: 10px;
    border-right: none;
  }

  .search-btn-container {
    width: 100%;
  }

  .search-btn {
    width: 100%;
    border-radius: 10px;
    height: 48px;
  }
}

@media (max-width: 576px) {
  .search-field {
    min-width: 100%;
    border-right: none !important;
    margin-bottom: 15px;
  }
}

/* Thread Navigation - Quick jump between threads */
.thread-nav {
  position: absolute;
  top: 10px;
  left: -42px;
  /* 枠の左外側に配置 */
  display: flex;
  flex-direction: column;
  z-index: 10;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.board-item:hover .thread-nav {
  opacity: 1;
}

.thread-nav-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  /* 角を少し丸める */
  margin-bottom: 2px;
}

.thread-nav-btn:hover {
  background: var(--bg-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
  z-index: 11;
  transform: scale(1.1);
}

@media (max-width: 1400px) {
  .thread-nav {
    left: -1px;
    top: -1px;
  }

  .thread-nav-btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    border-bottom: none;
  }

  .thread-nav-btn:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

@media (max-width: 768px) {
  .thread-nav {
    opacity: 1;
    left: 5px;
    top: 5px;
  }

  .thread-nav-btn {
    width: 40px;
    height: 38px;
    font-size: 1rem;
    border-radius: 8px !important;
    margin-bottom: 5px;
  }
}