/* comparison.css - ROOM SERVICE vs DMM Table UI */

.comparison-mobile-ui {
  margin: 0;
}

/* スマホ用：列切り替えタブ（デスクトップでは非表示） */
.comparison-col-tabs {
  display: none;
}

.comparison-col-tab {
  flex: 1;
  padding: 14px 12px;
  border-radius: 16px 16px 0 0;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  transition: background var(--tr), color var(--tr);
}

.comparison-col-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.comparison-col-tab.is-active {
  background: var(--accent);
  color: #fff;
}

.comparison-col-tab:not(.is-active) {
  background: #d9e1e4;
  color: #fff;
}

.comparison-col-tab:not(.is-active):hover {
  background: #c3cfd3;
}

.comparison-table-wrap {
  overflow-x: auto;
  margin: 40px 0 60px;
  padding-bottom: 24px;
  /* for scrollbar */
}

.comparison-table {
  width: 100%;
  min-width: 800px;
  border-collapse: separate;
  border-spacing: 4px 0;
  /* Gap between columns like DMM */
}

.comparison-table th,
.comparison-table td {
  padding: 24px 16px;
  text-align: center;
  vertical-align: middle;
}

.comparison-table thead th {
  background: #F0F0F0;
  color: var(--text);
  font-weight: 900;
  font-size: 16px;
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.comparison-table thead th.comparison-label-col {
  background: transparent;
  width: 220px;
}

.comparison-table tbody td {
  background: #FAFAFA;
  border-bottom: 1px solid var(--border-light);
  font-weight: var(--fw-b);
  font-size: 16px;
}

.comparison-table tbody td.comparison-label-col {
  background: transparent;
  text-align: left;
  font-weight: 900;
  color: var(--text);
}

/* DMM Highlight Column (ROOM SERVICE) */
.comparison-table thead th.comparison-highlight {
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 -4px 0 var(--accent) inset;
}

.comparison-table tbody td.comparison-highlight {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-right: 4px solid var(--accent);
  border-bottom: 1px solid var(--border-light);
}

.comparison-table tbody tr:last-child td.comparison-highlight {
  border-bottom: 4px solid var(--accent);
  border-radius: 0 0 12px 12px;
}

.mark-good {
  display: block;
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}

.comparison-conclusion {
  text-align: center;
  background: var(--accent-pale);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  margin: 0 auto 64px;
  max-width: 800px;
}

.comparison-highlight-text {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 0;
  letter-spacing: 0.05em;
}

/* ----- モバイル：3列テーブルをタブ＋2列に（比較軸＋選択列） ----- */
@media (max-width: 768px) {
  .comparison-col-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0 4px;
  }

  .comparison-table-wrap {
    overflow-x: visible;
    margin-top: 0;
    margin-bottom: 48px;
    padding-bottom: 0;
  }

  .comparison-table {
    min-width: 0;
    width: 100%;
    border-spacing: 0;
    table-layout: fixed;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 16px 14px;
    font-size: 14px;
  }

  .comparison-table tbody td.comparison-label-col {
    width: 40%;
    min-width: 0;
    background: transparent;
    text-align: left;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    border-bottom: 1px solid var(--border-light);
  }

  .comparison-table tbody td:not(.comparison-label-col) {
    width: 60%;
    text-align: left;
    line-height: 1.55;
    word-break: break-word;
    border-bottom: 1px solid var(--border-light);
  }

  /* ゼブラ（ラベル列） */
  .comparison-table tbody tr:nth-child(odd) td.comparison-label-col {
    background: #f4f7f9;
  }

  .comparison-table tbody tr:nth-child(even) td.comparison-label-col {
    background: #fafcfd;
  }

  /* 非表示列 */
  .comparison-table-wrap[data-active-col="legacy"] .comparison-table tbody td:nth-child(3) {
    display: none;
  }

  .comparison-table-wrap[data-active-col="roomforce"] .comparison-table tbody td:nth-child(2) {
    display: none;
  }

  /* ROOM FORCE 列：ハイライト枠をモバイルでも維持 */
  .comparison-table tbody td.comparison-highlight {
    border-left: 4px solid var(--accent);
    border-right: none;
    background: #fff !important;
  }

  .comparison-table tbody tr:last-child td.comparison-highlight {
    border-bottom: 4px solid var(--accent);
    border-radius: 0 0 10px 10px;
  }

  .comparison-table-wrap[data-active-col="legacy"] tbody tr:last-child td:nth-child(2) {
    border-bottom: 1px solid var(--border-light);
    border-radius: 0 0 10px 10px;
  }

  /* 「今のやり方」列のゼブラ */
  .comparison-table-wrap[data-active-col="legacy"] tbody tr:nth-child(odd) td:nth-child(2) {
    background: #eef4f8;
  }

  .comparison-table-wrap[data-active-col="legacy"] tbody tr:nth-child(even) td:nth-child(2) {
    background: #f8fbfd;
  }

  .mark-good {
    display: inline;
    font-size: 20px;
    margin-right: 4px;
    margin-bottom: 0;
  }
}

/* =========================================
   PRICING & OPTIONS (§6a, §6b)
   DMM Virtual Office Trace
   ========================================= */

/* Hero Pricing Container */
.dmm-pricing-hero {
  max-width: 960px;
  margin: 0 auto 80px;
}

