/* SHISHA CAFE JAPAN - 日本のシーシャカフェ情報サイト */

:root {
  --bg-deep: #0d0c0b;
  --bg-card: #161412;
  --bg-elevated: #1c1917;
  --text: #fafaf9;
  --text-muted: #a8a29e;
  --accent: #d97706;
  --accent-soft: #b45309;
  --accent-glow: rgba(217, 119, 6, 0.25);
  --border: #292524;
  --radius: 12px;
  --font-sans: "Noto Sans JP", sans-serif;
  --font-display: "Outfit", "Noto Sans JP", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(13, 12, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  background-image:
    linear-gradient(rgba(13,12,11,0.92), rgba(13,12,11,0.92)),
    linear-gradient(90deg, transparent, var(--accent-soft), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
  font-weight: 500;
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  position: relative;
  padding: 6px 12px;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

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

.menu-btn {
  display: none;
  width: 28px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.menu-btn span,
.menu-btn::before,
.menu-btn::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1),
              opacity 0.25s ease,
              background 0.25s ease;
}

.menu-btn::before {
  top: 4px;
}

.menu-btn span {
  top: 11px;
}

.menu-btn::after {
  bottom: 4px;
}

.menu-btn:hover span,
.menu-btn:hover::before,
.menu-btn:hover::after {
  background: var(--accent);
}

/* Hero */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(180, 83, 9, 0.15) 0%, transparent 45%),
    var(--bg-deep);
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 480px;
}

.hero-cta {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
}

