/* 料金ページ(px-)。サイコン(自転車のメーター)の夜間画面を型にした、このページだけの見た目。
   - 色は墨色の地と白い文字、青のアクセント1色だけ(青は「Standardで点くもの」にだけ使う)
   - 数字は機器の表示に近い書体(DIN系)で大きく。カードや影で囲まず、細い線と余白で区切る
   - 動きは「値が切り替わる」「制限が外れる」を伝えるものだけ。動きを減らす設定では止める
   他のページのクラス(.pricing-* など)とは共有しない。 */

/* 料金ページ全体(.px-night)と、明るい画面の中に置く暗い面(.px-panel。ログイン後のプラン画面)で同じ色を使う */
.riderix-shell.px-night,
.px-panel {
  --px-bg: #060a13;
  --px-ink: #f3f6fb;
  --px-text: #c7cedb;
  --px-dim: #8c96a8;
  --px-line: rgba(255, 255, 255, 0.1);
  --px-line-strong: rgba(255, 255, 255, 0.2);
  --px-accent: #6ba1ff;
  --px-accent-strong: #2f6bff;
  --px-num: "DIN Alternate", "Bahnschrift", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --px-display: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --px-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--px-bg);
  color: var(--px-text);
}

/* 上部バー(#0a1224)から地の色へ切れ目なくつなぐ */
.riderix-shell.px-night main {
  padding: 0;
  background: linear-gradient(180deg, #0a1224 0, var(--px-bg) 460px);
  overflow-x: clip;
}

.riderix-shell.px-night .container {
  width: min(1120px, calc(100% - 40px));
}

.px {
  position: relative;
}

.px-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- 上: 見出しと料金 ---- */
.px-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 88px);
  /* 見出しと料金の上端をそろえる(下端でそろえると、左上が大きく空いて見えた) */
  align-items: start;
  padding: clamp(56px, 9vw, 116px) 0 clamp(52px, 7vw, 92px);
}

/* 料金の後ろの光。年払い/月払いの切り替えに合わせて位置と強さが変わる */
.px-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -34% -28% -12% 34%;
  background: radial-gradient(closest-side, rgba(47, 107, 255, 0.44), rgba(47, 107, 255, 0) 72%);
  pointer-events: none;
  transition: transform 1s var(--px-ease), opacity 1s ease;
}

.px-hero[data-pricing-glow="monthly"]::before {
  transform: translate(-8%, 6%) scale(0.84);
  opacity: 0.7;
}

/* 機器の画面のような点の格子。上の方だけ薄く見せる */
.px-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 -20vw;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 78%);
  mask-image: linear-gradient(180deg, #000, transparent 78%);
  pointer-events: none;
}

.px-hero > * {
  position: relative;
  z-index: 1;
}

.px h1 {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
}

.px-eyebrow {
  color: var(--px-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
}

.px-display {
  color: var(--px-ink);
  font-family: var(--px-display);
  font-size: clamp(2.7rem, 7.6vw, 6.4rem);
  font-weight: 800;
  font-feature-settings: "palt";
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.px-display > span {
  display: inline-block;
}

.px-lead {
  max-width: 31em;
  margin: clamp(22px, 3vw, 32px) 0 0;
  color: var(--px-text);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.95;
}

.px-price {
  display: grid;
  justify-items: start;
}

.px-price-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 20px;
}

.px-plan-name {
  color: var(--px-ink);
  font-family: var(--px-num);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.px-trial {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--px-dim);
  font-size: 12.5px;
}

.px-trial-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(107, 161, 255, 0.55);
  border-radius: 999px;
  color: var(--px-accent);
  font-weight: 700;
  line-height: 1;
}

/* 年払い / 月払い。選んでいる方へガラスの板が滑る */
.px-seg {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  padding: 4px;
  border: 1px solid var(--px-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.px-seg button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--px-dim);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease;
}

.px-seg button[aria-pressed="true"] {
  color: var(--px-ink);
}

.px-seg button small {
  color: var(--px-accent);
  font-size: 11.5px;
  font-weight: 700;
}

