/* 料金プラン「プラットフォーム開設」の樹形図（2026-11-12）。部品は resources/views/page/cpk/partials/_revenue-tree.blade.php。
   PC は上から下へ広がる木、携帯（幅640px以下）は左に幹を立てた縦の木。色はテーマに合わせる。 */
.rvt{--rv-p2:var(--theme-p2,#0E5A78);--rv-p3:var(--theme-p3,#1591B3);--rv-line:color-mix(in srgb,var(--rv-p3) 45%,#fff);--rv-wash:color-mix(in srgb,var(--rv-p3) 6%,var(--cp-surface,#fff));--rv-ink:var(--ink,#13303d);--rv-sub:var(--sub,#5b6b78);
  margin:28px 0 0;background:var(--cp-surface,#fff);border:1px solid color-mix(in srgb,var(--rv-p3) 18%,#fff);border-radius:20px;padding:24px 24px 20px;color:var(--rv-ink);}
.rvt *{box-sizing:border-box;}
.rvt-h{font-size:18px;font-weight:800;margin:0 0 20px;text-align:center;color:var(--rv-ink);}
.rvt-tree{display:flex;flex-direction:column;align-items:center;}
.rvt-root{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;background:linear-gradient(120deg,var(--rv-p2),var(--rv-p3));color:#fff;border-radius:16px;padding:14px 22px;position:relative;z-index:1;max-width:100%;}
.rvt-root-ic{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.18);display:inline-flex;align-items:center;justify-content:center;font-size:18px;}
.rvt-root-txt{display:flex;flex-direction:column;gap:2px;}
.rvt-root-name{font-size:16px;font-weight:800;}
.rvt-root-price{font-size:12.5px;font-weight:700;opacity:.92;}
.rvt-share{display:inline-block;background:#fff;color:var(--rv-p2);font-size:13px;font-weight:800;border-radius:999px;padding:5px 14px;}
/* 枝：幹（根の下の縦線）→ 横の線 → 子の上の縦線 */
.rvt-kids{list-style:none;margin:0;padding:14px 0 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;width:100%;position:relative;}
.rvt-kids::before{content:"";position:absolute;top:0;left:50%;width:2px;height:14px;margin-left:-1px;background:var(--rv-line);pointer-events:none;}
.rvt-kid{position:relative;padding:14px 6px 0;display:flex;}
.rvt-kid::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--rv-line);pointer-events:none;}
.rvt-kid:first-child::before{left:50%;}
.rvt-kid:last-child::before{right:50%;}
.rvt-kid::after{content:"";position:absolute;top:0;left:50%;width:2px;height:14px;margin-left:-1px;background:var(--rv-line);pointer-events:none;}
.rvt-node{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;background:var(--rv-wash);border:1px solid color-mix(in srgb,var(--rv-p3) 22%,#fff);border-radius:14px;padding:14px 10px;min-width:0;}
.rvt-ic{width:36px;height:36px;border-radius:50%;background:var(--cp-surface,#fff);color:var(--rv-p3);display:inline-flex;align-items:center;justify-content:center;font-size:16px;flex:0 0 auto;}
.rvt-name{font-size:14.5px;font-weight:800;display:flex;flex-direction:column;gap:2px;}
.rvt-name small{font-size:11.5px;font-weight:700;color:var(--rv-sub);}
.rvt-ex{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:4px 6px;font-size:13px;}
.rvt-per{flex:0 0 100%;font-size:11.5px;font-weight:700;color:var(--rv-sub);}
.rvt-in{color:var(--rv-sub);font-weight:700;}
.rvt-arrow{color:var(--rv-p3);font-size:11px;}
.rvt-out{color:var(--rv-p2);font-weight:800;font-size:17px;}
.rvt-note{margin:18px 0 0;font-size:12.5px;line-height:1.85;color:var(--rv-sub);text-align:center;}
/* 携帯：左に幹を立てた縦の木 */
@media (max-width:640px){
  .rvt{padding:18px 14px 16px;}
  .rvt-tree{align-items:stretch;}
  .rvt-root{flex-direction:row;flex-wrap:wrap;text-align:left;justify-content:flex-start;padding:12px 14px;gap:8px 12px;}
  .rvt-root-txt{flex:1 1 auto;min-width:0;}
  .rvt-share{font-size:12px;}
  .rvt-kids{display:flex;flex-direction:column;gap:10px;padding:10px 0 0 22px;}
  .rvt-kids::before{display:none;}
  .rvt-kid{padding:0;}
  /* 各枝の左の幹：上のすき間（10px）から下端まで。最後の枝は横の線の高さで終わる */
  .rvt-kid::after{top:-10px;left:-11px;margin-left:0;width:2px;height:calc(100% + 10px);}
  .rvt-kid:last-child::after{height:41px;}
  .rvt-kid::before,.rvt-kid:first-child::before,.rvt-kid:last-child::before{top:30px;left:-11px;right:auto;width:11px;height:2px;}
  .rvt-node{flex-direction:row;flex-wrap:wrap;align-items:center;text-align:left;gap:6px 10px;padding:10px 12px;}
  .rvt-name{flex:1 1 auto;min-width:0;}
  .rvt-ex{flex:0 0 100%;justify-content:flex-start;padding-left:46px;}
  .rvt-per{flex:0 0 auto;}
  .rvt-note{text-align:left;}
}
html[data-theme-tone="dark"] .rvt{--cp-surface:#111c2b;--rv-ink:#e6eef6;--rv-sub:#9fb3c4;border-color:#22303f;--rv-wash:color-mix(in srgb,var(--rv-p3) 14%,#111c2b);--rv-line:color-mix(in srgb,var(--rv-p3) 55%,#111c2b);}
