/*
Theme Name: Deriheru.jp
Theme URI: https://deriheru.jp
Description: 地域別デリヘル口コミポータル — デリヘル.jp 公式テーマ
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Private
Text Domain: deriheru
*/

:root {
  --primary: #B5465A;
  --primary-hover: #923749;
  --primary-light: #F4E0E4;
  --page-bg: #F7F6F3;
  --card-bg: #FFFFFF;
  --card-border: #E8E4DF;
  --text-body: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --divider: #E5E7EB;
  --success: #059669;
  --warning: #D97706;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --page-bg: #18181B;
  --card-bg: #27272A;
  --card-border: #3F3F46;
  --text-body: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --divider: #3F3F46;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  color-scheme: light;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--page-bg);
  color: var(--text-body);
  line-height: 1.7;
  font-size: 16px;
  transition: background-color var(--transition), color var(--transition);
}

[data-theme="dark"] {
  color-scheme: dark;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* WORDPRESS BLOCK DEFAULTS */
/* WPブロック要素自体の自動マージンのみ抑制（内部コンテンツには触れない） */
.wp-site-blocks { margin-block-start: 0; }
.wp-site-blocks > footer { margin-block-start: 0; }
.wp-block-group { margin-block-start: 0; }

/* WP が自動付与するブロック間ギャップを縮小 */
:root {
  --wp--style--block-gap: 0.875rem;
}

/* main直下のセクション間隔（.wp-block-group 同士）は wp変数に任せる */

/* HEADER & NAVIGATION */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo-link:hover {
  opacity: 0.85;
}

/* ── Crown SVG logo ── */
.site-logo-svg {
  display: block;
  height: 48px;
  width: auto;
}

/* Dark background (default) */
.site-logo-svg .logo-text-main { fill: #ffffff; }
.site-logo-svg .logo-text-jp   { fill: #C9A84C; }
.site-logo-svg .logo-text-sub  { fill: rgba(201,168,76,0.5); }
.site-logo-svg .logo-divider   { stroke: #2A1010; }

/* Light background */
[data-theme="light"] .site-logo-svg .logo-text-main,
body.theme-light    .site-logo-svg .logo-text-main { fill: #2A0808; }
[data-theme="light"] .site-logo-svg .logo-text-jp,
body.theme-light    .site-logo-svg .logo-text-jp   { fill: #9A7018; }
[data-theme="light"] .site-logo-svg .logo-text-sub,
body.theme-light    .site-logo-svg .logo-text-sub  { fill: #B08060; }
[data-theme="light"] .site-logo-svg .logo-divider,
body.theme-light    .site-logo-svg .logo-divider   { stroke: #DDD0C8; }

/* Mobile: scale down */
@media (max-width: 600px) {
  .site-logo-svg {
    height: 38px;
  }
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.header-nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
}

/* FOOTER */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-link {
  font-size: 12px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-divider {
  width: 1px;
  height: 16px;
  background: var(--divider);
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--divider);
}

.affiliate-disclosure {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
}

/* HERO SECTION */
.hero-section {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(181, 70, 90, 0.05) 100%);
  padding: 1rem 1rem 1.25rem;
}

.hero-tagline {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin-bottom: 0.5rem;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* SEARCH BAR */
.search-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.search-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.search-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.search-input {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-body);
  transition: border-color var(--transition), background-color var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.search-button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.5rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
  font-family: 'Noto Sans JP', sans-serif;
  white-space: nowrap;
}

.search-button:hover {
  background-color: var(--primary-hover);
}

/* PREFECTURE GRID */
.prefecture-section,
.ranking-section,
.reviews-section {
  padding: 1.25rem 0;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

.prefecture-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.prefecture-item {
  flex-shrink: 0;
  /* リンク側でスタイル管理するため item 自身は wrapper のみ */
}

.prefecture-item.active .prefecture-link,
.prefecture-item.highlight .prefecture-link {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

/* SHOP CARDS */
.shop-cards-grid,
.equal-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: center;
}

.shop-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.shop-card.featured {
  border-left: 4px solid var(--primary);
}

.shop-card.native-ad {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(181, 70, 90, 0.08) 100%);
  border: 1px solid var(--primary-light);
}

.shop-card.native-ad .pr-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
  font-size: 10px;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.card-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.shop-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-body);
  flex: 1;
  line-height: 1.3;
}

.area-pill {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.rating-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--divider);
}

.rating-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.rating-label {
  font-size: 11px;
  color: var(--text-muted);
}

.star-row {
  display: flex;
  gap: 0.2rem;
  font-size: 12px;
  margin-bottom: 0.5rem;
}

.star {
  color: #FCD34D;
}

.star.empty {
  color: var(--divider);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: all var(--transition);
}

.tag:hover {
  background: var(--primary);
  color: white;
}

.price-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.review-count {
  font-size: 11px;
  color: var(--text-secondary);
}

.review-count strong {
  color: var(--primary);
  font-weight: 700;
}

/* REVIEW CARDS */
.review-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.review-card.featured {
  border-left: 4px solid var(--primary);
}

.review-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.review-item:hover {
  box-shadow: var(--shadow-md);
}

.review-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--divider);
}

.reviewer-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
}

.review-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.shop-reference {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.shop-reference a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.shop-reference a:hover {
  text-decoration: underline;
}

.review-text {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 10px;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-verified {
  background: rgba(5, 150, 105, 0.15);
  color: var(--success);
}

.badge-pr {
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
}

.badge-anonymous {
  background: var(--divider);
  color: var(--text-muted);
}

/* SUB-RATINGS */
.subraitings {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 11px;
}

.subraiting-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0.5rem;
  align-items: center;
}

.subraiting-label {
  color: var(--text-muted);
  font-weight: 500;
}

.subraiting-bar {
  height: 4px;
  background: var(--divider);
  border-radius: 2px;
  overflow: hidden;
}

.subraiting-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* SORT TABS */
.sort-tabs {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.sort-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  font-family: 'Noto Sans JP', sans-serif;
}

.sort-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.sort-tab:hover {
  color: var(--text-body);
}

/* AREA TABS */
.area-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.area-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: 'Noto Sans JP', sans-serif;
}

.area-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.area-tab:hover {
  color: var(--text-body);
}

/* MONETIZATION - AFFILIATE CTA */
.affiliate-cta,
.affiliate-cta-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 0.875rem 1rem 0.875rem 1rem;
  margin: 0.75rem 0;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.affiliate-cta:hover,
.affiliate-cta-card:hover {
  box-shadow: var(--shadow-md);
}

.pr-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
  font-size: 10px;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.affiliate-content {
  padding-right: 3rem;
  margin-bottom: 0.625rem;
}

.affiliate-text {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 0.2rem;
}

.affiliate-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

.affiliate-button {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.125rem 0.45rem; /* 日本語フォントの光学的中心補正 */
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color var(--transition);
  font-family: 'Noto Sans JP', sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.affiliate-button:hover {
  background-color: var(--primary-hover);
  color: white !important;
}

/* NATIVE AD CARD - DMM/FANZA */
.native-ad-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

.native-ad-card:hover {
  box-shadow: var(--shadow-md);
}

.ad-image-placeholder {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #E8D5DC 0%, #F4E0E4 100%);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}

.ad-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 0.5rem;
}

.ad-price {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ad-rating {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  font-size: 12px;
}

.ad-star {
  color: #FCD34D;
}

.ad-view-button {
  width: 100%;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-light);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Noto Sans JP', sans-serif;
}

.ad-view-button:hover {
  background: var(--primary);
  color: white;
}

/* AD SLOTS */
.ad-slot {
  border: 2px dashed var(--divider);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  margin-bottom: 1.5rem;
}

.ad-slot::before {
  content: '広告';
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.ad-slot-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.ad-slot-dimensions {
  color: var(--text-muted);
  font-size: 11px;
}

.ad-slot--leaderboard {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto 1.5rem;
}

.ad-slot--rectangle {
  width: 300px;
  height: 250px;
  margin-bottom: 1.5rem;
}

.ad-slot--feed {
  width: 100%;
  height: 300px;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideIn 0.7s ease forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  animation: slideIn 0.7s ease forwards;
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* EDITOR VISIBILITY */
.editor-styles-wrapper .fade-up,
.editor-styles-wrapper .fade-in,
.editor-styles-wrapper .slide-in-left,
.editor-styles-wrapper .slide-in-right,
.editor-styles-wrapper .scale-up,
.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .stagger-children > * {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* ACCESSIBILITY - REDUCE MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll,
  .fade-up,
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .prefecture-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .shop-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 16px;
  }

  .search-bar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .prefecture-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .prefecture-item {
    font-size: 10px;
    padding: 0.5rem 0.25rem;
  }

  .shop-cards-grid,
  .equal-cards {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 14px;
  }

  .shop-name {
    font-size: 13px;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-divider {
    display: none;
  }
}

/* PRINT STYLES */
@media print {
  .ad-slot,
  .affiliate-cta,
  .affiliate-cta-card,
  .native-ad-card,
  .theme-toggle,
  .header-actions {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}

/* ============================================================
   DYNAMIC SHOP DETAIL (deriheru_render_shop_detail)
   ============================================================ */

.shop-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.deriheru-shop-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.shop-meta-header {
  margin-bottom: 0.5rem;
}

/* Score box */
.score-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.overall-score-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.overall-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.score-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.score-max {
  font-size: 13px;
  color: var(--text-muted);
}

.review-count-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.review-count-text strong {
  color: var(--primary);
}

.sub-ratings-detail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--divider);
  padding-top: 0.75rem;
}

.subraiting-row {
  display: grid;
  grid-template-columns: 60px 1fr 32px;
  gap: 0.5rem;
  align-items: center;
  font-size: 12px;
}

.subraiting-val {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* Shop info */
.shop-info-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.shop-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-row {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
  align-items: baseline;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  width: 80px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

.info-value {
  color: var(--text-body);
}

.info-value a {
  color: var(--primary);
  text-decoration: none;
}

/* Review list (shared) */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-author {
  font-size: 13px;
  color: var(--text-body);
}

.review-rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.review-axes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.axis-item {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
}

.review-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divider);
}

.helpful-btn {
  background: none;
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Noto Sans JP', sans-serif;
}

.helpful-btn:hover,
.helpful-btn.voted {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--primary);
}

.helpful-count {
  font-weight: 700;
}

.no-reviews {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px dashed var(--divider);
}

/* Review form */
.review-form-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.review-form-section .comment-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  display: block;
  margin-bottom: 0.4rem;
}

.review-form-section .comment-form textarea,
.review-form-section .comment-form input[type="text"],
.review-form-section .comment-form input[type="email"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg-base);
  color: var(--text-body);
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.review-form-section .comment-form textarea:focus,
.review-form-section .comment-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.review-form-section .comment-form-rating {
  margin-bottom: 1rem;
}

.badge-ai {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

.review-ai-note {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted, #9ca3af);
  font-style: italic;
}

/* Shop grid (shortcode output) */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.shop-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.shop-card-link:hover .shop-name {
  color: var(--primary);
}

/* Prefecture grid (shortcode output) */
.prefecture-link {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.5;
  vertical-align: middle;
}

.prefecture-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.prefecture-count {
  font-size: 0.82em;
  color: var(--text-muted);
  vertical-align: baseline;
}

/* Area hero */
.area-hero .wp-block-term-title,
.area-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.area-description {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overall-score {
    font-size: 2.25rem;
  }

  .subraiting-row {
    grid-template-columns: 52px 1fr 28px;
  }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .info-label {
    width: 68px;
  }
}

/* ============================================================
   エリア選択プルダウン
   ============================================================ */
.area-select-form {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 0;
}

/* ヒーロー内の検索パネルでは余白ゼロ */
.search-tab-panel .area-select-form {
  margin: 0;
  width: 100%;
}

.area-select-dropdown {
  width: 100%;
  max-width: 400px;
  padding: 0.55rem 0.875rem;
  font-size: 0.9rem;
  border: 2px solid var(--accent, #b5465a);
  border-radius: 8px;
  background: var(--bg-card, #fff);
  color: var(--text-primary, #1a1a2e);
  cursor: pointer;
  appearance: auto;
}

/* ヒーローパネル内のプルダウンは幅いっぱい */
.search-tab-panel .area-select-dropdown {
  max-width: 100%;
}

.area-select-dropdown:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(181,70,90,0.25);
}

/* ============================================================
   ヘッダーナビゲーション
   ============================================================ */
.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header-nav a {
  color: var(--text-primary, #1a1a2e);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--accent, #b5465a);
}

/* ============================================================
   ホテル一覧グリッド
   ============================================================ */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.hotel-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.hotel-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.hotel-card-link {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.hotel-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a2e);
  display: block;
  margin-bottom: 0.25rem;
}

/* ホテルカード: 最寄り駅 */
.hotel-card-station {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin: 0.1rem 0 0.4rem;
}

/* ホテルカード: 3指標バッジ */
.hotel-card-stats {
  display: flex;
  gap: 5px;
  margin: 0.4rem 0 0.2rem;
}

.card-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 2px;
  border-radius: 8px;
  line-height: 1.2;
}

.cs-called      { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.cs-conditional { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.cs-not-called  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.cs-num {
  font-size: 1.05rem;
  font-weight: 700;
}

.cs-lbl {
  font-size: 0.6rem;
  white-space: nowrap;
}

/* 旧バースタイル（後方互換） */
.call-mini-bar {{
  width: 100%;
  height: 8px;
  background: var(--call-not-bg, #fecdd3);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0 0.25rem;
}

.call-mini-called {
  height: 100%;
  background: var(--call-yes, #16a34a);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.call-pct-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--call-yes, #16a34a);
  margin-right: 0.5rem;
}

.call-count-label {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
}

.no-votes {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  margin: 0.5rem 0 0;
}

/* ============================================================
   ホテル詳細ページ
   ============================================================ */
.hotel-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.hotel-call-meter {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.call-meter-bar {
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.call-meter-called {
  background: var(--call-yes, #16a34a);
  transition: width 0.5s ease;
}

.call-meter-not {
  background: var(--call-not-bg, #fecdd3);
  transition: width 0.5s ease;
}

.call-meter-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.call-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.call-label.called {
  color: var(--call-yes, #16a34a);
}

.call-label.not-called {
  color: var(--accent, #b5465a);
}

.call-total {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  margin: 0;
}

.hotel-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.hotel-info-table th,
.hotel-info-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  text-align: left;
  vertical-align: top;
}

.hotel-info-table th {
  width: 100px;
  color: var(--text-muted, #9ca3af);
  font-weight: 500;
}

.hotel-notes {
  background: var(--bg-secondary, #f9fafb);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ホテル口コミカード */
.hotel-reviews {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hotel-review-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.hotel-review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.call-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.call-badge.called {
  background: #dcfce7;
  color: #16a34a;
}

.call-badge.not-called {
  background: #ffe4e6;
  color: #be123c;
}

.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a2e);
}

.review-date {
  font-size: 0.78rem;
  color: var(--text-muted, #9ca3af);
  margin-left: auto;
}

/* 投稿フォーム */
.hotel-vote-form-wrap {
  background: var(--bg-secondary, #f9fafb);
  border-radius: 12px;
  padding: 1.5rem;
}

.hotel-vote-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.call-result-group {
  display: flex;
  gap: 1rem;
}

.call-radio-label {
  flex: 1;
  cursor: pointer;
}

.call-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
}

.call-radio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.15s;
  background: var(--bg-card, #fff);
  user-select: none;
}

.call-radio-label input:checked + .call-radio-btn.called,
.call-radio-label:has(input:checked) .call-radio-btn.called {
  background: #dcfce7;
  border-color: #16a34a;
  color: #16a34a;
}

.call-radio-label input:checked + .call-radio-btn.not-called,
.call-radio-label:has(input:checked) .call-radio-btn.not-called {
  background: #ffe4e6;
  border-color: #be123c;
  color: #be123c;
}

.call-radio-btn.called { color: var(--call-yes, #16a34a); }
.call-radio-btn.not-called { color: var(--accent, #b5465a); }

.hotel-comment-text,
.hotel-author-input,
.hotel-email-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-card, #fff);
  color: var(--text-primary, #1a1a2e);
  box-sizing: border-box;
  resize: vertical;
}

.hotel-form-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .hotel-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .call-result-group {
    flex-direction: column;
  }

  .hotel-form-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .hotel-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   トップページ：デリヘル / ホテル 両対応ヒーロー
   ============================================================ */
/* ── Hero logo ── */
.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 0.875rem;
}

.hero-logo-svg {
  width: 260px;
  height: auto;
}

/* ヒーローは明るい背景なので、テキスト色を上書き（ダークモード無関係に固定） */
.hero-logo-svg .logo-text-main { fill: #2A0808 !important; }
.hero-logo-svg .logo-text-jp   { fill: #9A7018 !important; }
.hero-logo-svg .logo-text-sub  { fill: #B08060 !important; }
.hero-logo-svg .logo-divider   { stroke: #DDD0C8 !important; }

@media (max-width: 480px) {
  .hero-logo-svg {
    width: 200px;
  }
}

/* ── Hero search tabs ── */
.hero-search-tabs {
  margin: 0 0 0.5rem;
}

.search-tab-group {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-tab-panel {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.search-tab-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary, #555);
  margin: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.search-tab-divider {
  width: 1px;
  background: var(--border, #e5e7eb);
  margin: 0.75rem 0;
}

.btn-hotel-top {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(135deg, #1a4d7a, #2563eb);
  color: #fff !important;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-hotel-top:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

@media (max-width: 540px) {
  .search-tab-group {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .search-tab-divider {
    width: auto;
    height: 1px;
    margin: 0 0.75rem;
  }
  .search-tab-panel {
    padding: 0.6rem 0.875rem;
  }
}


/* ============================================================
   投稿者ランキング
   ============================================================ */

.contributor-ranking {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contrib-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  transition: background var(--transition);
}

.contrib-row--me {
  background: var(--primary-light);
  border-color: var(--primary);
}

.contrib-rank {
  font-size: 1.15rem;
  min-width: 1.75rem;
  text-align: center;
  line-height: 1;
}

.contrib-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.contrib-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.contrib-likes   { color: var(--primary); font-weight: 600; }
.contrib-reviews { color: var(--text-secondary); }
.contrib-you     { font-size: 11px; color: var(--primary); }

/* バッジ */
.contrib-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-king    { background: #fef3c7; color: #b45309; border: 1px solid #f59e0b; }
.badge-popular { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary); }
.badge-regular { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.badge-active  { background: #f8fafc; color: #475569; border: 1px solid #cbd5e1; }

.contrib-empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 0.75rem;
}

/* 自分の統計カード */
.my-stats-card {
  background: var(--card-bg);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.625rem;
}

.my-stats-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.my-stats-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
}

.my-stats-grid {
  display: flex;
  flex-direction: row;
  gap: 0.35rem;
}

.my-stat {
  flex: 1;
  text-align: center;
  padding: 0.35rem 0.25rem;
  background: #f5f5f5;
  border-radius: 5px;
}

.my-stat-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.my-stat-label {
  display: block;
  font-size: 9px;
  color: #9CA3AF;
  white-space: nowrap;
  line-height: 1.2;
}

@media (max-width: 540px) {
  .my-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contrib-stats {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* ── contributor section ── */
.contributor-section {
  margin-bottom: 1.25rem;
}

.contributor-section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

/* ── ヒーロー内ランキングリンク ── */
.hero-ranking-link {
  text-align: center;
  margin-top: 0.75rem;
}

.hero-ranking-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 0.3rem 0.875rem;
  text-decoration: none;
  background: rgba(255,255,255,0.7);
  transition: background var(--transition), color var(--transition);
}

.hero-ranking-btn:hover {
  background: var(--primary);
  color: #fff;
}

