@charset "UTF-8";
@import url("grid.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap");

/* ===================================
   CSS Custom Properties
=================================== */
:root {
  --cream:       #faf7f2;
  --warm-white:  #f5f0e8;
  --parchment:   #ede8dc;
  --sand:        #d4c9b0;
  --oak:         #8b7355;
  --mahogany:    #6b4c35;
  --deep-brown:  #3d2b1f;
  --ink:         #1a1108;
  --sage:        #5a7a5e;
  --sage-light:  #7a9e7e;
  --sage-pale:   #e8f0e9;
  --gold:        #c49a2f;
  --gold-light:  #e8c86e;
  --gold-pale:   #fdf5e0;
  --red-accent:  #8b3a2a;
  --sky:         #4a7fa5;
  --sky-pale:    #e5f0f8;
  --shadow-soft: 0 2px 16px rgba(61,43,31,.08);
  --shadow-card: 0 4px 24px rgba(61,43,31,.12);
  --shadow-deep: 0 8px 40px rgba(61,43,31,.18);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --transition:  all .25s cubic-bezier(.4,0,.2,1);
  --font-serif:  'Playfair Display','Noto Serif JP',Georgia,serif;
  --font-sans:   'Noto Sans JP','Hiragino Kaku Gothic Pro',Meiryo,sans-serif;
}

/* ===================================
   Base Reset & Typography
=================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--cream);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===================================
   Links
=================================== */
a {
  color: var(--mahogany);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--oak);
}

/* ===================================
   Header
=================================== */
header {
  background-color: var(--deep-brown);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139,115,85,.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(107,76,53,.2) 0%, transparent 60%);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-deep);
}

header .container {
  padding: 0 2rem;
}

.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 0;
  gap: 1rem;
}

.header h1 {
  margin: 0;
  font-size: 2.0rem;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.3;
  flex: 1;
}

.header h1 a {
  color: var(--warm-white);
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.header h1 a::before {
  content: '📚';
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.header h1 a .site-title-jp {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.2rem;
}

.header h1 a .site-title-en {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold-light);
  display: block;
  letter-spacing: .1em;
}

.telbox {
  width: auto;
  padding: 0;
  font-size: 1.4rem;
}

.telbox a {
  color: var(--gold-light);
  text-decoration: none;
  border: 1px solid rgba(232,200,110,.4);
  padding: .5rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 1.3rem;
  letter-spacing: .05em;
  white-space: nowrap;
}

.telbox a:hover {
  background-color: rgba(232,200,110,.15);
  border-color: var(--gold-light);
  color: #fff;
}

/* ===================================
   Navigation (Mobile)
=================================== */
nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: .8rem 0;
  background-color: var(--mahogany);
}

nav li {
  display: block;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

nav li:last-child {
  border-bottom: none;
}

nav li a {
  display: block;
  color: var(--warm-white);
  text-decoration: none;
  padding: 1.2rem 2rem;
  font-size: 1.5rem;
  transition: var(--transition);
}

nav li a:hover {
  background-color: rgba(255,255,255,.1);
  padding-left: 2.8rem;
}

/* Hamburger buttons */
#open, #close {
  cursor: pointer;
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  background: none;
  border: none;
  padding: .4rem;
}

#open img, #close img {
  width: 36px;
  height: 36px;
  filter: brightness(10);
}

@media screen and (min-width: 769px) {
  #open, #close { display: none !important; }
  #navi { display: block !important; }
}

@media screen and (max-width: 768px) {
  #open, #close {
    display: block;
  }
  #navi { display: none; }

  .header {
    padding: 1.2rem 0;
    padding-right: 5rem;
  }

  .header h1 a .site-title-jp {
    font-size: 1.8rem;
  }

  .header h1 a::before {
    font-size: 2rem;
  }
}

/* ===================================
   Breadcrumb
=================================== */
.breadcrumb {
  list-style: none;
  padding: 1.2rem 2rem;
  margin: 0;
  background-color: var(--warm-white);
  border-bottom: 1px solid var(--parchment);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1.25rem;
  color: var(--oak);
}

