@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');

/* =========================================
   App Card v1.3.0 - フロントエンド
   ========================================= */

.arc-wrap {
  --arc-accent:       #E8453C;
  --arc-accent-light: #ff6b63;
  --arc-primary:      #1a3a5c;
  --arc-header-from:  #1a7a6e;
  --arc-header-to:    #2a9d8f;
  --arc-header-text:  #ffffff;
  --arc-header-sub:   #b0e0d8;
  --arc-progress-bg:  #e8ecf0;
  --arc-card-border:  #e0e4ea;

  font-family: 'Noto Sans JP', sans-serif;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 32px;
  box-sizing: border-box;
}
.arc-wrap *, .arc-wrap *::before, .arc-wrap *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

/* ── ヘッダー ── */
.arc-header {
  background: linear-gradient(135deg, var(--arc-header-from) 0%, var(--arc-header-to) 100%);
  border-radius: 16px 16px 0 0;
  padding: 24px 24px 20px;
  text-align: center;
}
.arc-badge {
  display: inline-block;
  background: var(--arc-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.arc-header-title {
  color: var(--arc-header-text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.arc-header-title span { color: #ffc533; }
.arc-header-sub {
  color: var(--arc-header-sub);
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.6;
}

/* ── 統計エリア ── */
.arc-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px 16px;
  flex-wrap: wrap;
  background: #fff;
  border-left: 1px solid var(--arc-card-border);
  border-right: 1px solid var(--arc-card-border);
}
.arc-stat { text-align: center; }
.arc-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  line-height: 1;
}
.arc-stat-num {
  font-size: clamp(40px, 10vw, 58px);
  font-weight: 900;
  color: var(--arc-accent);
  line-height: 1;
}
.arc-stat-unit {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 700;
  color: var(--arc-accent);
}
.arc-stat-label { font-size: 12px; color: #888; margin-top: 4px; }

/* ── カルーセル ── */
.arc-carousel {
  background: #fff;
  border: 1px solid var(--arc-card-border);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 0 0 0;
  overflow: hidden;
}
/* 統計エリア・ヘッダーが両方ない場合：上部も角丸に */
.arc-carousel--top {
  border-top: 1px solid var(--arc-card-border);
  border-radius: 16px;
}

/* ヘッダーなし（単体使用）のときは上部も角丸に */
.arc-wrap:not(:has(.arc-header)) .arc-stats {
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--arc-card-border);
  border-bottom: none;
}
.arc-wrap:not(:has(.arc-header)) .arc-carousel {
  border-radius: 0 0 12px 12px;
}

/* ── ドットナビ ── */
.arc-dots-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 0 12px;
  width: 100%;
}
.arc-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
  display: block;
}
.arc-dot.arc-dot-active { background: var(--arc-accent); transform: scale(1.3); }

/* ── スライドタイトル ── */
.arc-slide-title {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  padding: 14px 48px 8px;
  letter-spacing: 0.04em;
}

/* ── ナビボタン ── */
.arc-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 20px; color: #999;
  padding: 0; line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.arc-nav:hover { background: #f5f5f5; color: #444; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.arc-nav-prev { left: 10px; }
.arc-nav-next { right: 10px; }

/* ── ステージラッパー（ナビボタンの基準） ── */
.arc-stage-wrap {
  position: relative;
  touch-action: pan-y; /* 縦スクロールは許可、横スワイプをJSで処理 */
}

/* ── ステージ・スライド ── */
.arc-stage { min-height: 80px; padding: 12px 48px 16px; }
.arc-slide  { display: none; width: 100%; box-sizing: border-box; animation: arcFadeIn 0.3s ease; }
.arc-slide.arc-slide-active { display: block; }
@keyframes arcFadeIn { from { opacity:0; transform:translateX(12px); } to { opacity:1; transform:translateX(0); } }

/* ── タグ ── */
.arc-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.arc-tag  { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; line-height: 1.4; }
.arc-tag-on  { background: #FFE0E0; color: #C0392B; }
.arc-tag-off { background: #f0f0f0; color: #999; }

/* ── バーグラフ ── */
.arc-bar-wrap { padding: 0 4px; }
.arc-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 8px; }
.arc-bar-track { height: 28px; background: #f0f0f0; border-radius: 14px; overflow: hidden; display: flex; max-width: 70%; margin: 0 auto; }
.arc-bar-pink  { background: var(--arc-accent); }
.arc-bar-blue  { background: #3A86D4; }
.arc-bar-gray  { background: #ccc; }

/* ── info ── */
.arc-info { display: flex; flex-direction: column; }
.arc-info-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.arc-info-row:last-child { border-bottom: none; }
.arc-info-label { flex-shrink: 0; width: 90px; font-size: 12px; color: #888; font-weight: 500; }
.arc-info-value { flex: 1; color: #333; font-weight: 500; line-height: 1.6; }

/* ── price ── */
.arc-price { display: flex; flex-direction: column; gap: 10px; }
.arc-price-row { display: flex; align-items: center; gap: 12px; }
.arc-price-gender { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 28px; border-radius: 4px; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.arc-price-gender--male   { background: #deeeff; color: #1a5fa8; }
.arc-price-gender--female { background: #ffe0e0; color: #c0392b; }
.arc-price-value { font-size: 15px; font-weight: 600; color: #333; }

/* ── bonus ── */
.arc-bonus { background: linear-gradient(135deg, #fff7f7 0%, #fff0e0 100%); border: 2px dashed var(--arc-accent); border-radius: 10px; padding: 16px; text-align: center; }
.arc-bonus-badge { display: inline-block; background: var(--arc-accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; letter-spacing: 0.06em; }
.arc-bonus-text  { font-size: 15px; font-weight: 700; color: #c0392b; line-height: 1.5; }

/* ── link ── */
.arc-link { text-align: center; padding: 8px 0; }
.arc-link-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--arc-accent); color: #fff !important; font-size: 14px; font-weight: 700; padding: 12px 28px; border-radius: 30px; text-decoration: none !important; transition: background 0.2s, transform 0.15s; letter-spacing: 0.04em; }
.arc-link-btn:hover { background: #c0392b; transform: translateY(-1px); }
.arc-link-arrow { font-size: 16px; line-height: 1; }

/* ── adcard ── */
.arc-adcard {
  background: #fffdf0;
  border: 2px solid var(--arc-accent);
  border-radius: 12px;
  padding: 16px;
  margin: 4px 0;
}
.arc-adcard-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.arc-adcard-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--arc-card-border);
  flex-shrink: 0;
}
.arc-adcard-name-wrap { flex: 1; }
.arc-adcard-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--arc-primary);
  line-height: 1.3;
}
.arc-adcard-stars { display: flex; align-items: center; gap: 3px; margin-top: 4px; }
.arc-star { font-size: 18px; line-height: 1; }
.arc-star-full  { color: #f0a500; }
.arc-star-half  { color: #f0a500; opacity: 0.6; }
.arc-star-empty { color: #ddd; }
.arc-adcard-stars-num { font-size: 13px; font-weight: 700; color: #f0a500; margin-left: 2px; }

.arc-adcard-bonus {
  display: flex; align-items: center; gap: 6px;
  background: #fff8e0; border: 1px solid #f0d070;
  border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px;
}
.arc-adcard-bonus-icon  { font-size: 16px; flex-shrink: 0; }
.arc-adcard-bonus-label { font-weight: 700; color: #b07000; flex-shrink: 0; white-space: nowrap; }
.arc-adcard-bonus-text  { color: #5a4000; }

.arc-adcard-desc {
  background: #f0f5ff;
  border-left: 3px solid var(--arc-primary);
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
  font-size: 13px; line-height: 1.7; color: #333;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.arc-adcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.arc-adcard-tag  { background: var(--arc-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; letter-spacing: 0.03em; }

.arc-adcard-btn1 {
  display: block; width: 100%; padding: 14px;
  background: var(--arc-accent); color: #fff !important;
  text-align: center; font-size: 15px; font-weight: 900;
  border-radius: 8px; text-decoration: none !important;
  margin-bottom: 8px;
  transition: opacity 0.2s;
  box-shadow: 0 3px 8px rgba(232,69,60,0.3);
}
.arc-adcard-btn1:hover { opacity: 0.85; }

.arc-adcard-btn2 {
  display: block; width: 100%; padding: 11px;
  background: #fff; color: var(--arc-primary) !important;
  text-align: center; font-size: 13px; font-weight: 700;
  border: 2px solid var(--arc-primary);
  border-radius: 8px; text-decoration: none !important;
  transition: all 0.2s;
}
.arc-adcard-btn2:hover { background: var(--arc-primary); color: #fff !important; }

/* ── 注釈 ── */
.arc-note { font-size: 11px; color: #aaa; text-align: center; margin: 8px 0 0; }

/* ── スマホ ── */
@media (max-width: 480px) {
  .arc-stage    { padding: 12px 36px 16px; }
  .arc-stats    { gap: 16px; }
  .arc-adcard-name { font-size: 16px; }
}

/* ── CTAボタン（常時表示エリア） ── */
.arc-cta-wrap {
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--arc-card-border);
}
.arc-cta-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--arc-accent);
  color: #fff !important;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 3px 8px rgba(232,69,60,0.3);
  transition: opacity 0.2s;
  box-sizing: border-box;
}
.arc-cta-btn:hover { opacity: 0.85; }

/* SWELLのspanタグ対応（spanを親要素に重ねてクリック可能に） */
.arc-cta-btn--swell,
.arc-cta-btn2--swell {
  position: relative;
  cursor: pointer;
}
.arc-cta-btn--swell > span,
.arc-cta-btn2--swell > span {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.arc-cta-btn2 {
  display: block;
  width: 100%;
  padding: 11px;
  background: #fff;
  color: var(--arc-primary) !important;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--arc-primary);
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s;
  box-sizing: border-box;
}
.arc-cta-btn2:hover { background: var(--arc-primary); color: #fff !important; }

/* ── 会員数バー専用ラベル ── */
.arc-bar-member-label {
  display: flex;
  justify-content: center;
  align-items: baseline;
  margin-bottom: 8px;
}
.arc-bar-member-count {
  font-size: 20px;
  font-weight: 900;
  color: var(--arc-accent);
  line-height: 1;
}