.hero-cta:hover {
  background: var(--accent-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Sections */
.section {
  padding: 80px 0;
  scroll-margin-top: 90px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-desc {
  color: var(--text-muted);
  margin: 0 0 40px;
  font-size: 0.95rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: left;
  color: var(--text);
}

.about-card--clickable {
  cursor: pointer;
  display: block;
  width: 100%;
  font-family: inherit;
}

.about-card--clickable:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.about-detail-content-inner .about-modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.about-detail-content-inner p {
  margin: 0 0 1em;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.about-detail-content-inner p:last-child {
  margin-bottom: 0;
}

.about-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.about-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

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

/* Areas */
.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.area-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.area-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.area-card--button {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
  border: 1px solid var(--border);
}

.area-card--button.is-active {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--accent);
}

.area-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.area-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.areas-cta {
  margin-top: 28px;
  text-align: center;
}

.areas-cta .hero-cta {
  display: inline-block;
}

/* Spots */
.spots .section-desc {
  margin-bottom: 12px;
}

.section-desc--small {
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.section-desc--small a {
  text-decoration: underline;
}

.spots-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.spots-loading.is-hidden {
  display: none;
}

.spots-coming-soon {
  text-align: center;
  padding: 48px 24px 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  margin: 0 auto;
}

.spots-coming-soon-img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto 24px;
  border-radius: 12px;
  opacity: 0.85;
}

.spots-coming-soon-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
  letter-spacing: 0.06em;
}

.spots-coming-soon-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 24px;
}

.spots-coming-soon-link {
  display: inline-block;
  padding: 10px 28px;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 24px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.spots-coming-soon-link:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.search-panel {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-panel-row {
  margin-bottom: 16px;
}

.search-panel-row:last-child {
  margin-bottom: 0;
}

.search-panel-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.search-panel-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search-panel-input::placeholder {
  color: var(--text-muted);
}

.search-panel-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-feature-category {
  margin-bottom: 14px;
}

.search-feature-category:last-of-type {
  margin-bottom: 0;
}

.search-feature-category-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.search-station-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
}

.search-station-btn {
  padding: 4px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}

.search-station-btn:hover {
  color: var(--text);
  border-color: var(--border);
}

.search-station-btn.is-active {
  color: var(--bg-deep);
  background: var(--accent);
  border-color: var(--accent);
}

.search-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-feature-tag {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.search-feature-tag:hover {
  color: var(--text);
  border-color: var(--border);
}

.search-feature-tag.is-active {
  color: var(--bg-deep);
  background: var(--accent);
  border-color: var(--accent);
}

.search-result-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.search-result-count.is-hidden {
  display: none;
}

.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-filter-bar.is-hidden {
  display: none;
}

.search-filter-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.search-filter-clear {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.search-filter-clear:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.search-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.search-loading.is-hidden {
  display: none;
}

.search-results-container .spot-block-title {
  margin-top: 0;
}

.spot-block--hidden {
  display: none !important;
}

.spot-card--hidden {
  display: none !important;
}

.spot-block {
  margin-bottom: 56px;
  scroll-margin-top: 90px;
}

.spot-block:last-of-type {
  margin-bottom: 0;
}

.spot-block-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.spot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.spot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
  overflow: hidden;
}

.spot-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.spot-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 10px;
}

.spot-area {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.spot-tag {
  font-size: 0.72rem;
  color: #c8c4c0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.spot-tag--more {
  color: var(--accent);
  background: rgba(217, 119, 6, 0.08);
  font-weight: 600;
}

.spot-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.spot-name-text {
  flex: 1;
  min-width: 0;
}

.spot-rating {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.spot-rating-star {
  color: #e6a817;
  margin-right: 2px;
}

.spot-rating-count {
  font-size: 0.72rem;
}

.spot-desc-wrap {
  margin: 0 0 10px;
}

.spot-desc-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 2px;
}

.spot-desc {
  font-size: 0.85rem;
  color: #c8c4c0;
  margin: 2px 0 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spot-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spot-access,
.spot-address {
  font-size: 0.78rem;
  color: #a8a29e;
  margin: 0;
  line-height: 1.4;
}

/* モーダル内の営業時間（曜日ごと改行） */
#shop-modal-hours {
  white-space: pre-line;
}

/* Notice */
.notice {
  padding-top: 60px;
  padding-bottom: 60px;
}

.notice-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.notice-box p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

.notice-box strong {
  color: var(--text);
}

/* Footer */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: var(--text-muted);
}

.footer-nav {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.7;
}

/* 店舗詳細モーダル */
.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.shop-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.shop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.shop-modal-inner {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shop-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.shop-modal-close:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.shop-modal-content {
  padding-right: 28px;
}

.shop-modal-area {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
}

.shop-modal-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.3;
}

.shop-modal-dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 20px;
  margin: 0 0 20px;
  font-size: 0.9rem;
  align-items: baseline;
}

.shop-modal-dl dt {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9em;
}

.shop-modal-dl dd {
  margin: 0;
  color: #d6d3d1;
  line-height: 1.5;
}

.shop-modal-dl dd:empty::after {
  content: '—';
  color: var(--text-muted);
}

.shop-modal-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-modal-tag {
  font-size: 0.75rem;
  color: #d6d3d1;
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 6px;
}

.shop-modal-section {
  margin-bottom: 20px;
}

.shop-modal-ai-desc {
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-left: 2px solid var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px 14px 18px;
  margin-bottom: 20px;
}

.shop-modal-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.shop-modal-desc {
  font-size: 0.93rem;
  color: #d6d3d1;
  line-height: 1.7;
  margin: 0;
}

.shop-modal-links {
  margin-bottom: 16px;
}

.shop-modal-link {
  display: inline-block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.shop-modal-link:hover {
  background: var(--accent-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

.shop-modal-phone-link {
  color: #d6d3d1;
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px dashed #78716c;
  transition: color 0.15s, border-color 0.15s;
}

.shop-modal-phone-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.shop-modal-map-section {
  margin-top: 20px;
}

.shop-modal-map-iframe {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}

.shop-modal-inline-link {
  color: var(--accent);
  font-size: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: color 0.15s, border-color 0.15s;
}

.shop-modal-inline-link:hover {
  color: var(--accent-soft);
  border-color: var(--accent-soft);
}

.shop-modal-map-link-wrap {
  margin: 8px 0 0;
  font-size: 0.85rem;
  text-align: right;
}

.shop-modal-note {
  font-size: 0.78rem;
  color: #78716c;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
  }

  .nav a::after {
    display: none;
  }

  .nav a:hover {
    background: rgba(217, 119, 6, 0.1);
  }

  .menu-btn {
    display: block;
  }

  .menu-btn[aria-expanded="true"]::before {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-btn[aria-expanded="true"] span {
    opacity: 0;
    transform: scaleX(0);
  }

  .menu-btn[aria-expanded="true"]::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    min-height: 50vh;
    padding: 90px 20px 48px;
  }

  .section {
    padding: 48px 0;
  }

  .spot-grid {
    grid-template-columns: 1fr;
  }

  .area-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .search-page .search-main {
    padding: 90px 16px 48px;
  }
}

/* ========== 店舗検索ページ ========== */
.search-page .search-main {
  padding: 100px 24px 60px;
  min-height: 80vh;
  overflow-x: hidden;
}

.search-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: hidden;
}

.search-page-header {
  margin-bottom: 32px;
}

.search-page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.search-page-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* PC：左＝絞り込みのみ（2行分） / 右上＝件数・条件 / 右下＝一覧。スマホは縦に summary → sidebar → content */
.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  grid-template-areas:
    'sidebar summary'
    'sidebar content';
  column-gap: 32px;
  row-gap: 0;
  align-items: start;
  isolation: isolate;
}

/* 左：絞り込みのみ sticky */
.search-sidebar {
  grid-area: sidebar;
  position: sticky;
  align-self: start;
  justify-self: stretch;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  max-height: calc(100vh - env(safe-area-inset-top, 0px) - 58px - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 2;
  background: var(--bg-deep);
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* PC：店舗リストの直上（右カラム上段）。スクロール時はヘッダー下に張り付く */
.search-summary-slot {
  grid-area: summary;
  min-width: 0;
  align-self: start;
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  z-index: 3;
  margin-bottom: 20px;
  padding-bottom: 4px;
  background: var(--bg-deep);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.35);
}

.search-sidebar::-webkit-scrollbar {
  width: 4px;
}

.search-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.search-content {
  grid-area: content;
  min-width: 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .search-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'summary'
      'sidebar'
      'content';
    column-gap: 0;
    row-gap: 16px;
  }

  /* スマホ：表示固定なし。検索ブロックの下から一覧が続く通常スクロール */
  .search-sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow-x: visible;
    overflow-y: visible;
    z-index: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    touch-action: auto;
    overscroll-behavior: auto;
    box-shadow: none;
  }

  .search-summary-slot {
    position: static;
    top: auto;
    z-index: auto;
    margin-bottom: 12px;
    padding-bottom: 0;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.35);
  }

  .search-content {
    position: relative;
    z-index: auto;
    min-width: 0;
    overflow: visible;
  }

  .search-sidebar-inner {
    max-height: none;
  }

  .search-section {
    padding: 12px 16px;
  }

  .search-area-buttons {
    gap: 6px;
  }

  .search-hier-buttons {
    padding: 4px 4px 4px 8px;
  }
}