.breadcrumb li::after {
  content: '›';
  margin: 0 .5rem;
  color: var(--sand);
  font-size: 1.4rem;
  line-height: 1;
}

.breadcrumb li:last-child::after {
  display: none;
}

.breadcrumb li a {
  color: var(--sky);
  text-decoration: none;
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  background-color: var(--sky-pale);
  font-size: 1.2rem;
  display: inline-block;
  transition: var(--transition);
}

.breadcrumb li a:hover {
  background-color: var(--sky);
  color: #fff;
}

.breadcrumb li:last-child {
  color: var(--deep-brown);
  font-weight: 500;
}

/* ===================================
   Main Content
=================================== */
main {
  min-height: 60vh;
}

section {
  padding: 4rem 0;
  margin: 0;
}

.gray-back {
  background-color: var(--warm-white);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c49a2f' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===================================
   Hero / Search Section (index.php)
=================================== */
.hero-section {
  background: linear-gradient(135deg, var(--deep-brown) 0%, var(--mahogany) 50%, var(--oak) 100%);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c49a2f' fill-opacity='0.06'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0L80 12v2L54 40h-2zm4 0L80 16v2L58 40h-2zm4 0L80 20v2L62 40h-2zm4 0L80 24v2L66 40h-2zm4 0L80 28v2L70 40h-2zm4 0L80 32v2L74 40h-2zm4 0L80 36v2L78 40h-2z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h2 {
  font-family: var(--font-serif);
  color: var(--warm-white);
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: .05em;
}

.hero-section h2 .site-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.8rem;
  color: var(--gold-light);
  display: block;
  margin-top: .4rem;
  letter-spacing: .1em;
}

/* ===================================
   Description / Instructions Box
=================================== */
.comm_area {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232,200,110,.3);
  border-radius: var(--radius-md);
  padding: 1.6rem 2.4rem;
  margin: 2rem auto;
  max-width: 640px;
  text-align: center;
}

.comm {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--warm-white);
  display: block;
  margin-bottom: .4rem;
}

.comm14blue {
  font-size: 1.3rem;
  color: var(--gold-light);
  display: block;
  line-height: 1.7;
}

.comm12red {
  font-size: 1.2rem;
  color: #ffb3a0;
  font-weight: 500;
  display: block;
  margin-top: .8rem;
}

/* ===================================
   Search Controls
=================================== */
.search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  margin: 2.4rem auto 0;
  max-width: 700px;
}

.selection {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b7355' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  border: 2px solid var(--sand);
  border-radius: var(--radius-sm);
  padding: 1rem 3.6rem 1rem 1.4rem;
  font-size: 1.5rem;
  font-family: var(--font-sans);
  color: var(--deep-brown);
  cursor: pointer;
  transition: var(--transition);
  min-width: 180px;
  height: auto;
  box-shadow: var(--shadow-soft);
}

.selection:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,154,47,.2);
}

.selection:hover {
  border-color: var(--oak);
}

#city_sel {
  display: inline-block;
}

/* ===================================
   Library Table Area
=================================== */
#table_area {
  margin-top: 3rem;
  animation: fadeInUp .4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.area_text {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--deep-brown);
  text-align: center;
  margin-bottom: 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--parchment);
  position: relative;
}

.area_text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--gold);
}

/* ===================================
   Main Library Table
=================================== */
#main_table {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin: 0 auto;
}

#main_table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.4rem;
}

#main_table thead tr {
  background: linear-gradient(135deg, var(--deep-brown), var(--mahogany));
}

#main_table th {
  color: var(--warm-white);
  font-size: 1.3rem;
  font-weight: 600;
  padding: 1.4rem 1.6rem;
  text-align: left;
  letter-spacing: .05em;
  white-space: nowrap;
}

#main_table th:first-child {
  border-radius: 0;
}