/* Tabs */
.dmm-tabs {
  display: flex;
  gap: 8px;
  margin: 0 40px; /* 少し内側に配置 */
}

/* Base Tab */
.dmm-tab {
  flex: 1;
  padding: 12px 8px; /* Height reduced to approx 2/3 */
  border-radius: 16px 16px 0 0;
  text-align: center;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--tr);
}
.dmm-tab:focus {
  outline: none;
}

.dmm-tab.active {
  background: var(--accent);
  color: #fff;
}

.dmm-tab.inactive {
  background: #D9E1E4; /* 非アクティブなタブのグレー */
  color: #fff;
}
.dmm-tab.inactive:hover {
  background: #C3CFD3;
}

/* Badge (黄色い吹き出し) */
.tab-badge {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFB700;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 50px;
  white-space: nowrap;
}
.tab-badge::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #FFB700 transparent transparent transparent;
}

/* Tab Text */
.tab-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 0;
  line-height: 1.2;
}
.tab-price {
  font-size: 32px;
  font-weight: 900;
}
.tab-price span {
  font-size: 16px;
}

/* Content Box */
.dmm-pricing-content {
  background: #fff;
  border-radius: 12px;
  padding: 48px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05); /* 非常にソフトな影 */
}

.plan-hero-title {
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

/* The dark gray Pricing Box (月額料金の部分) */
.price-display-box {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ddd;
  margin-bottom: 48px;
}

.price-box-header {
  background: #666;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  padding: 16px;
}

.price-box-body {
  padding: 32px 32px 24px;
  text-align: center;
}

/* 2カラム料金表示 */
.price-box-dual {
  display: flex;
  align-items: stretch;
  padding: 0;
}

.price-col {
  flex: 1;
  padding: 28px 24px 32px;
  text-align: center;
}

.price-col-label {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-light);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.price-col-divider {
  width: 1px;
  background: #ddd;
  flex-shrink: 0;
  margin: 24px 0;
}

.price-col-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.price-num {
  font-size: 52px;
  line-height: 1;
  font-weight: 900;
  color: var(--accent);
}

.price-num-sm {
  font-size: 36px;
  color: var(--text);
}

.price-unit {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

/* 基本料金表 */
.pricing-table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 32px;
  border-collapse: collapse;
}

.pricing-table td {
  padding: 16px 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  border-bottom: 1px dashed #ccc;
}
.pricing-table td:first-child {
  text-align: left;
}
.pricing-table td:last-child {
  text-align: right;
  color: var(--accent);
}

.price-cell span {
  font-size: 40px; /* 特大の青い数字 */
  color: var(--accent);
}

.pricing-caution {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
  padding: 0 24px 24px;
  text-align: center;
}

/* Included Services */
.plan-included {
  padding-top: 0;
  padding-bottom: 32px;
}

.included-title {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--text);
}

.included-pills-outer {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

.included-pills-inner {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  padding-right: 16px;
  animation: pills-scroll 36s linear infinite;
}

@keyframes pills-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.included-pills-inner span {
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Options Heading */
.options-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--text);
}

/* Options Carousel (DMM_13_options) */
.options-carousel-outer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto 16px;
  max-width: 1040px;
  overflow: hidden;
}

.options-carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  padding: 8px 0;
}
.options-carousel-track::-webkit-scrollbar {
  display: none;
}

.option-card {
  flex: 0 0 calc(30% - 10px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ddd;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.carousel-btn {
  display: none;
}

.opt-head {
  background: #666;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  padding: 14px 16px;
  display: block;
}
.opt-head::before {
  display: none;
}

.opt-body {
  padding: 20px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.opt-price-wrap {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--text);
  text-align: center;
}

.opt-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  margin: 0 2px;
}
.opt-unit {
  font-size: 14px;
  color: var(--text);
}

.opt-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-light);
  margin-bottom: 12px;
  flex: 1;
  text-align: center;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--tr), transform var(--tr);
}
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.opt-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  transition: all var(--tr);
  align-self: center;
  margin-top: auto;
}
.opt-btn:hover {
  background: var(--accent);
  color: #fff;
}

.pricing-notes {
  max-width: 800px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--text-light);
}
.pricing-notes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  justify-content: center;
  list-style: none;
}
.pricing-notes li::before {
  content: "・";
}

@media(max-width: 768px) {
  .dmm-tabs { 
    margin: 0; 
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding-bottom: 2px;
  }
  .dmm-tab { 
    flex: 0 0 auto; 
    min-width: 120px; 
    padding: 8px 4px; /* Reduced for mobile */
    border-radius: 12px 12px 0 0; 
  }
  .dmm-tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-title { font-size: 24px; padding: 4px 0; } /* Doubled from 12~14px */
  .tab-badge { font-size: 11px; padding: 4px 10px; top: -16px; }
  
  .tab-price { font-size: 20px; }
  .dmm-pricing-content { padding: 32px 20px; }
  .price-cell span { font-size: 32px; }
  .opt-price { font-size: 24px; }
  .pricing-table td { padding: 12px 8px; font-size: 16px; }
  .included-pills-inner span { padding: 8px 16px; font-size: 13px; }
  .option-card { flex: 0 0 calc(50% - 12px); }
  .carousel-btn { display: none; }
}