/*
Theme Name: DENKON MATCH
Theme URI: https://example.com/denkon-match
Author: M365 Copilot
Description: 電気工事ビジネスマッチングサイト向けWordPressテーマ（添付index.html準拠の修正版）
Version: 0.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: denkon-match
*/

:root {
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --secondary: #20970B;
  --neutral: #9C9C9C;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --text: #0A0A0A;
  --text-secondary: #6B6B6B;
  --border: #E8E8EC;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --ring: 0 0 0 3px rgba(99, 102, 241, 0.12);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 4px 12px rgba(99, 102, 241, 0.35);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.section-muted {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  backdrop-filter: blur(14px);
  background: rgba(250, 250, 250, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--surface);
  font-family: 'General Sans', 'DM Sans', sans-serif;
}

.logo-text {
  font-family: 'General Sans', 'DM Sans', sans-serif;
}

.main-nav,
.nav-actions,
.hero-actions,
.chips,
.hero-stats,
.listing-meta,
.listing-foot,
.footer-links {
  display: flex;
  align-items: center;
}

.main-nav {
  gap: 6px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.main-nav a:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-actions {
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--border);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-lg {
  min-height: 44px;
  padding: 12px 24px;
}

.full {
  width: 100%;
}

.hero {
  padding-top: 72px;
}

.hero-grid,
.premium-wrap,
.escrow-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
}

h1, h2, h3 {
  margin: 0;
  font-family: 'General Sans', 'DM Sans', sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h1 {
  font-size: clamp(40px, 6vw, 72px);
}

h2 {
  font-size: clamp(28px, 3vw, 48px);
}

h3 {
  font-size: 24px;
}

.lead,
.section-head p,
.premium-copy p,
.escrow-box p,
.flow-step p,
.feature-card p,
.listing-body p,
.panel-card p,
.site-footer p {
  color: var(--text-secondary);
}

.hero-copy .lead {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: 17px;
}

.hero-actions {
  gap: 12px;
  margin-top: 28px;
}

.search-panel,
.panel-card,
.trust-card,
.feature-card,
.listing-card,
.pricing-card,
.point-card,
.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.search-panel {
  margin-top: 28px;
  padding: 16px;
}

.search-bar {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 12px;
}

.search-icon,
.shortcut {
  color: var(--text-secondary);
}

.shortcut {
  padding: 4px 8px;
  border-radius: 9999px;
  background: #f1f1f4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.search-bar input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--neutral);
}

.chips {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.chip,
.pill,
.panel-tag {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid transparent;
}

.chip {
  background: #f1f1f4;
  color: var(--text-secondary);
}

.chip.active,
.pill {
  background: var(--primary);
  color: #fff;
}

.pill.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.hero-stats {
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats div {
  min-width: 120px;
}

.hero-stats strong,
.trust-item strong,
.price {
  display: block;
  font-family: 'General Sans', 'DM Sans', sans-serif;
  letter-spacing: -0.03em;
}

.hero-stats span,
.trust-label,
.meta-text,
.listing-foot span,
.panel-list span,
.price-head p,
.price-list,
.point-card span {
  color: var(--text-secondary);
}

.hero-panel {
  display: grid;
  gap: 16px;
}

.panel-card,
.pricing-card {
  padding: 24px;
}

.panel-featured {
  position: relative;
  overflow: hidden;
}

.panel-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.7;
  pointer-events: none;
}

.panel-featured > * {
  position: relative;
}

.panel-header,
.trust-card,
.price-head,
.price-list,
.panel-list {
  display: grid;
  gap: 12px;
}

.panel-header {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--success);
}

.panel-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.panel-card h2 {
  margin-top: 8px;
  font-size: clamp(24px, 3vw, 32px);
}

.panel-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
}

.panel-list li,
.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.panel-list li:first-child,
.price-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.trust-card {
  padding: 18px;
}

.trust-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.trust-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.section-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-head.split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.card-grid.three,
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-card,
.flow-step {
  padding: 24px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.feature-card:hover,
.listing-card:hover,
.flow-step:hover,
.point-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 20px;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--primary);
  font-weight: 500;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.listing-card {
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.listing-cover {
  height: 200px;
  border-bottom: 1px solid var(--border);
  background-color: #f3f4f6;
  background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.18));
  position: relative;
}

.listing-cover::after {
  content: '';
  position: absolute;
  inset: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.18);
}

.listing-cover-2 {
  background-image: linear-gradient(135deg, rgba(32, 151, 11, 0.08), rgba(99, 102, 241, 0.18));
}

.listing-cover-3 {
  background-image: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(99, 102, 241, 0.18));
}

.listing-body {
  padding: 20px;
}

.listing-meta,
.listing-foot {
  justify-content: space-between;
  gap: 12px;
}