#main_table tbody tr {
  border-bottom: 1px solid var(--parchment);
  transition: var(--transition);
}

#main_table tbody tr:last-child {
  border-bottom: none;
}

#main_table tbody tr:hover {
  background-color: var(--gold-pale);
}

#main_table td {
  font-size: 1.35rem;
  padding: 1.2rem 1.6rem;
  color: var(--deep-brown);
  vertical-align: middle;
}

#main_table td a {
  color: var(--mahogany);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(139,58,42,.2);
  transition: var(--transition);
}

#main_table td a:hover {
  color: var(--red-accent);
  border-bottom-color: var(--red-accent);
}

/* Category badge */
#main_table td:nth-child(4) {
  white-space: nowrap;
}

/* HP link styling */
#main_table td:nth-child(5) a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background-color: var(--sky-pale);
  color: var(--sky);
  border: 1px solid rgba(74,127,165,.3);
  border-bottom: 1px solid rgba(74,127,165,.3);
  padding: .3rem .9rem;
  border-radius: 20px;
  font-size: 1.25rem;
  font-weight: 500;
  transition: var(--transition);
}

#main_table td:nth-child(5) a:hover {
  background-color: var(--sky);
  color: #fff;
  border-color: var(--sky);
}

#main_table td:nth-child(5) a::after {
  content: '↗';
  font-size: 1.1rem;
}

/* ===================================
   Mobile Table (Responsive Cards)
=================================== */
@media screen and (max-width: 768px) {
  #main_table table { width: 100%; border: none; padding: 0; }
  #main_table thead { display: none; }

  #main_table tbody tr {
    display: block;
    border: none;
    border-radius: var(--radius-md);
    margin: 1.2rem 1.2rem;
    box-shadow: var(--shadow-card);
    background: #fff;
    overflow: hidden;
  }

  #main_table tbody tr:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-deep);
  }

  #main_table td {
    display: block;
    padding: .9rem 1.4rem;
    border-bottom: 1px solid var(--parchment);
    font-size: 1.4rem;
  }

  #main_table td:last-child {
    border-bottom: none;
  }

  #main_table td::before {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--oak);
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .05em;
  }

  #main_table td:nth-of-type(1) {
    background: linear-gradient(135deg, var(--deep-brown), var(--mahogany));
    padding: 1.2rem 1.4rem;
  }

  #main_table td:nth-of-type(1) a {
    color: #fff !important;
    font-size: 1.6rem;
    border-bottom-color: rgba(255,255,255,.3);
  }

  #main_table td:nth-of-type(1)::before { display: none; }
  #main_table td:nth-of-type(2)::before { content: "📍 住所"; }
  #main_table td:nth-of-type(3)::before { content: "📞 電話番号"; }
  #main_table td:nth-of-type(4)::before { content: "🏛 カテゴリー"; }
  #main_table td:nth-of-type(5)::before { content: "🌐 ホームページ"; }
}

/* ===================================
   Detail Table
=================================== */
.detail_table {
  margin: 0 auto 4rem;
  padding: 0;
  border-collapse: collapse;
  width: 100%;
  max-width: 800px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.detail_table tr:first-child th { border-top: none; }
.detail_table tr:first-child td { border-top: none; }

.detail_table th {
  padding: 1.4rem 2rem;
  background: var(--warm-white);
  border: none;
  border-bottom: 1px solid var(--parchment);
  border-right: 3px solid var(--gold);
  vertical-align: middle;
  width: 28%;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--deep-brown);
  text-align: left;
}

.detail_table td {
  padding: 1.4rem 2rem;
  border: none;
  border-bottom: 1px solid var(--parchment);
  vertical-align: middle;
  font-size: 1.45rem;
  color: var(--ink);
}

.detail_table tr:last-child th,
.detail_table tr:last-child td {
  border-bottom: none;
}

.detail_table td a {
  color: var(--sky);
  text-decoration: underline;
  word-break: break-all;
}

