/* ============================================
   elepay Demo - Common Style
   ============================================ */

:root {
  --primary: #00aaa6;
  --primary-dark: #008b87;
  --secondary: #e60012;
  --secondary-dark: #b3000d;
  --accent: #ff6b6b;
  --bg-base: #f6f9fc;
  --bg-card: #ffffff;
  --text-main: #1a2332;
  --text-sub: #5a6878;
  --text-light: #8a96a3;
  --border: #e3e8ef;
  --border-strong: #cbd4df;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-hero: linear-gradient(135deg, #00aaa6 0%, #1e40af 50%, #e60012 100%);
  --gradient-card: linear-gradient(135deg, #f0fdfc 0%, #fef2f2 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--bg-base);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-hero);
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.05em;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 0.95rem;
}

.nav-list a {
  color: var(--text-sub);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--text-main);
  color: white;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s, background 0.2s;
}

.nav-cta:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .nav-list { display: none; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  background: var(--gradient-hero);
  color: white;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 720px;
  margin: 0 auto 40px;
  opacity: 0.92;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: white;
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-solid {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-solid:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* ============================================
   Stats / Hero Stats
   ============================================ */
.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 60px auto 0;
}

.hero-stat {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.hero-stat .num {
  font-size: 2rem;
  font-weight: 800;
  display: block;
}

.hero-stat .label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ============================================
   Section
   ============================================ */
.section {
  padding: 80px 24px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 720px;
  margin: 0 auto;
}

/* ============================================
   Payment Methods Grid
   ============================================ */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.pm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: default;
}

.pm-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.pm-logo {
  width: 80px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow: hidden;
}

/* 公式ロゴ画像版 */
.pm-logo.has-logo {
  background: white;
  border: 1px solid var(--border);
  padding: 6px;
}

.pm-logo.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pm-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.pm-cat {
  font-size: 0.65rem;
  color: var(--text-light);
  margin-top: 2px;
}

.pm-section-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.pm-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
}

.pm-tab.active {
  background: var(--text-main);
  color: white;
  border-color: var(--text-main);
}

.pm-tab:not(.active):hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   Features Grid
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

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

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
}

/* ============================================
   Use Case Cards
   ============================================ */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.usecase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.usecase-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.usecase-thumb {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.usecase-thumb.bg-1 { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); }
.usecase-thumb.bg-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.usecase-thumb.bg-3 { background: linear-gradient(135deg, #fa709a, #fee140); }
.usecase-thumb.bg-4 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #5a6878;}
.usecase-thumb.bg-5 { background: linear-gradient(135deg, #667eea, #764ba2); }
.usecase-thumb.bg-6 { background: linear-gradient(135deg, #30cfd0, #330867); }

.usecase-body {
  padding: 24px;
}

.usecase-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-base);
  color: var(--primary-dark);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.usecase-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.usecase-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 14px;
  line-height: 1.6;
}

.usecase-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.usecase-link::after {
  content: "→";
  transition: transform 0.2s;
}

.usecase-link:hover::after {
  transform: translateX(4px);
}

/* ============================================
   Implementation Pattern Cards
   ============================================ */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.pattern-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
}

.pattern-card.recommended {
  border-color: var(--primary);
  border-width: 2px;
}

.pattern-card .recommended-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.pattern-effort {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-base);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.pattern-effort.low { color: var(--success); }
.pattern-effort.mid { color: var(--warning); }
.pattern-effort.high { color: var(--danger); }

.pattern-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pattern-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.pattern-list {
  list-style: none;
  font-size: 0.85rem;
}

.pattern-list li {
  padding: 6px 0;
  display: flex;
  gap: 6px;
  color: var(--text-sub);
}

.pattern-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
}

/* ============================================
   Demo Page Common
   ============================================ */
.demo-page {
  background: var(--bg-base);
  min-height: 100vh;
}

.demo-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.demo-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 24px;
  font-weight: 500;
}

.demo-back:hover { color: var(--primary); }

.demo-header {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.demo-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.demo-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.demo-subtitle {
  color: var(--text-sub);
  font-size: 1rem;
}

/* ============================================
   Card / Panel
   ============================================ */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card + .card { margin-top: 16px; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ============================================
   Product / Item
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--gradient-card);
}

.product-body {
  padding: 16px;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.product-cat {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* ============================================
   Cart
   ============================================ */
.cart-summary {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: sticky;
  top: 90px;
}

.cart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-row:last-of-type { border-bottom: none; }

.cart-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.cart-meta { font-size: 0.75rem; color: var(--text-light); }
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}
.cart-qty button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: white;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-sub);
}
.cart-qty button:hover { color: var(--primary); border-color: var(--primary); }
.cart-price { font-weight: 700; font-size: 0.9rem; }

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 16px 0;
  border-top: 2px solid var(--text-main);
  margin-top: 12px;
}

/* ============================================
   Form
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 170, 166, 0.12);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--text-main);
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: white;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  font-size: 0.9rem;
}

.footer-col li { padding: 4px 0; }
.footer-col a {
  opacity: 0.85;
  transition: opacity 0.2s;
}
.footer-col a:hover { opacity: 1; }

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  opacity: 0.6;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================
   Demo Banner / Notice
   ============================================ */
