:root {
  --bg: #0f0f12;
  --bg2: #1a1a20;
  --bg3: #22222a;
  --surface: #2a2a34;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0ede8;
  --text2: #a8a4a0;
  --text3: #6b6864;
  --accent: #c8a96e;
  --accent2: #e8c98e;
  --accent-bg: rgba(200,169,110,0.12);
  --red: #e06b6b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
}

body.light {
  --bg: #f5f2ed;
  --bg2: #ede9e3;
  --bg3: #e4e0da;
  --surface: #fff;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.14);
  --text: #1a1814;
  --text2: #5a5652;
  --text3: #9a9692;
  --accent: #8b6a30;
  --accent2: #6b4e1e;
  --accent-bg: rgba(139,106,48,0.10);
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
body.light .header {
  background: rgba(245,242,237,0.88);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.02em;
}
.logo-coco { color: var(--text2); }
.logo-yado { color: var(--accent); }
.nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.nav a {
  font-size: 13px;
  color: var(--text2);
  transition: color 0.2s;
}
.nav a:hover { color: var(--accent); }
.theme-toggle {
  background: none;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 14px;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* HERO */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(200,169,110,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(100,80,160,0.06) 0%, transparent 50%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(255,255,255,0.015) 80px, rgba(255,255,255,0.015) 81px),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(255,255,255,0.015) 80px, rgba(255,255,255,0.015) 81px);
}
body.light .hero-bg {
  background: 
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(200,169,110,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(100,80,160,0.05) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
  width: 100%;
}
.hero-sub {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 40px;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

/* SEARCH BOX */
.search-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 900px;
  box-shadow: var(--shadow);
}
.search-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.search-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.search-field input,
.search-field select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 12px;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.search-field input:focus,
.search-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.search-field input::placeholder { color: var(--text3); }
.search-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6864' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.area-tag {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border2);
  border-radius: 20px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}
.area-tag:hover, .area-tag.active {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #1a1200;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-search:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-search:active { transform: translateY(0); }

/* RESULTS */
.results-section { padding: 60px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.results-header { margin-bottom: 32px; }
.results-header h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}
.results-count { font-size: 13px; color: var(--text3); }

/* LOADING */
.loading {
  text-align: center;
  padding: 80px 0;
  color: var(--text3);
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ERROR */
.error-msg {
  background: rgba(224,107,107,0.1);
  border: 1px solid rgba(224,107,107,0.3);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: var(--red);
  font-size: 14px;
}

/* HOTEL GRID */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.hotel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.hotel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border2);
}
.hotel-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg3);
  display: block;
}
.hotel-img-placeholder {
  width: 100%;
  height: 180px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text3);
}
.hotel-body { padding: 16px; }
.hotel-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.hotel-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}
.hotel-address {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hotel-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.hotel-price {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
}
.hotel-price span { font-size: 11px; color: var(--text3); margin-left: 2px; }
.hotel-review {
  font-size: 12px;
  color: var(--text3);
}
.hotel-stars { color: #f5c518; font-size: 12px; }

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}
.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--text2);
  cursor: pointer;
  width: 32px;
  height: 32px;
  font-size: 14px;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text); border-color: var(--text2); }
.modal-content { padding: 24px; }
.modal-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-address { font-size: 13px; color: var(--text3); margin-bottom: 16px; }
.modal-desc { font-size: 14px; line-height: 1.8; color: var(--text2); margin-bottom: 20px; }
.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-info-item {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.modal-info-label { font-size: 11px; color: var(--text3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.modal-info-value { font-size: 15px; font-weight: 500; color: var(--accent); }
.modal-btn {
  display: block;
  text-align: center;
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: #1a1200;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 14px;
  transition: background 0.2s;
}
.modal-btn:hover { background: var(--accent2); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 8px;
}
.footer-copy { font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.footer-note { font-size: 11px; color: var(--text3); }

/* RESPONSIVE */
@media (max-width: 700px) {
  .search-row { grid-template-columns: 1fr; }
  .search-actions { flex-direction: column; align-items: stretch; }
  .btn-search { justify-content: center; }
  .hotel-grid { grid-template-columns: 1fr; }
  .modal-info-grid { grid-template-columns: 1fr; }
}