.detail_table td a:hover {
  color: var(--mahogany);
}

@media screen and (max-width: 768px) {
  .detail_table,
  .detail_table tbody,
  .detail_table tr,
  .detail_table th,
  .detail_table td {
    display: block;
    width: 100%;
  }

  .detail_table tr {
    border-bottom: 1px solid var(--parchment);
  }

  .detail_table tr:last-child {
    border-bottom: none;
  }

  .detail_table th {
    background: var(--warm-white);
    border-right: none;
    border-bottom: none;
    padding: 1rem 1.4rem .5rem;
    font-size: 1.25rem;
    color: var(--oak);
  }

  .detail_table td {
    padding: .5rem 1.4rem 1.2rem;
    border-bottom: none;
    font-size: 1.4rem;
  }
}

/* ===================================
   Google Map Area
=================================== */
.gmaparea {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.gmaparea iframe {
  width: 100%;
  height: 480px;
  display: block;
  border: 0;
}

@media screen and (max-width: 768px) {
  .gmaparea iframe {
    height: 300px;
  }
}

/* ===================================
   Archive Page (city_li)
=================================== */
.archive-regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.4rem;
}

.city_li {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.city_li:hover {
  box-shadow: var(--shadow-deep);
  transform: translateY(-2px);
}

.city_li h3 {
  background: linear-gradient(135deg, var(--deep-brown), var(--mahogany));
  margin: 0;
  padding: 1.2rem 1.8rem;
  font-size: 1.7rem;
  font-family: var(--font-serif);
  font-weight: 700;
}

.city_li h3 a {
  color: var(--warm-white) !important;
  display: block;
  text-decoration: none;
}

.city_li h3 a:hover {
  color: var(--gold-light) !important;
}

.city_li ul {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.city_li li {
  float: none;
  margin: 0;
  padding: 0;
  font-size: 1.4rem;
}

.city_li li a {
  display: inline-block;
  color: var(--mahogany);
  background-color: var(--warm-white);
  border: 1px solid var(--parchment);
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: 1.3rem;
  text-decoration: none;
  transition: var(--transition);
}

.city_li li a:hover {
  background-color: var(--mahogany);
  color: #fff;
  border-color: var(--mahogany);
}

/* ===================================
   Section Headings
=================================== */
.center {
  text-align: center;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--deep-brown);
  text-align: center;
  margin-bottom: 2.4rem;
  position: relative;
  display: inline-block;
  padding-bottom: 1.2rem;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.center h2 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  color: var(--deep-brown);
}

.under {
  position: relative;
  display: inline-block;
  padding-bottom: .8rem;
}

.under::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--oak));
  border-radius: 2px;
}

/* ===================================
   Pref/City Search Panel (index.php)
=================================== */
.search-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  padding: 3rem 3.2rem;
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--parchment);
}

.search-panel-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--deep-brown);
  text-align: center;
  margin-bottom: 1.6rem;
  font-weight: 700;
}

/* ===================================
   Footer
=================================== */
footer {
  background: var(--deep-brown);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 3px solid var(--gold);
}

footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

footer .footer-brand {
  font-family: var(--font-serif);
  color: var(--warm-white);
  font-size: 1.8rem;
  font-weight: 700;
}

footer .footer-brand span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold-light);
  display: block;
}

.footer_link {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
}

.footer_link a {
  color: rgba(250,247,242,.7);
  text-decoration: none;
  font-size: 1.35rem;
  padding: .4rem .8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline;
}

.footer_link a:hover {
  color: var(--gold-light);
  background-color: rgba(196,154,47,.15);
}

.footer-description {
  color: rgba(250,247,242,.5);
  font-size: 1.2rem;
  margin-top: 1.6rem;
  line-height: 1.7;
}

/* ===================================
   Copyright
=================================== */
.copyright {
  background-color: var(--ink);
  text-align: center;
  padding: 1.2rem 0;
}