.listing-meta {
  margin-bottom: 12px;
}

.listing-body h3 {
  font-size: 24px;
}

.listing-foot {
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.check-list,
.price-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-top: 12px;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 700;
}

.price {
  font-size: clamp(42px, 4vw, 56px);
  margin: 18px 0;
}

.price span {
  font-size: 18px;
  color: var(--text-secondary);
}

.escrow-points {
  display: grid;
  gap: 16px;
}

.point-card {
  padding: 20px;
}

.point-card strong,
.flow-step span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.flow-step h3 {
  margin-top: 6px;
  margin-bottom: 8px;
}

.site-footer {
  padding: 28px 0 40px;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-links {
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
}

@media (max-width: 1080px) {
  .hero-grid,
  .premium-wrap,
  .escrow-box,
  .listing-grid,
  .card-grid.three,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .section-head.split,
  .footer-wrap,
  .nav-wrap {
    display: grid;
    gap: 16px;
  }

  .main-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(var(--container), calc(100% - 32px));
  }

  .section {
    padding: 48px 0;
  }

  .main-nav {
    display: none;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .listing-body h3,
  h3 {
    font-size: 21px;
  }
}

/* --- Additional layout/components for WordPress lower pages --- */
.form-card,
.dashboard-card,
.profile-card,
.detail-card,
.notice-card,
.stat-card,
.list-row,
.hero-slab,
.info-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.form-card,
.dashboard-card,
.profile-card,
.detail-card,
.notice-card,
.stat-card,
.hero-slab {
  padding: 24px;
}
.register-grid,
.login-grid,
.detail-layout,
.profile-layout,
.submit-layout,
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}
.sidebar-stack,
.list-stack,
.profile-panels,
.detail-panels,
.dashboard-panels,
.stats-grid,
.stack {
  display: grid;
  gap: 24px;
}
.dashboard-panels,
.profile-panels,
.detail-panels,
.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid,
.field-group {
  display: grid;
  gap: 16px;
}
.form-grid.two,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field-group label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}
select,
textarea,
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
}
textarea {
  min-height: 132px;
  resize: vertical;
}
textarea::placeholder,
select::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="date"]::placeholder,
input[type="search"]::placeholder {
  color: var(--neutral);
}
.checkbox-row,
.radio-row,
.inline-actions,
.split-head,
.toolbar,
.tab-nav,
.metric-inline,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.choice input {
  width: 16px;
  height: 16px;
}
.notice-card.warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.04);
}
.notice-card.success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.04);
}
.list-row {
  padding: 20px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.list-row:hover,
.dashboard-card:hover,
.profile-card:hover,
.detail-card:hover,
.stat-card:hover,
.notice-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.list-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.list-row-body {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  margin-top: 12px;
}
.hero-slab .search-bar {
  display: grid;
  grid-template-columns: 1fr 180px 150px auto;
  gap: 12px;
  margin-top: 20px;
  border: 0;
  padding: 0;
}
.hero-slab .search-bar input,
.hero-slab .search-bar select {
  min-height: 52px;
}
.stat-number {
  display: block;
  font-family: 'General Sans', 'DM Sans', sans-serif;
  letter-spacing: -0.03em;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  margin-bottom: 8px;
}
.status-chip {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
}
.status-chip.status-open {
  background: var(--primary);
  color: #fff;
}
.status-chip.status-safe {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.status-chip.status-progress {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}
.meta-list,
.clean-list,
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.meta-list li,
.timeline li {
  position: relative;
  padding-left: 18px;
  margin-top: 12px;
}
.meta-list li::before,
.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--primary);
}
.info-item {
  padding: 14px 16px;
  background: #FCFCFD;
  border-radius: var(--radius-md);
}
.info-item strong {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.masked-block {
  position: relative;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), rgba(99, 102, 241, 0.08));
  overflow: hidden;
}
.masked-block::after {
  content: 'Premiumで詳細閲覧';
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}
.masked-line {
  height: 14px;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.22));
  margin-top: 10px;
}
.masked-line.w-90 { width: 90%; }
.masked-line.w-70 { width: 70%; }
.masked-line.w-50 { width: 50%; }
.tab-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--surface);
}
.tab-nav a.active {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.06);
}
@media (max-width: 1080px) {
  .register-grid,
  .login-grid,
  .detail-layout,
  .profile-layout,
  .submit-layout,
  .dashboard-grid,
  .dashboard-panels,
  .profile-panels,
  .detail-panels,
  .stats-grid,
  .form-grid.two,
  .info-grid,
  .hero-slab .search-bar {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .toolbar,
  .split-head,
  .inline-actions,
  .metric-inline,
  .tab-nav {
    flex-direction: column;
    align-items: stretch;
  }
}
