/* ==============================================
   レンタルショップ アライ ? 料金シミュレーター
   スコープ: .sim-wrap 以下のみに影響
   ※ *, body等のグローバルリセットは除去済み
============================================== */

/* ── CSS変数（シミュレーター専用スコープ） ── */
.sim-wrap {
  --sg:      #3a7d44;
  --sg-l:    #e8f4ea;
  --sy:      #f5c400;
  --sy-d:    #c49a00;
  --sr:      #d63031;
  --sgray:   #f5f5f3;
  --sborder: #e0ddd6;
  --stext:   #1a1a18;
  --smuted:  #6b6b67;
  --swhite:  #ffffff;
  --sradius: 10px;

  box-sizing: border-box;
  max-width: 680px;
  margin: 0 auto;
  padding: 0.75rem 0.75rem 2rem;
  font-size: 14px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
.sim-wrap *, .sim-wrap *::before, .sim-wrap *::after {
  box-sizing: border-box;
}

/* ── 日数選択パネル ── */
.days-panel {
  background: var(--sg);
  border-radius: var(--sradius);
  padding: 0.85rem 0.75rem 1rem;
  margin-bottom: 0.9rem;
}
.days-panel-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  margin-bottom: 0.55rem;
  text-align: center;
  letter-spacing: .05em;
}

/* 14ボタン: スマホは7×2、PCは7×2のまま余裕を持たせる */
.days-btns {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.day-btn {
  background: rgba(255,255,255,.18);
  border: 1.5px solid transparent;
  border-radius: 6px;
  color: rgba(255,255,255,.9);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.05rem;
  text-align: center;
  cursor: pointer;
  line-height: 1.1;
  transition: background .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.day-btn > span {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  color: rgba(255,255,255,.5);
  margin-top: 1px;
}
.day-btn.active {
  background: var(--sy);
  border-color: var(--sy);
  color: #1a1200;
}
.day-btn.active > span { color: rgba(0,0,0,.5); }
.day-btn:not(.active):active { background: rgba(255,255,255,.3); }

/* ── 参考価格バナー ── */
.est-banner {
  display: none;
  background: #fff8e1;
  border: 1px solid var(--sy-d);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  color: #7a5c00;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.est-banner.show { display: block; }

/* ── ヒーローカード ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 0.9rem;
}
.hero-card {
  background: var(--sg);
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-bottom: 3px solid var(--sy);
  box-shadow: 0 2px 5px rgba(0,0,0,.13);
}
.hero-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--swhite);
  white-space: nowrap;
}
.hero-lbl {
  font-size: 0.65rem;
  color: rgba(255,255,255,.8);
  margin-top: 4px;
  line-height: 1.35;
}

/* ── カテゴリカード ── */
.cat-card {
  background: var(--swhite);
  border-radius: var(--sradius);
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--sborder);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cat-head:active { background: var(--sgray); }
.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-title {
  font-size: 0.85rem;
  font-weight: 700;
  flex: 1;
}
.cat-chevron {
  font-size: 10px;
  color: var(--smuted);
  transition: transform .2s;
  flex-shrink: 0;
}
.cat-chevron.open { transform: rotate(180deg); }
.cat-body {
  overflow: hidden;
  transition: max-height .25s ease;
}
.cat-divider { height: 1px; background: var(--sborder); }

/* ── アイコンラッパー ── */
.item-icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-icon-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ── アイテム行（アイコン・商品名・料金の3列） ── */
.item-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 0 8px;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--sborder);
  align-items: center;
  min-height: 56px;
}
.item-row:last-child { border-bottom: none; }

.item-icon-wrap {
  grid-column: 1;
  width: 40px;
  height: 40px;
  align-self: center;
}
.item-info {
  grid-column: 2;
  min-width: 0;
}
.item-name {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--stext);
  word-break: keep-all;
  overflow-wrap: break-word;
}
.item-sub {
  font-size: 0.67rem;
  color: var(--smuted);
  margin-top: 1px;
  line-height: 1.3;
}

/* 料金: 常に右端に固定 */
.item-price-wrap {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  min-width: 88px;
}
.item-total {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--stext);
  white-space: nowrap;
}
.item-per {
  font-size: 0.64rem;
  color: var(--smuted);
  white-space: nowrap;
}

/* ── バッジ ── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  white-space: nowrap;
  vertical-align: middle;
}
.badge-green { background: var(--sg-l); color: var(--sg); }
.badge-base  { background: var(--sgray); color: var(--smuted); }
.badge-est   { background: #fff8e1; color: #7a5c00; font-size: 0.6rem; padding: 1px 5px; border-radius: 4px; }

/* カテゴリ別カラー */
.dot-std { background: #1a6bb5; }
.dot-hp  { background: #c47a00; }
.dot-bt  { background: var(--sr); }
.dot-jr  { background: var(--sg); }
.dot-ac  { background: #888; }
.head-std .cat-title { color: #0d4f8c; }
.head-hp  .cat-title { color: #8a5500; }
.head-bt  .cat-title { color: #a0201e; }
.head-jr  .cat-title { color: var(--sg); }
.head-ac  .cat-title { color: #444; }

/* ── フッター ── */
.sim-footer {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--sborder);
  font-size: 0.73rem;
  color: var(--smuted);
  text-align: center;
}

/* ── タブレット以上（560px?）── */
@media (min-width: 560px) {
  .sim-wrap {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  /* ヒーロー: 4列 */
  .hero-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .hero-val { font-size: 1.15rem; }
  .hero-lbl { font-size: 0.7rem; }

  /* アイテム行: PC幅でアイコン・商品名をやや大きく */
  .item-row {
    grid-template-columns: 48px 1fr auto;
    padding: 0.65rem 1rem;
    gap: 0 12px;
    min-height: 60px;
  }
  .item-icon-wrap { width: 48px; height: 48px; }
  .item-name      { font-size: 0.82rem; }
  .item-price-wrap { min-width: 110px; }
  .item-total     { font-size: 0.95rem; }
  .item-per       { font-size: 0.72rem; }
}

/* ── PC（840px?）── */
@media (min-width: 840px) {
  .days-btn { font-size: 0.85rem; }
  .hero-val { font-size: 1.2rem; }
}