/* ============================================================
   plans-shared.css
   新トップページ・新プランページ共通のプランセクション用スタイル
   抽出元: page-toppage-new.php (line 1470-2364)
   ============================================================ */

/* ── CSS変数 ────────────────────────────── */
:root {
    --primary: #E06080;
    --primary-dark: #C0405F;
    --primary-pale: #FDE8EF;
    --teal: #4CBBCA;
    --green: #5CB85C;
    --orange: #F0A500;
    --purple: #9B59B6;
    --cta-red: #C62828;
    --bg: #FFF7F9;
    --white: #FFFFFF;
    --text: #2E2E2E;
    --mid: #666666;
    --border: #E8E8E8;
}

/* ── プラン（4列横並び） ── */
.plans-section {
    background: var(--white);
    padding: 52px 0 60px;
}

.plans-section .sec-head {
    margin-bottom: 32px;
}

/* 割引制度のイントロ */
.discount-intro {
    max-width: 880px;
    margin: 0 auto 32px;
    text-align: center;
    padding: 26px 28px;
    background: var(--primary-pale);
    border-radius: 6px;
}

.discount-intro-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: .02em;
}

.discount-intro-title em {
    color: var(--primary);
    font-style: normal;
}

.discount-intro-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
    margin: 0 0 22px;
}

.discount-intro-text strong {
    color: var(--primary);
    font-weight: 800;
}

/* トグルスイッチ */
.plans-toggle-wrap {
    max-width: 720px;
    margin: 0 auto 32px;
    text-align: center;
    position: relative;
}

.plans-toggle-lead {
    font-size: 13px;
    color: var(--mid);
    margin: 0 0 10px;
    font-weight: 600;
}

/* タブ切替ヒント */
.plans-toggle-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px 5px;
    background: rgba(40, 40, 40, .82);
    border-radius: 6px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    backdrop-filter: blur(4px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    transition: opacity .4s ease;
}

.plans-toggle-hint-arrows {
    display: block;
    width: 44px;
    height: 12px;
    line-height: 0;
}

.plans-toggle-hint-arrows svg {
    width: 100%;
    height: 100%;
    display: block;
}

.plans-toggle-hint-hand {
    display: block;
    width: 20px;
    height: 26px;
    line-height: 0;
    animation: handTapPulse 1.6s ease-in-out infinite;
}

.plans-toggle-hint-hand svg {
    width: 100%;
    height: 100%;
    display: block;
}

.plans-toggle-hint-label {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
    margin-top: 1px;
}

@keyframes handTapPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.06); }
}

.plans-toggle-wrap.is-used .plans-toggle-hint {
    opacity: 0;
    visibility: hidden;
}

.plans-toggle-wrap.is-used .plans-toggle-hint-hand {
    animation: none;
}

.plans-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f1f1;
    border-radius: 50px;
    padding: 6px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, .08);
}

.plans-toggle-slider {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc(50% - 6px);
    background: linear-gradient(135deg, var(--primary) 0%, #d4567a 100%);
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(192, 64, 95, .3);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), background .3s;
    z-index: 1;
}

.plans-toggle[data-active="simulation"] .plans-toggle-slider {
    transform: translateX(100%);
    background: linear-gradient(135deg, var(--teal) 0%, #5eccda 100%);
    box-shadow: 0 4px 12px rgba(76, 187, 202, .3);
}

.plans-toggle-option {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 16px 12px;
    background: transparent;
    border: none;
    color: var(--mid);
    cursor: pointer;
    transition: color .3s;
}

.plans-toggle-option.is-active {
    color: #fff;
}

.plans-toggle-option:not(.is-active):hover {
    color: var(--text);
}

.plans-toggle-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 2px 8px;
    background: #ffd84d;
    color: #5a3a00;
    border-radius: 50px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.plans-toggle-option:not(.is-active) .plans-toggle-badge {
    background: var(--cta-red);
    color: #fff;
}

.plans-toggle-label {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .02em;
}

.plans-toggle-sub {
    font-size: 11px;
    font-weight: 600;
    opacity: .9;
    letter-spacing: .02em;
}

/* 価格バリアント切替 */
.plans-wrapper[data-active="member"] .plan-price-variant[data-variant="simulation"],
.plans-wrapper[data-active="simulation"] .plan-price-variant[data-variant="member"] {
    display: none;
}

.plans-wrapper[data-active="member"] .plans-dflow-variant[data-variant="simulation"],
.plans-wrapper[data-active="simulation"] .plans-dflow-variant[data-variant="member"] {
    display: none;
}

.plans-stripe.is-tab-member .plan-condition-trigger-row[data-variant="simulation"],
.plans-stripe.is-tab-simulation .plan-condition-trigger-row[data-variant="member"] {
    display: none;
}

/* タブ連動着色帯 */
.plans-stripe {
    transition: background-color .4s ease;
    padding: 32px 0 36px;
    margin-top: 12px;
}

.plans-stripe.is-tab-member {
    background: rgba(192, 64, 95, .05);
}

.plans-stripe.is-tab-simulation {
    background: rgba(76, 187, 202, .06);
}

.plan-price-variant {
    animation: priceVariantSwitch .55s ease-out;
}

.plans-dflow-variant {
    animation: priceVariantSwitch .55s ease-out;
}

@keyframes priceVariantSwitch {
    0% { opacity: 0; transform: translateY(6px); }
    40% { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(0); }
}

.plans-wrapper.is-switched .plan-price-area {
    animation: priceAreaFlash .8s ease-out;
}

@keyframes priceAreaFlash {
    0% { box-shadow: 0 0 0 0 rgba(192, 64, 95, .35); }
    40% { box-shadow: 0 0 0 6px rgba(192, 64, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(192, 64, 95, 0); }
}

.plans-wrapper.is-switched[data-active="simulation"] .plan-price-area {
    animation-name: priceAreaFlashSim;
}

@keyframes priceAreaFlashSim {
    0% { box-shadow: 0 0 0 0 rgba(76, 187, 202, .35); }
    40% { box-shadow: 0 0 0 6px rgba(76, 187, 202, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 187, 202, 0); }
}

.plans-dflow-area {
    margin-top: 40px;
}

.plans-dflow-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--text);
}