.copyright a {
  color: rgba(250,247,242,.5);
  text-decoration: none;
  font-size: 1.2rem;
  display: inline;
}

.copyright a:hover {
  color: var(--gold-light);
}

/* ===================================
   Page Top Button
=================================== */
#pagetop {
  position: fixed;
  bottom: 2.4rem;
  right: 2rem;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0;
}

#pagetop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--deep-brown);
  color: var(--gold-light);
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  line-height: 1;
  padding: 0;
}

#pagetop a:hover {
  background: var(--mahogany);
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}

/* ===================================
   Search Placeholder (index.php initial state)
=================================== */
.search-placeholder {
  text-align: center;
  padding: 3.2rem 2rem;
  color: rgba(250,247,242,.75);
}

.search-placeholder-icon {
  font-size: 3.6rem;
  display: block;
  margin-bottom: 1rem;
  opacity: .8;
}

.search-placeholder p {
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: .04em;
}

/* ===================================
   Loading Indicator
=================================== */
.loading-indicator {
  text-align: center;
  padding: 4rem;
  color: var(--oak);
}

.loading-indicator::before {
  content: '📚';
  font-size: 3.2rem;
  display: block;
  margin-bottom: 1.2rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: .7; }
}

/* ===================================
   Detail Page Hero
=================================== */
.detail-hero {
  background: linear-gradient(135deg, var(--deep-brown), var(--mahogany));
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 0;
}

.detail-hero h2 {
  font-family: var(--font-serif);
  color: var(--warm-white);
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0;
  padding: 0 2rem;
}

.detail-hero h2 .library-city {
  font-size: 1.4rem;
  color: var(--gold-light);
  display: block;
  margin-top: .4rem;
  font-family: var(--font-sans);
  font-weight: 400;
}

/* ===================================
   Map Button (detail.php)
=================================== */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--sky);
  color: #fff !important;
  padding: .6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.map-link:hover {
  background: #2d6a9f;
  transform: translateY(-1px);
}

.map-link::before {
  content: '📍';
}

/* ===================================
   Responsive Utilities
=================================== */
@media screen and (max-width: 768px) {
  .archive-regions {
    grid-template-columns: 1fr;
  }

  .search-panel {
    padding: 2rem 1.6rem;
    border-radius: var(--radius-md);
    margin: 0 1rem;
  }

  .search-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 0 .4rem;
  }

  .selection {
    min-width: 100%;
  }

  .hero-section h2 {
    font-size: 2.4rem;
  }

  section {
    padding: 2.4rem 0;
  }

  footer .footer-inner {
    flex-direction: column;
    gap: 1.6rem;
  }
}

/* ===================================
   Animations
=================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeIn .5s ease forwards;
}

/* ===================================
   Nearby / Same-City Library Cards
=================================== */
.nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.nearby-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.4rem 1.6rem;
  background: #fff;
  border: 1px solid var(--parchment);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  border-left: 3px solid var(--gold);
}

.nearby-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  border-left-color: var(--mahogany);
}

.nearby-card-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--mahogany);
  line-height: 1.4;
}

.nearby-card-address {
  font-size: 1.2rem;
  color: var(--oak);
  line-height: 1.5;
}

.nearby-card-cat {
  font-size: 1.1rem;
  color: #fff;
  background: var(--sage);
  border-radius: 20px;
  padding: .2rem .8rem;
  align-self: flex-start;
  margin-top: .2rem;
}

@media screen and (max-width: 768px) {
  .nearby-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   Prefecture Link Grid
=================================== */
.pref-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}

.pref-link-btn {
  display: inline-block;
  padding: .5rem 1.1rem;
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 20px;
  color: var(--mahogany);
  font-size: 1.3rem;
  text-decoration: none;
  transition: var(--transition);
  line-height: 1.4;
}

.pref-link-btn:hover {
  background: var(--mahogany);
  color: #fff;
  border-color: var(--mahogany);
}

/* ===================================
   SEO / Structured Data Helpers
=================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