.px-seg button:focus-visible,
.px-cta:focus-visible,
.px-ghost:focus-visible,
.px a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.px-seg-thumb {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--px-thumb-w, 0);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 22px rgba(0, 0, 0, 0.4);
  transform: translateX(var(--px-thumb-x, 4px));
}

.px-seg.is-ready .px-seg-thumb {
  transition: transform 0.5s var(--px-ease), width 0.5s var(--px-ease);
}

/* スクリプトが動かない環境では、板の代わりに選んでいるボタンを塗る */
html:not(.px-js) .px-seg button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.11);
}

.px-amount {
  margin: 14px 0 0;
}

.px-amount-visual {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1vw, 14px);
  color: var(--px-ink);
}

.px-amount-number {
  font-family: var(--px-num);
  font-size: clamp(6.2rem, 15.5vw, 11.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;
}

.px-amount-prefix,
.px-amount-suffix {
  color: var(--px-text);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  font-weight: 700;
  white-space: nowrap;
}

.px-amount-prefix:empty,
.px-amount-suffix:empty {
  display: none;
}

/* 数字が回って切り替わる。枠は見えている1文字ぶんだけ(基準線は置き数字のものを使う) */
.px-digit {
  position: relative;
  display: inline-block;
  clip-path: inset(0);
}

.px-digit-ghost {
  visibility: hidden;
}

.px-digit-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateY(calc(var(--px-d, 0) * -10%));
  transition: transform 0.8s var(--px-ease);
  transition-delay: calc(var(--px-n, 0) * 70ms);
}

.px-digit-strip > span {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
}

.px-billed {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--px-dim);
  font-size: 14px;
}

.px-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  margin-top: 26px;
  padding: 0 28px;
  border-radius: 14px;
  background: var(--px-accent-strong);
  box-shadow: 0 12px 38px rgba(47, 107, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s var(--px-ease), background 0.2s ease;
}

.px-cta::after {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 6h21M17 1.5 22 6l-5 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 6h21M17 1.5 22 6l-5 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.3s var(--px-ease);
}

.px-cta:hover {
  background: #4179ff;
}

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

/* 離したときではなく、押した瞬間に反応する */
.px-cta:active,
.px-ghost:active {
  transform: scale(0.975);
}

.px-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 26px 0 0;
  color: var(--px-ink);
  font-size: 15px;
  font-weight: 700;
}

.px-current::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--px-accent);
  box-shadow: 0 0 12px var(--px-accent);
}

.px-terms {
  display: grid;
  gap: 5px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--px-dim);
  font-size: 12.5px;
  line-height: 1.65;
}

.px-terms li {
  position: relative;
  padding-left: 14px;
}

.px-terms li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 6px;
  height: 1px;
  background: currentColor;
}

.px-terms-note {
  max-width: 34em;
  margin: 20px 0 0;
  color: var(--px-dim);
  font-size: 12.5px;
  line-height: 1.75;
}

.px-alt {
  margin: 6px 0 0;
  color: var(--px-dim);
  font-size: 13.5px;
}

/* 文中のリンクだが、指で押しやすい高さを取る */
.px-alt a {
  display: inline-block;
  padding: 12px 0;
}

.px-alt a,
.px-close-note a {
  color: var(--px-ink);
  font-weight: 700;
  text-underline-offset: 4px;
}

/* ---- 中: Standardで変わること ---- */
.px-diff {
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--px-line);
}

.px-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(22px, 3vw, 32px);
}

.px-section-head h2 {
  margin: 0;
  text-wrap: balance;
  color: var(--px-ink);
  font-family: var(--px-display);
  font-size: clamp(1.45rem, 2.7vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.px-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--px-dim);
  font-family: var(--px-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.px-legend .is-standard,
.px-rows-head .is-standard {
  color: var(--px-accent);
}

.px-arrow {
  flex: 0 0 auto;
  color: var(--px-dim);
}

/* いちばん大きな違い3つ。サイコンのデータ欄のように、線で区切って大きな値を置く */
.px-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--px-line-strong);
  border-bottom: 1px solid var(--px-line-strong);
  list-style: none;
}