.plans-dflow-link-arrow {
    font-size: 22px;
    color: var(--mid);
    line-height: 1;
}

.plans-dflow-link-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--text);
    text-align: center;
}

.plans-dflow-link-text strong {
    color: var(--primary);
    font-weight: 800;
}

.plans-dflow-question {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--mid);
    margin: 0 0 8px;
    letter-spacing: .02em;
}

.plans-dflow-question strong {
    color: var(--cta-red);
    font-weight: 800;
}

.plan-label--sim {
    background: var(--teal) !important;
}

/* プランカード */
.plans-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.plan-card {
    background: var(--white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.plan-card-top {
    padding: 14px 14px 10px;
    color: var(--white);
    text-align: center;
}

.plan-kasou .plan-card-top { background: var(--teal); }
.plan-noukan .plan-card-top { background: var(--green); }
.plan-ichinichi .plan-card-top { background: var(--orange); }
.plan-futsuka .plan-card-top { background: var(--purple); }

.plan-subtitle {
    font-size: 16px;
    opacity: .92;
    margin-bottom: 8px;
    line-height: 1.4;
}

.plan-name-h {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    font-family: "Oswald", "Noto Sans JP", sans-serif;
}

.plan-name-h .sfx {
    font-size: 17px;
    font-weight: 400;
    margin-left: 4px;
    font-family: "Oswald", "Noto Sans JP", sans-serif;
}

.plan-photo {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #aaa;
}

.plan-photo img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.plan-card-body {
    padding: 14px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plan-flow {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    margin-bottom: 14px;
}

.p-step {
    font-size: 9px;
    padding: 8px 6px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.p-step.on { background: #555; color: #fff; }
.p-step.off { background: #e0e0e0; color: #bbb; }

.p-arr {
    font-size: 6px;
    color: #ccc;
}

.plan-meta {
    font-size: 12px;
    color: var(--mid);
    margin-bottom: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.plan-meta-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 10px;
}

.plan-price-area {
    margin-bottom: 12px;
    flex: 1;
}

.plan-price-variant {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 6px;
    align-items: center;
}

.plan-price-variant > .plan-regular { grid-column: 1 / -1; }
.plan-price-variant > .plan-label { grid-column: 1; justify-self: start; }
.plan-price-variant > .plan-price-main { grid-column: 2; }

.plan-label {
    display: inline-block;
    background: #b24d68;
    color: #fff;
    font-size: 10px;
    font-weight: 400;
    padding: 5px 5px;
    border-radius: 6px;
    margin-bottom: 7px;
    text-align: center;
    line-height: 1.4;
}

.plan-label-num {
    font-weight: 900;
    font-size: 1.15em;
}

.plan-price-main {
    display: flex;
    align-items: end;
    gap: 1px;
    line-height: 1;
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "GRAD" 0;
    width: 100%;
    flex-wrap: wrap;
}

.plan-price-num {
    font-size: 34px;
    font-weight: 700;
    font-family: "Oswald", "Noto Sans JP", sans-serif;
    letter-spacing: 0px;
}

.plan-kasou .plan-price-num { color: var(--teal); }
.plan-noukan .plan-price-num { color: var(--green); }
.plan-ichinichi .plan-price-num { color: var(--orange); }
.plan-futsuka .plan-price-num { color: var(--purple); }

.plan-price-tax-unit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    margin-left: 2px;
}

.plan-price-tax {
    font-size: 11px;
    color: var(--mid);
}

.plan-price-unit {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.plan-price-incl {
    font-size: 14px;
    color: var(--mid);
    margin-left: 0;
    width: 100%;
    margin-top: 3px;
}

.plan-regular {
    font-size: 14px;
    color: var(--mid);
    border-radius: 3px;
    padding: 6px 10px;
    margin-top: 0;
    text-align: center;
}

.plan-regular-tax {
    display: block;
    text-align: right;
}

.plan-btn {
    display: block;
    text-align: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid;
    background: #fff;
    transition: background .2s, color .2s;
}

.plan-kasou .plan-btn { border-color: var(--teal); color: var(--teal); }
.plan-noukan .plan-btn { border-color: var(--green); color: var(--green); }
.plan-ichinichi .plan-btn { border-color: var(--orange); color: var(--orange); }
.plan-futsuka .plan-btn { border-color: var(--purple); color: var(--purple); }

.plan-kasou .plan-btn:hover { background: var(--teal); color: #fff; }
.plan-noukan .plan-btn:hover { background: var(--green); color: #fff; }
.plan-ichinichi .plan-btn:hover { background: var(--orange); color: #fff; }
.plan-futsuka .plan-btn:hover { background: var(--purple); color: #fff; }

@media(max-width:560px) {
    .plans-toggle-label { font-size: 13px; }
    .plans-toggle-sub { font-size: 9px; line-height: 1.4; }
    .plans-toggle-option { padding: 10px 6px; }
    .plans-toggle-badge { font-size: 9px; padding: 2px 6px; }
    .plans-dflow-link-text { font-size: 17px; }
    .discount-intro { padding: 20px 16px; }
    .discount-intro-title { font-size: 17px; }
    .discount-intro-text { font-size: 13px; }
}

@media(max-width:768px) {
    .plans-row {
        gap: 12px;
    }
}