.search-sidebar-inner {
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  overflow: hidden;
}

.search-section:last-child {
  border-bottom: none;
}

.search-section--actions {
  padding: 12px 20px;
  background: var(--bg-elevated);
}

.search-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.search-section-hint {
  margin: -6px 0 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.search-section-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}

.search-form-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-sizing: border-box;
}

.search-form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15);
}

.search-form-input::placeholder {
  color: var(--text-muted);
}

.search-area-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-area-btn {
  padding: 7px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.search-area-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.search-area-btn.is-active {
  color: var(--bg-deep);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.search-subarea-panel {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.search-subarea-panel[hidden] {
  display: none !important;
}

.search-subarea-panel-heading {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* 長いエリア一覧をスクロールしても、設備への導線が見えるように先頭で sticky */
.search-subarea-panel-sticky-head {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 0 8px;
  padding-bottom: 8px;
  background: var(--bg-card);
  box-shadow: 0 8px 12px -8px rgba(0, 0, 0, 0.12);
}

.search-jump-to-features-wrap {
  margin: 0;
}

.search-jump-features-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.search-jump-features-link:hover {
  color: var(--accent-soft);
  border-bottom-color: var(--accent-soft);
  text-decoration: none;
}

.search-jump-features-link:focus {
  outline: none;
}

.search-jump-features-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

#search-features-section {
  /* scrollIntoView 時：固定ヘッダー + 件数バー（sticky）と被らない余白 */
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 120px);
}

#search-features-section:focus {
  outline: none;
}

#search-features-section:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.search-subarea-group-title {
  margin: 10px 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.search-subarea-group-title:first-child {
  margin-top: 0;
}

.search-subarea-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.search-subarea-btn {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 14px;
}

/* --- 階層型ツリー --- */
.search-hier-group {
  border-left: 2px solid var(--border);
  margin: 0 0 1px;
}

.search-hier-d0 { margin-left: 0; }
.search-hier-d1 { margin-left: 6px; }
.search-hier-d2 { margin-left: 6px; }
.search-hier-d3 { margin-left: 6px; }

.search-hier-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 10px;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
  border-radius: 0 6px 6px 0;
}

.search-hier-summary:hover {
  color: var(--accent);
  background: rgba(217, 119, 6, 0.06);
}

.search-hier-summary::-webkit-details-marker {
  display: none;
}

.search-hier-summary::before {
  content: "▸ ";
  font-size: 0.68rem;
  margin-right: 2px;
}

.search-hier-group[open] > .search-hier-summary::before {
  content: "▾ ";
}

.search-hier-inner {
  padding: 2px 0 4px 2px;
}

.search-hier-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 4px 4px 12px;
}

.search-hier-buttons--flat {
  padding-left: 0;
  margin-bottom: 2px;
}

.search-sidebar .search-feature-category {
  margin-bottom: 10px;
}

.search-sidebar .search-feature-category:last-child {
  margin-bottom: 0;
}

.search-sidebar .search-feature-category-title {
  margin-top: 0;
  margin-bottom: 6px;
}

.search-sidebar .search-feature-tags {
  margin-top: 0;
}

.search-sidebar-toggle,
.search-sidebar-toggle-close {
  display: none;
}

.search-sidebar-clear {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.search-sidebar-clear:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(217, 119, 6, 0.08);
}

/* 絞り込み時に scrollIntoView する基準点（デスクトップの一覧先頭へ） */
.search-results-top-anchor {
  height: 0;
  overflow: hidden;
  pointer-events: none;
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 88px);
}

.search-toolbar {
  margin-bottom: 0;
}

/* 件数バー本体（sticky は .search-summary-slot 側） */
#search-results-toolbar {
  position: static;
  margin-bottom: 0;
  padding-bottom: 0;
  background: transparent;
  box-shadow: none;
}