.px-field {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px 28px 28px;
  border-left: 1px solid var(--px-line);
}

.px-field:first-child {
  padding-left: 0;
  border-left: 0;
}

.px-field-label {
  margin: 0;
  color: var(--px-text);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
}

.px-field-label sup {
  margin-left: 3px;
  color: var(--px-dim);
  font-size: 10px;
  font-weight: 400;
}

.px-field-values {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  min-height: clamp(88px, 10.5vw, 128px);
  margin: 0;
}

.px-field-free {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--px-dim);
  white-space: nowrap;
}

.px-field-free-number,
.px-field-free .px-switch {
  font-family: var(--px-num);
  font-size: clamp(1.9rem, 3.3vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
}

.px-field-free-unit {
  font-size: 13px;
  font-weight: 700;
}

.px-field-standard {
  display: inline-flex;
  align-items: center;
  color: var(--px-ink);
  filter: drop-shadow(0 0 22px rgba(107, 161, 255, 0.5));
}

.px-infinity {
  width: clamp(124px, 14.5vw, 184px);
  height: auto;
  overflow: visible;
}

.px-field-standard .px-switch {
  font-size: clamp(4.4rem, 9.2vw, 7.4rem);
  letter-spacing: 0;
  line-height: 1;
}

.px-field-caption {
  margin: 0;
  color: var(--px-dim);
  font-size: 13px;
  line-height: 1.7;
}

.px-switch {
  font-family: var(--px-num);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.px-switch.is-off {
  color: var(--px-dim);
}

.px-switch.is-on {
  color: var(--px-ink);
}

/* ほかに変わること: 1行に「Freeの値」「Standardの値」を並べる */
.px-rows {
  margin-top: clamp(36px, 5vw, 60px);
}

.px-rows-head,
.px-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 200px;
  column-gap: 24px;
  align-items: center;
}

.px-rows-head {
  padding-bottom: 14px;
  color: var(--px-dim);
  font-family: var(--px-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.px-rows-head span:first-child {
  color: var(--px-ink);
  font-family: var(--px-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.px-row {
  min-height: 66px;
  padding: 14px 0;
  border-top: 1px solid var(--px-line);
}

/* まとまり(AI連携 / サイトの機能)の最後の行は下にも線を引き、次のまとまりとの間を空ける */
.px-row:has(+ .px-rows-head),
.px-row:last-child {
  border-bottom: 1px solid var(--px-line);
}

.px-row + .px-rows-head {
  margin-top: clamp(28px, 4vw, 44px);
}

.px-row-label {
  display: grid;
  gap: 3px;
  color: var(--px-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.px-row-label sup {
  margin-left: 3px;
  color: var(--px-dim);
  font-size: 10px;
  font-weight: 400;
}

.px-notes a {
  color: var(--px-ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.px-row-label small {
  color: var(--px-dim);
  font-size: 12.5px;
  font-weight: 400;
}

.px-row-free {
  color: var(--px-dim);
  font-size: 14px;
}

.px-row-standard {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--px-ink);
  font-size: 15px;
  font-weight: 700;
}

.px-row-standard .px-arrow {
  display: none;
}

.px-row .px-switch.is-on::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--px-accent);
  box-shadow: 0 0 10px var(--px-accent);
  vertical-align: 1px;
}

@media (hover: hover) {
  .px-row {
    transition: background 0.25s ease;
  }

  .px-row:hover {
    background: linear-gradient(90deg, rgba(107, 161, 255, 0), rgba(107, 161, 255, 0.08) 70%, rgba(107, 161, 255, 0));
  }
}

.px-notes {
  display: grid;
  gap: 6px;
  max-width: 68em;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--px-dim);
  font-size: 12px;
  line-height: 1.75;
}

/* ---- 下: どちらでも使えるもの、申し込み ---- */
.px-shared {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 44px;
  align-items: baseline;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 24px 0;
  border-top: 1px solid var(--px-line);
  border-bottom: 1px solid var(--px-line);
}

.px-shared h2 {
  margin: 0;
  color: var(--px-dim);
  font-size: 13.5px;
  font-weight: 700;
}

.px-shared ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--px-ink);
  font-size: 15px;
  font-weight: 700;
}

.px-close {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 56px;
  align-items: center;
  padding: clamp(40px, 6vw, 76px) 0;
}

.px-close-title {
  margin: 0 0 10px;
  text-wrap: balance;
  color: var(--px-ink);
  font-family: var(--px-display);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.px-close-note {
  max-width: 47em;
  margin: 0;
  color: var(--px-dim);
  font-size: 12.5px;
  line-height: 1.85;
}

.px-close-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.px-close-actions .px-cta {
  margin-top: 0;
}

.px-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--px-line-strong);
  border-radius: 12px;
  color: var(--px-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s var(--px-ease), border-color 0.2s ease;
}

.px-ghost:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

/* 共通のフッター(明るいページ用の色)を、このページの地に合わせる */
.px-night .public-document-actions {
  justify-content: flex-start;
  margin: 0 0 28px;
}

.px-night .public-document-actions .btn {
  min-height: 40px;
  border-color: var(--px-line-strong);
  background: transparent;
  color: var(--px-text);
}

.px-night .public-document-actions .btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}

.px-night .public-footer {
  justify-content: flex-start;
  border-top-color: var(--px-line);
}

.px-night .public-footer a,
.px-night .public-footer span {
  color: var(--px-dim);
}

.px-night .public-footer span {
  text-align: left;
}

.px-night .public-footer a:hover {
  color: var(--px-ink);
}

/* ---- 入場の動き: 行が下から順に現れ、Standardの値に灯がともる ---- */
.px-js .px-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s var(--px-ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.px-js .px-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ∞ は線を引いて描く(制限が外れる、を1回だけ見せる) */
.px-js .px-infinity path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s var(--px-ease);
  transition-delay: calc(var(--i, 0) * 70ms + 250ms);
}

.px-js .px-field.is-in .px-infinity path {
  stroke-dashoffset: 0;
}

.px-js .px-field-standard .px-switch {
  opacity: 0.2;
  transition: opacity 0.6s ease;
  transition-delay: calc(var(--i, 0) * 70ms + 450ms);
}

.px-js .px-field.is-in .px-field-standard .px-switch {
  opacity: 1;
}

/* ---- 狭い画面 ---- */
@media (max-width: 900px) {
  .px-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .px-hero::before {
    inset: 22% -40% -8% -10%;
  }

  .px-fields {
    grid-template-columns: 1fr;
  }

  .px-field,
  .px-field:first-child {
    padding: 22px 0 24px;
    border-left: 0;
  }

  .px-field + .px-field {
    border-top: 1px solid var(--px-line);
  }

  .px-field-values {
    min-height: 92px;
  }

  .px-infinity {
    width: 136px;
  }

  .px-field-standard .px-switch {
    font-size: 4.8rem;
  }

  .px-close {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .riderix-shell.px-night .container {
    width: calc(100% - 32px);
  }

  .px-cta {
    width: 100%;
  }

  /* 行は「名前」の下に「Freeの値 → Standardの値」を並べる(列の見出しは上の凡例で足りる) */
  .px-rows-head span:not(:first-child) {
    display: none;
  }

  .px-rows-head {
    grid-template-columns: 1fr;
  }

  .px-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
  }

  .px-row-label {
    grid-column: 1 / -1;
  }

  .px-row-standard .px-arrow {
    display: block;
  }

  .px-shared {
    grid-template-columns: 1fr;
  }

  .px-close-actions,
  .px-close-actions .px-ghost {
    width: 100%;
  }
}

/* ---- 動きを減らす設定: 滑る・回る・描く動きを止め、切り替わりだけ残す ---- */
@media (prefers-reduced-motion: reduce) {
  .px-hero::before,
  .px-seg.is-ready .px-seg-thumb,
  .px-digit-strip,
  .px-cta,
  .px-cta::after,
  .px-ghost {
    transition: none;
  }

  .px-js .px-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .px-js .px-infinity path {
    stroke-dashoffset: 0;
    transition: none;
  }

  .px-js .px-field-standard .px-switch {
    opacity: 1;
    transition: none;
  }
}