.demo-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-bottom: 1px solid #fbbf24;
  padding: 8px 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: #78350f;
}

/* ============================================
   Pricing-like rows
   ============================================ */
.row-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-sub);
}
.row-line.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ============================================
   Ribbon / Pill
   ============================================ */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pill-success { background: #d1fae5; color: #065f46; }
.pill-warning { background: #fef3c7; color: #92400e; }
.pill-info { background: #dbeafe; color: #1e40af; }
.pill-danger { background: #fee2e2; color: #991b1b; }

/* ============================================
   Step Indicator
   ============================================ */
.steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-item {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-light);
}

.step-item.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-item.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
}

.step-item.active .step-label { color: var(--primary); }

/* ============================================
   Code block
   ============================================ */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius-sm);
  font-family: "SF Mono", Monaco, Menlo, "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}

.code-block .comment { color: #94a3b8; }
.code-block .keyword { color: #c084fc; }
.code-block .string { color: #86efac; }
.code-block .number { color: #fbbf24; }

/* ============================================
   Modal: elepay payment modal mock
   ============================================ */
.elepay-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.elepay-modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.elepay-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.elepay-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.elepay-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.elepay-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-base);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-sub);
}

.elepay-modal-body {
  padding: 20px 24px;
}

.elepay-amount {
  text-align: center;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.elepay-amount-label {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.elepay-amount-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.elepay-amount-order {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
  font-family: "SF Mono", Monaco, monospace;
}

.pay-method-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-method-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}

.pay-method-item:hover {
  border-color: var(--primary);
  background: rgba(0, 170, 166, 0.04);
}

.pay-method-logo {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.6rem;
  text-align: center;
  line-height: 1;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  overflow: hidden;
}

/* 公式ロゴ画像版 (モーダル決済方法選択用) */
.pay-method-logo.has-logo {
  background: white;
  border: 1px solid var(--border);
  padding: 4px;
}

.pay-method-logo.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pay-method-info { flex: 1; }

.pay-method-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.pay-method-desc {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
}

.pay-method-arrow {
  color: var(--text-light);
  font-size: 1.2rem;
}

.pay-screen {
  padding: 24px 0;
  text-align: center;
}

.pay-screen .qr-box {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  background: white;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-screen .qr-box .qr-pattern {
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%23ffffff'/><g fill='%23000'><rect x='0' y='0' width='28' height='28'/><rect x='4' y='4' width='20' height='20' fill='%23fff'/><rect x='8' y='8' width='12' height='12'/><rect x='72' y='0' width='28' height='28'/><rect x='76' y='4' width='20' height='20' fill='%23fff'/><rect x='80' y='8' width='12' height='12'/><rect x='0' y='72' width='28' height='28'/><rect x='4' y='76' width='20' height='20' fill='%23fff'/><rect x='8' y='80' width='12' height='12'/><rect x='32' y='0' width='4' height='4'/><rect x='40' y='0' width='4' height='4'/><rect x='48' y='0' width='8' height='4'/><rect x='60' y='0' width='4' height='4'/><rect x='32' y='8' width='8' height='4'/><rect x='44' y='4' width='4' height='8'/><rect x='52' y='8' width='4' height='4'/><rect x='60' y='4' width='8' height='4'/><rect x='32' y='16' width='4' height='4'/><rect x='40' y='16' width='4' height='4'/><rect x='48' y='12' width='4' height='4'/><rect x='56' y='16' width='4' height='4'/><rect x='32' y='24' width='4' height='4'/><rect x='40' y='24' width='8' height='4'/><rect x='52' y='24' width='4' height='4'/><rect x='60' y='24' width='4' height='4'/><rect x='0' y='32' width='4' height='4'/><rect x='8' y='32' width='4' height='4'/><rect x='16' y='32' width='4' height='8'/><rect x='24' y='36' width='4' height='4'/><rect x='32' y='32' width='4' height='4'/><rect x='40' y='32' width='8' height='8'/><rect x='52' y='36' width='4' height='4'/><rect x='60' y='32' width='4' height='4'/><rect x='68' y='32' width='4' height='4'/><rect x='76' y='32' width='8' height='4'/><rect x='88' y='32' width='4' height='4'/><rect x='96' y='32' width='4' height='4'/><rect x='4' y='40' width='4' height='4'/><rect x='12' y='40' width='4' height='4'/><rect x='20' y='40' width='4' height='4'/><rect x='28' y='40' width='4' height='4'/><rect x='36' y='40' width='4' height='4'/><rect x='48' y='40' width='4' height='4'/><rect x='56' y='40' width='4' height='4'/><rect x='64' y='40' width='4' height='4'/><rect x='72' y='40' width='4' height='4'/><rect x='80' y='40' width='4' height='4'/><rect x='88' y='40' width='4' height='4'/><rect x='96' y='40' width='4' height='4'/><rect x='0' y='48' width='4' height='4'/><rect x='8' y='48' width='8' height='4'/><rect x='20' y='48' width='4' height='4'/><rect x='28' y='48' width='4' height='4'/><rect x='36' y='48' width='4' height='4'/><rect x='44' y='48' width='4' height='4'/><rect x='52' y='48' width='4' height='4'/><rect x='64' y='48' width='4' height='4'/><rect x='76' y='48' width='4' height='4'/><rect x='84' y='48' width='4' height='4'/><rect x='92' y='48' width='4' height='4'/><rect x='0' y='56' width='4' height='4'/><rect x='12' y='56' width='4' height='4'/><rect x='20' y='56' width='8' height='4'/><rect x='32' y='56' width='4' height='4'/><rect x='40' y='56' width='4' height='4'/><rect x='48' y='56' width='4' height='4'/><rect x='56' y='56' width='4' height='4'/><rect x='64' y='56' width='4' height='4'/><rect x='72' y='56' width='4' height='4'/><rect x='80' y='56' width='4' height='4'/><rect x='88' y='56' width='4' height='4'/><rect x='4' y='64' width='4' height='4'/><rect x='12' y='64' width='4' height='4'/><rect x='24' y='64' width='4' height='4'/><rect x='36' y='64' width='4' height='4'/><rect x='44' y='64' width='4' height='4'/><rect x='52' y='64' width='4' height='4'/><rect x='60' y='64' width='4' height='4'/><rect x='68' y='64' width='4' height='4'/><rect x='76' y='64' width='4' height='4'/><rect x='84' y='64' width='4' height='4'/><rect x='96' y='64' width='4' height='4'/><rect x='32' y='72' width='4' height='4'/><rect x='40' y='72' width='4' height='4'/><rect x='48' y='72' width='8' height='4'/><rect x='60' y='72' width='4' height='4'/><rect x='72' y='72' width='4' height='4'/><rect x='80' y='72' width='4' height='4'/><rect x='88' y='72' width='4' height='4'/><rect x='96' y='72' width='4' height='4'/><rect x='32' y='80' width='4' height='4'/><rect x='40' y='80' width='4' height='4'/><rect x='52' y='80' width='4' height='4'/><rect x='64' y='80' width='4' height='4'/><rect x='72' y='80' width='4' height='4'/><rect x='84' y='80' width='4' height='4'/><rect x='96' y='80' width='4' height='4'/><rect x='32' y='88' width='4' height='4'/><rect x='44' y='88' width='4' height='4'/><rect x='52' y='88' width='8' height='4'/><rect x='64' y='88' width='4' height='4'/><rect x='76' y='88' width='4' height='4'/><rect x='84' y='88' width='4' height='4'/><rect x='92' y='88' width='4' height='4'/><rect x='32' y='96' width='4' height='4'/><rect x='40' y='96' width='4' height='4'/><rect x='48' y='96' width='4' height='4'/><rect x='56' y='96' width='8' height='4'/><rect x='68' y='96' width='4' height='4'/><rect x='76' y='96' width='4' height='4'/><rect x='84' y='96' width='4' height='4'/><rect x='92' y='96' width='4' height='4'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.pay-screen .pay-msg {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.pay-screen .pay-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pay-success {
  text-align: center;
  padding: 24px 0;
}

.pay-success .check-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: pop 0.4s ease;
}

@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.pay-success-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.pay-success-msg {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.pay-receipt {
  background: var(--bg-base);
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  margin: 16px 0;
}

.pay-receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
}

.pay-receipt-row .label { color: var(--text-sub); }
.pay-receipt-row .value { font-weight: 600; font-family: "SF Mono", Monaco, monospace; }

.pay-cc-form { display: flex; flex-direction: column; gap: 12px; }

.elepay-modal-footer {
  padding: 12px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.elepay-modal-footer .secure-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
}

/* ============================================
   Two-column layout
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ============================================
   Tab Component
   ============================================ */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================
   Plan Card (subscription)
   ============================================ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.plan-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card.featured {
  border-color: var(--primary);
}

.plan-card.featured::before {
  content: "おすすめ";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.plan-price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
}

.plan-desc {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.plan-features {
  list-style: none;
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.plan-features li {
  padding: 6px 0;
  display: flex;
  gap: 8px;
}

.plan-features li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
}

/* ============================================
   Dashboard
   ============================================ */
.dash-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.dash-side {
  background: #1a2332;
  color: rgba(255, 255, 255, 0.85);
  padding: 24px 16px;
}

.dash-side .logo { color: white; margin-bottom: 32px; }

.dash-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.15s;
}

.dash-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.dash-nav a.active {
  background: var(--primary);
  color: white;
}

.dash-main {
  padding: 32px;
  background: var(--bg-base);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.dash-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.kpi-trend {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
}

.kpi-trend.down { color: var(--danger); }

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

.dash-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-sub);
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
}

.dash-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.dash-table tbody tr:hover { background: var(--bg-base); }

.mono { font-family: "SF Mono", Monaco, monospace; font-size: 0.85em; }

@media (max-width: 768px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side { display: none; }
}

/* ============================================
   Utility
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