.search-result-summary {
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* 絞り込み更新時：店舗リストのみ 消す → 再表示（件数バーはそのまま） */
#search-results-container.search-refresh--pulse {
  animation: search-refresh-pulse 0.68s cubic-bezier(0.4, 0, 0.2, 1) both;
  pointer-events: none;
}

@keyframes search-refresh-pulse {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  22% {
    opacity: 0;
    transform: translateY(6px);
  }
  48% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #search-results-container.search-refresh--pulse {
    animation: none !important;
    pointer-events: auto !important;
  }
}

.search-result-headline {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.search-result-conditions {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.search-content .search-result-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.search-content .search-loading {
  padding: 60px 20px;
}

.search-results-list .spot-block {
  margin-bottom: 48px;
}

.search-results-list .spot-block:last-child {
  margin-bottom: 0;
}

/* ========== フレーバー紹介ページ ========== */
.flavors-main {
  padding: 100px 0 80px;
}

.flavors-layout {
  display: flex;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: flex-start;
}

.flavors-sidebar {
  flex-shrink: 0;
  width: 200px;
  position: sticky;
  top: 100px;
}

.flavors-content {
  flex: 1;
  min-width: 0;
}

.flavors-page-header {
  margin-bottom: 32px;
}

.flavors-content .flavors-section:first-of-type {
  padding-top: 36px;
}

.flavors-page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.flavors-page-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.flavors-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.flavors-section:first-of-type {
  border-top: none;
}

.flavors-section .section-title {
  margin-bottom: 24px;
}

.flavors-section[id] {
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 88px);
}

.section-title--icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.flavors-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flavors-subtitle-icon {
  font-size: 1.2rem;
}

.flavors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.flavor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.flavor-card:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.flavor-card-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
}

.flavor-card-icon--large {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.flavor-card-icon--brand {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.flavor-card--with-icon .flavor-card-icon {
  margin-bottom: 12px;
}

.flavor-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.flavor-card-desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.flavor-card-examples {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent);
  line-height: 1.5;
}

.flavors-tips {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.flavors-tips .section-title {
  margin-bottom: 24px;
}

.flavors-tips-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.flavors-tips-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.flavors-tips-block:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.flavors-tips-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.flavors-tips-block p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.flavors-fee-structure {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flavors-fee-total {
  padding: 16px 18px;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius);
}

.flavors-fee-total-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.flavors-fee-total-body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

.flavors-fee-breakdown-label {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.flavors-fee-breakdown-list {
  margin: 0;
}

.flavors-fee-notes {
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

.flavors-fee-notes-label {
  margin: 16px 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.flavors-fee-notes-list {
  margin: 0;
}

.flavors-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flavors-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.flavors-faq-item[open] {
  border-color: var(--accent);
}

.flavors-faq-q {
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.15s;
}

/* 閉じているときは通常色（フォーカス残りでハイライトに見えないよう） */
.flavors-faq-item:not([open]) > .flavors-faq-q {
  color: var(--text);
}

/* 開いている質問だけアクセント（閉じたら必ず戻る） */
.flavors-faq-item[open] > .flavors-faq-q {
  color: var(--accent);
}

.flavors-faq-q::-webkit-details-marker {
  display: none;
}

.flavors-faq-q::before {
  content: "▸";
  font-size: 0.75rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.flavors-faq-item[open] > .flavors-faq-q::before {
  transform: rotate(90deg);
}

.flavors-faq-q:hover {
  color: var(--accent);
}

.flavors-faq-q:focus {
  outline: none;
}

.flavors-faq-q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.flavors-faq-a {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.flavors-main .notice-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.flavors-main .notice-box p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.flavors-main .notice-box p:last-child {
  margin-bottom: 0;
}

.flavors-main .notice-box strong {
  color: var(--text);
}

/* フレーバーページ：左サイド目次 */
.flavors-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.flavors-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flavors-toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 2px;
  flex: 1;
  min-width: 0;
}

.flavors-toc-current {
  display: none;
}

.flavors-toc-body {
  margin-top: 11px;
}

.flavors-toc-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.flavors-toc-toggle:hover {
  background: rgba(217, 119, 6, 0.12);
  border-color: var(--accent-soft);
}

.flavors-toc-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.flavors-toc-toggle-icon {
  display: block;
  width: 14px;
  height: 14px;
  position: relative;
}

.flavors-toc-toggle-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.flavors-toc--collapsed .flavors-toc-toggle-icon::before {
  transform: rotate(-135deg);
  top: 6px;
}

.flavors-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flavors-toc-list li {
  margin: 0;
}

.flavors-toc-list a {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 7px;
  line-height: 1.35;
  transition: background 0.2s, color 0.2s;
}

.flavors-toc-list a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.flavors-toc-list a.is-active {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
  font-weight: 600;
}

/* リード文・注釈 */
.flavors-lead {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.flavors-note {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 比較表 */
.flavors-compare-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flavors-th-icon {
  margin-right: 6px;
  font-size: 1.1rem;
}

/* 比較表：項目列＋違いがわかる強調 */
.flavors-table--compare .flavors-table-col-label {
  width: 100px;
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  vertical-align: middle;
}

.flavors-table--compare .flavors-diff-low {
  font-weight: 700;
  color: var(--text);
}

.flavors-table--compare .flavors-diff-high {
  font-weight: 700;
  color: var(--text);
}

.flavors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.flavors-table th,
.flavors-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.flavors-table th {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  width: 100px;
}

.flavors-table td {
  color: var(--text-muted);
  line-height: 1.6;
}

.flavors-table tbody tr:last-child td {
  border-bottom: none;
}

/* ダークリーフセクション */
.flavors-section--dark .flavor-cards--dark {
  margin-bottom: 24px;
}

.flavor-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.flavor-card--wide {
  padding: 20px 24px;
}

.flavor-card--wide .flavor-card-title {
  margin-bottom: 10px;
}

.flavor-card--wide .flavor-card-desc {
  margin-bottom: 0;
}

/* 注意ボックス（警告） */
.notice-box--warning {
  border-color: var(--accent-soft);
  background: rgba(217, 119, 6, 0.08);
}

.notice-box--herb {
  position: relative;
}

.notice-box-icon {
  margin-right: 6px;
}

.notice-box-icon--top {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.notice-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flavors-notice-spaced {
  margin-top: 32px;
}

/* リスト */
.flavor-list {
  margin: 0;
  padding: 0 0 0 1.2em;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.flavor-list li {
  margin-bottom: 8px;
}

.flavor-list li:last-child {
  margin-bottom: 0;
}

.flavor-list strong {
  color: var(--text);
}

/* 銘柄グリッド */
.flavors-grid--brands {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (max-width: 900px) {
  .flavors-layout {
    flex-direction: column;
    padding: 0 24px;
  }

  /* スクロールしても目次が画面上部に留まる（固定ヘッダー直下） */
  .flavors-sidebar {
    width: 100%;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    z-index: 60;
    align-self: flex-start;
  }

  /* スティッキー目次の実高に応じたアンカーずらしは JS が --flavors-sticky-overlap を設定 */
  .flavors-section[id] {
    scroll-margin-top: var(--flavors-sticky-overlap, calc(env(safe-area-inset-top, 0px) + 130px));
  }

  .flavors-toc {
    margin-bottom: 6px;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
  }

  .flavors-toc-head {
    gap: 0;
    cursor: pointer;
    padding: 10px 14px;
    -webkit-tap-highlight-color: transparent;
  }

  .flavors-toc-title {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
    margin-right: 8px;
  }

  .flavors-toc-current {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .flavors-toc-toggle {
    display: inline-flex;
    width: 28px;
    height: 28px;
    margin-left: 6px;
    border: none;
    background: transparent;
  }

  .flavors-toc-toggle-icon::before {
    width: 7px;
    height: 7px;
    left: 4px;
    top: 3px;
  }

  .flavors-toc-body {
    margin-top: 0;
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    opacity: 1;
    padding: 0 14px 12px;
  }

  .flavors-toc--collapsed .flavors-toc-body {
    max-height: 0;
    opacity: 0;
    padding-bottom: 0;
  }

  .flavors-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 7px;
  }

  .flavors-toc-list li {
    margin: 0;
  }

  .flavors-toc-list a {
    padding: 6px 10px;
    font-size: 0.76rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    line-height: 1.35;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }

  .flavors-toc-list a.is-active {
    background: rgba(217, 119, 6, 0.1);
    border-color: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
  }

  .flavors-section {
    padding: 36px 0;
  }

  .flavors-tips {
    padding: 36px 0;
  }

  .flavors-page-header {
    margin-bottom: 24px;
  }

  .flavors-page-title {
    font-size: 1.35rem;
  }

  .section-title-icon {
    font-size: 1.15rem;
  }

  .flavors-compare-table-wrap {
    position: relative;
  }

  .flavors-compare-table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(90deg, transparent, rgba(13, 12, 11, 0.7));
    pointer-events: none;
    border-radius: 0 var(--radius) var(--radius) 0;
  }

  .flavor-card {
    padding: 18px;
  }

  .flavor-card--wide {
    padding: 16px 18px;
  }

  .flavor-card-title {
    font-size: 1.05rem;
  }

  .flavor-list {
    font-size: 0.85rem;
    line-height: 1.75;
  }

  .flavors-faq-q {
    padding: 16px 18px;
    font-size: 0.9rem;
    min-height: 48px;
  }

  .flavors-faq-a {
    padding: 0 18px 16px;
    font-size: 0.85rem;
  }

  .flavors-tips-block {
    padding: 16px 18px;
  }

  .flavors-tips-heading {
    font-size: 0.95rem;
  }

  .flavors-tips-block p {
    font-size: 0.88rem;
  }

  .flavors-lead {
    font-size: 0.9rem;
  }

}

@media (min-width: 901px) {
  .flavors-toc-toggle {
    display: none !important;
  }

  .flavors-toc--collapsed .flavors-toc-body {
    display: block !important;
  }
}

/* ========== フレーバー相談 ========== */
.sommelier-main {
  /* 固定ヘッダー分 + 余白（.header の padding-top に safe-area が含まれる想定） */
  padding: calc(env(safe-area-inset-top, 0px) + 88px) 0 56px;
}

.sommelier-header {
  margin-bottom: 32px;
}

.sommelier-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

.sommelier-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.sommelier-chat-wrap {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  max-width: 800px;
  margin: 0 auto;
}

.sommelier-character {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 180px;
}

.sommelier-avatar {
  margin-bottom: 14px;
  line-height: 0;
}

.sommelier-avatar--img {
  width: 120px;
  height: 120px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sommelier-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sommelier-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
}

.sommelier-avatar-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sommelier-character-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.sommelier-character-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.sommelier-chat {
  flex: 1;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.sommelier-messages {
  position: relative; /* 子の offsetParent を確定させ、レシピジャンプの scrollTop 計算を正確にする */
  flex: 1 1 auto;
  min-height: 0;
  max-height: 560px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-top: 4px; /* 最上端の吹き出し・アイコンがわずかに切れないよう */
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto; /* html の scroll-behavior: smooth の影響を受けないよう明示 */
  overscroll-behavior-y: contain; /* モバイルで親へのバウンス連鎖を抑え、scrollTop が狂いにくくする */
}

.sommelier-msg {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sommelier-msg--enter {
  opacity: 0;
  transform: translateY(16px);
}

.sommelier-msg--visible {
  opacity: 1;
  transform: translateY(0);
}

.sommelier-msg:last-child {
  margin-bottom: 0;
}

.sommelier-msg--bot {
  flex-direction: row;
}

.sommelier-msg-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  box-sizing: border-box;
}

.sommelier-msg-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sommelier-msg-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #292524, #44403c);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
}

.sommelier-msg-avatar--fallback::after {
  content: "L";
}

#sommelier-typing {
  align-items: center;
}

/* transform はスクロール位置計算・offsetParent を乱すためフェードは opacity のみ */
.sommelier-luna-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  max-width: 100%;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.sommelier-luna-row.sommelier-fade-enter {
  opacity: 0;
}

.sommelier-luna-row.sommelier-fade-visible {
  opacity: 1;
}

.sommelier-luna-row-body {
  flex: 1;
  min-width: 0;
}

.sommelier-luna-row-body .sommelier-result-intro {
  margin-bottom: 0;
}

.sommelier-luna-row .sommelier-recipe-card {
  margin-bottom: 0;
}

.sommelier-msg--bot .sommelier-msg-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px 14px 14px 4px;
}

.sommelier-msg--user {
  flex-direction: row;
  justify-content: flex-end;
}

.sommelier-msg--user .sommelier-msg-inner {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid var(--accent-soft);
  color: var(--text);
  border-radius: 14px 14px 4px 14px;
  margin-left: auto;
}

.sommelier-msg-inner {
  max-width: 85%;
  padding: 12px 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.sommelier-choices {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sommelier-choices--visible {
  opacity: 1;
  transform: translateY(0);
}

.sommelier-choice-btn {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

@media (hover: hover) {
  .sommelier-choice-btn:hover {
    background: rgba(217, 119, 6, 0.15);
    border-color: var(--accent-soft);
  }
}

.sommelier-choice-btn:active {
  background: rgba(217, 119, 6, 0.12);
  border-color: var(--accent-soft);
}

.sommelier-choice-btn:focus {
  outline: none;
  background: var(--bg-card);
  border-color: var(--border);
}

.sommelier-choice-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sommelier-typing-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 18px !important;
}

.sommelier-typing-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: sommelier-dot-bounce 1.2s infinite ease-in-out;
}

.sommelier-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.sommelier-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes sommelier-dot-bounce {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ─── フェードインアニメーション（汎用） ─── */

.sommelier-fade-enter {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sommelier-fade-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── 結果表示モード ─── */

.sommelier-result-sep {
  border-top: 2px solid var(--accent-soft);
  margin: 20px 0 16px;
}

.sommelier-answer-summary {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.sommelier-answer-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sommelier-answer-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sommelier-answer-tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  white-space: nowrap;
}

.sommelier-result-intro {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.sommelier-recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.sommelier-recipe-header {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sommelier-recipe-items {
  margin-bottom: 14px;
}

.sommelier-recipe-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.sommelier-recipe-flavor {
  font-weight: 600;
  color: var(--text);
}

.sommelier-recipe-brand {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.sommelier-recipe-leaf {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.sommelier-leaf-dark {
  background: rgba(139, 90, 43, 0.25);
  color: #c49a6c;
}

.sommelier-leaf-blonde {
  background: rgba(234, 179, 8, 0.2);
  color: #d4a017;
}

.sommelier-recipe-ratio {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
}

.sommelier-recipe-note {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sommelier-result-footer {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 12px 16px;
  background: rgba(217, 119, 6, 0.06);
  border-radius: 8px;
  margin-top: 4px;
}

.sommelier-result-nav {
  flex-shrink: 0;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 8px;
}

.sommelier-result-nav[hidden] {
  display: none !important;
}

.sommelier-result-nav-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.sommelier-result-nav-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.sommelier-result-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sommelier-result-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.sommelier-result-nav-link:hover {
  border-color: var(--accent-soft);
  background: rgba(217, 119, 6, 0.1);
}

.sommelier-result-nav-link:focus {
  outline: none;
}

.sommelier-result-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ジャンプリンクのアンカーは .sommelier-recipe-header（カードタイトル上端）。scroll-margin は JS 補正と二重にならないよう 0 */
.sommelier-recipe-header[id^="sommelier-recipe-"] {
  scroll-margin-top: 0;
}

.sommelier-restart-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sommelier-restart-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sommelier-restart-btn:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

/* ========== スマホ対応 ========== */

@media (max-width: 640px) {

  /* ── 全体 ── */
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  /* ── ヘッダー ── */
  .header {
    background: rgba(13, 12, 11, 0.95);
  }

  .header-inner {
    padding: 12px 16px;
  }

  .logo {
    font-size: 0.95rem;
  }

  .nav {
    right: 16px;
    left: 16px;
    gap: 4px;
    padding: 12px;
  }

  /* ── ヒーロー ── */
  .hero {
    min-height: 45vh;
    padding: 80px 16px 32px;
  }

  .hero-inner {
    padding: 0;
  }

  .hero-label {
    font-size: 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .hero-desc {
    font-size: 0.92rem;
  }

  .hero-cta {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }

  /* ── セクション ── */
  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .section-desc {
    font-size: 0.88rem;
  }

  /* ── カード・グリッド ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-card {
    padding: 20px;
  }

  .area-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .area-card {
    min-height: 90px;
    padding: 16px;
  }

  .area-name {
    font-size: 1.05rem;
  }

  .spot-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .spot-card {
    padding: 18px;
  }

  .spot-name {
    font-size: 1rem;
  }

  .spot-desc {
    -webkit-line-clamp: 3;
  }

  .spot-block-title {
    font-size: 1.1rem;
  }

  /* ── 調査中プレースホルダー ── */
  .spots-coming-soon {
    padding: 32px 16px 40px;
  }

  .spots-coming-soon-img {
    max-width: 100%;
  }

  .spots-coming-soon-title {
    font-size: 1.2rem;
  }

  /* ── 注意書き ── */
  .notice-box {
    padding: 20px 16px;
  }

  /* ── フッター ── */
  .footer {
    padding: 32px 16px;
  }

  .footer-nav {
    font-size: 0.82rem;
    line-height: 2;
  }

  /* ── 店舗詳細モーダル ── */
  .shop-modal {
    padding: 12px;
  }

  .shop-modal-inner {
    max-width: 100%;
    padding: 20px 16px 18px;
    max-height: 85vh;
  }

  .shop-modal-content {
    padding-right: 16px;
  }

  .shop-modal-name {
    font-size: 1.15rem;
    padding-right: 28px;
  }

  .shop-modal-dl {
    grid-template-columns: 80px 1fr;
    gap: 6px 12px;
    font-size: 0.85rem;
  }

  .shop-modal-map-iframe {
    height: 200px;
  }

  /* ── 検索ページ ── */
  .search-page .search-main {
    padding: 80px 16px 40px;
  }

  .search-page-title {
    font-size: 1.35rem;
  }

  .search-panel {
    padding: 16px;
  }

  .search-panel-input {
    max-width: 100%;
  }

  .search-feature-tag {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .search-filter-bar {
    padding: 10px 12px;
    gap: 10px;
  }

  .search-filter-label {
    font-size: 0.88rem;
  }

  /* ── 検索サイドバー（折りたたみ式） ── */
  .search-sidebar {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .search-sidebar-toggle {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4);
    transition: background 0.2s, transform 0.15s;
  }

  .search-sidebar-toggle.is-open {
    border-radius: 50px;
    border-bottom: none;
    background: var(--bg-elevated);
    color: var(--accent);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .search-sidebar-inner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    background: var(--bg-deep);
    padding: 60px 20px 80px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .search-sidebar-inner.is-open {
    display: block;
    animation: filterSlideUp 0.3s ease;
  }

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

  .search-sidebar-toggle-close {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    z-index: 96;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4);
    transition: background 0.2s;
  }

  .search-sidebar-inner.is-open + .search-sidebar-toggle-close {
    display: block;
  }

  /* ── フレーバーページ ── */
  .flavors-main {
    padding: 80px 0 48px;
  }

  .flavors-layout {
    padding: 0 16px;
  }

  .flavors-page-title {
    font-size: 1.4rem;
  }

  .flavors-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .flavors-grid--brands {
    grid-template-columns: 1fr;
  }

  .flavor-card {
    padding: 18px;
  }

  .flavors-tips-block {
    padding: 16px;
  }

  .flavors-table th,
  .flavors-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .flavors-toc-list a {
    font-size: 0.72rem;
    padding: 4px 7px;
  }

  /* ── フレーバー相談（スマホ：メッセージ欄をビューポート基準で大きく確保。親flex連鎖は使わない） ── */
  .sommelier-main {
    /* 固定ヘッダー（+ safe-area）より下に本文を開始。チャットとヘッダーが被らないよう余裕を多めに */
    padding: calc(env(safe-area-inset-top, 0px) + 72px + 18px) 0 max(16px, calc(8px + env(safe-area-inset-bottom, 0px)));
  }

  .sommelier-header {
    margin-bottom: 14px;
  }

  .sommelier-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
  }

  .sommelier-desc {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .sommelier-chat-wrap {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 12px 8px;
    max-width: 100%;
  }

  .sommelier-character {
    width: 100%;
    max-width: 180px;
    padding: 12px 14px;
  }

  .sommelier-avatar {
    margin-bottom: 10px;
  }

  .sommelier-avatar--img {
    width: 88px;
    height: 88px;
  }

  .sommelier-character-name {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .sommelier-character-role {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .sommelier-chat {
    width: 100%;
    max-width: none;
    padding: 14px 14px;
    padding-bottom: max(10px, calc(4px + env(safe-area-inset-bottom, 0px)));
  }

  /* 本文は内容に合わせて伸び、長くなったら max-height でスクロール（提案説明が読めるよう高めに確保） */
  .sommelier-messages {
    flex: none;
    height: auto;
    min-height: 0;
    max-height: min(680px, calc(100vh - 150px));
    margin-bottom: 6px;
    overflow-y: auto;
  }

  @supports (height: 100svh) {
    .sommelier-messages {
      max-height: min(680px, calc(100svh - 150px));
    }
  }

  .sommelier-msg {
    margin-bottom: 10px;
  }

  .sommelier-msg-avatar {
    width: 32px;
    height: 32px;
    border-width: 1px;
  }

  .sommelier-msg-inner {
    max-width: 100%;
    font-size: 0.88rem;
    padding: 10px 12px;
  }

  .sommelier-luna-row {
    gap: 6px;
    margin-bottom: 10px;
  }

  .sommelier-result-sep {
    margin: 12px 0 10px;
  }

  .sommelier-answer-summary {
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .sommelier-result-intro {
    font-size: 0.86rem;
    padding: 10px 12px;
  }

  .sommelier-choice-btn {
    padding: 12px 16px;
    font-size: 0.88rem;
    width: 100%;
    text-align: left;
  }

  .sommelier-choices {
    flex-direction: column;
    gap: 8px;
    padding-bottom: max(8px, calc(4px + env(safe-area-inset-bottom, 0px)));
  }

  .sommelier-recipe-card {
    padding: 12px;
    overflow: visible;
  }

  .sommelier-recipe-header {
    font-size: 0.92rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .sommelier-recipe-items {
    margin-bottom: 10px;
  }

  .sommelier-recipe-row {
    font-size: 0.78rem;
    gap: 4px;
  }

  .sommelier-recipe-flavor {
    width: 100%;
  }

  .sommelier-recipe-brand {
    font-size: 0.74rem;
  }

  .sommelier-recipe-ratio {
    margin-left: 0;
  }

  .sommelier-recipe-note {
    font-size: 0.8rem;
    line-height: 1.65;
    padding-top: 10px;
  }

  .sommelier-answer-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .sommelier-result-nav {
    margin-top: 4px;
    padding: 6px 8px;
  }

  .sommelier-restart-wrap {
    margin-top: 8px;
    padding-top: 10px;
  }

  .sommelier-restart-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
  }

  /* フレーバー相談ページのみ：チャットとフッターの間の空きをさらに詰める */
  .sommelier-main + .footer {
    padding-top: 14px;
  }
}

/* ========== 利用規約ページ ========== */
.terms-main {
  padding: 100px 0 80px;
}

.terms-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.terms-updated {
  margin: 32px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
}

.terms-body {
  max-width: 780px;
}

.terms-section {
  margin-bottom: 36px;
}

.terms-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.terms-section p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section ul,
.terms-section ol {
  margin: 0;
  padding: 0 0 0 1.4em;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.terms-section li {
  margin-bottom: 6px;
}

.terms-section li:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .terms-main {
    padding: 80px 0 48px;
  }

  .terms-title {
    font-size: 1.35rem;
  }
}

