/* お申し込みの画面（zeira.css の上に重ねる） */
.page-apply .hdr { background: rgba(251, 251, 253, .92); border-color: var(--line); }
.ap { padding: calc(var(--hdr) + clamp(32px, 6vw, 72px)) 0 clamp(80px, 10vw, 140px); position: relative; overflow-x: clip; }
.ap::before { content: ""; position: absolute; top: -10%; right: -10%; width: 60vw; height: 60vw; border-radius: 50%; pointer-events: none; z-index: -1;
  background: conic-gradient(from 200deg, rgba(18,191,255,.14), rgba(35,80,255,.1), rgba(122,92,255,.12), rgba(255,111,177,.1), rgba(18,191,255,.14)); filter: blur(90px); }
.ap-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.ap-head h1 { margin: 16px 0 12px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
.ap-head p { margin: 0; color: var(--ink2); }

/* 進み具合 */
.ap-steps { list-style: none; margin: 26px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: s; }
.ap-steps li { counter-increment: s; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); font-size: 14px; font-weight: 700; color: var(--mute); transition: color .3s, box-shadow .3s; }
.ap-steps li::before { content: counter(s); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 500 12px/1 var(--f-mono); background: #eef1f7; color: var(--mute); transition: background-color .3s, color .3s; }
.ap-steps li.done { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(35,80,255,.35); }
.ap-steps li.done::before { content: "✓"; background: var(--blue); color: #fff; font-family: var(--f-jp); font-weight: 700; }

.ap-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.ap-form { display: grid; gap: 18px; min-width: 0; }
.ap-sec { margin: 0; border: 0; padding: clamp(22px, 3vw, 34px); border-radius: calc(var(--r) + 4px); background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); display: grid; gap: 16px; min-width: 0; transition: opacity .3s; }
.ap-sec { grid-template-columns: minmax(0, 1fr); }
.ap-sec > * { min-width: 0; }
.ap-sec[hidden] { display: none; }
.ap-sec.mute .cards { opacity: .45; pointer-events: none; }
.ap-sec legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-size: clamp(19px, 2vw, 22px); font-weight: 900; display: flex; align-items: center; gap: 12px; }
.ap-sec legend + * { clear: both; }
.ap-sec legend .n { font: 500 13px/1 var(--f-mono); color: var(--blue); letter-spacing: .1em; padding: 6px 8px; border-radius: 8px; background: rgba(35,80,255,.08); }
.ap-note { margin: 0; font-size: 15px; color: var(--ink2); }

/* 選ぶカード */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.cards-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { position: relative; cursor: pointer; display: block; }
.card input { position: absolute; opacity: 0; pointer-events: none; }
.card-in { display: grid; gap: 6px; height: 100%; padding: 16px 16px 16px 46px; border-radius: 16px; background: #f7f8fb; box-shadow: inset 0 0 0 1px var(--line2); transition: box-shadow .2s, background-color .2s, transform .2s; position: relative; }
.card-in::before { content: ""; position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line2); background: #fff; transition: box-shadow .2s; }
.card:hover .card-in { background: #fff; }
.card input:checked + .card-in { background: #fff; box-shadow: inset 0 0 0 2px var(--blue), 0 12px 30px -16px rgba(35,80,255,.45); }
.card input:checked + .card-in::before { box-shadow: inset 0 0 0 5.5px var(--blue); }
.card input:focus-visible + .card-in { outline: 2px solid var(--blue); outline-offset: 3px; }
.card.off { cursor: not-allowed; }
.card.off .card-in { opacity: .4; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-top b { font-size: 17.5px; }
.card-top em { font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: var(--holo); padding: 3px 8px; border-radius: 999px; }
.card-price { font-size: 14.5px; color: var(--ink2); font-family: var(--f-mono); }
.card-price:empty { display: none; }
.card-price strong { font-size: 19px; color: var(--ink); font-weight: 500; }
.card-desc { font-size: 14px; color: var(--mute); line-height: 1.65; }

/* あり／なし */
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 999px; background: #f1f3f8; box-shadow: inset 0 0 0 1px var(--line); justify-self: start; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 18px; border-radius: 999px; font-size: 15.5px; font-weight: 700; color: var(--mute); transition: background-color .2s, color .2s, box-shadow .2s; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(20,30,70,.18); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.seg label.off { cursor: not-allowed; opacity: .4; }
.field[hidden] { display: none; }
.field .hint { font-size: 13.5px; color: var(--mute); }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pages { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: linear-gradient(100deg, rgba(18,191,255,.07), rgba(122,92,255,.07)); box-shadow: inset 0 0 0 1px rgba(35,80,255,.16); }
.pages svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.pages p { margin: 0; font-size: 15.5px; }
.pages b { color: var(--blue); }

/* 同意 */
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 2px 0 0; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--line2); background: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .2s, box-shadow .2s; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--blue); box-shadow: none; }
.check input:checked::after { opacity: 1; }
.check a { color: var(--blue); }
.ap-submit { width: 100%; min-height: 60px; font-size: 18px; white-space: normal; text-align: center; line-height: 1.4; margin-top: 6px; }

.ap-done { text-align: center; padding: clamp(36px, 6vw, 64px) 24px; border-radius: calc(var(--r) + 4px); background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); display: grid; justify-items: center; gap: 14px; }
.ap-done[hidden] { display: none; }
.ap-done:focus { outline: none; }
.ap-done h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; }
.ap-done p { margin: 0 0 8px; color: var(--ink2); max-width: 460px; }
.ok-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(16,185,129,.1); box-shadow: inset 0 0 0 1.5px rgba(16,185,129,.45); }
.ok-ring svg { width: 30px; height: 30px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .6s .15s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 合計 */
.sum { position: sticky; top: calc(var(--hdr) + 20px); }
.sum-card { position: relative; overflow: hidden; border-radius: calc(var(--r) + 6px); padding: 26px 24px 22px; background: #0b0f19; color: #fff; box-shadow: 0 30px 70px -30px rgba(20,30,70,.55); }
.sum-card::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 90%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from 0deg, rgba(18,191,255,.45), rgba(122,92,255,.4), rgba(255,111,177,.35), rgba(18,191,255,.45)); filter: blur(60px); opacity: .55; pointer-events: none; }
.sum-card > * { position: relative; }
.sum-card .vis-tag { font: 500 12.5px/1 var(--f-mono); letter-spacing: .14em; color: #c5cbd8; }
.sum-card h2 { margin: 10px 0 18px; font-size: 24px; font-weight: 900; }
.sum-card dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 12px 10px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.sum-card dt { font-size: 15px; color: #eef1f6; display: grid; }
.sum-card dt small { font-size: 12.5px; color: #c5cbd8; }
.sum-card dd { margin: 0; text-align: right; font-family: var(--f-mono); font-size: 14.5px; color: #eef1f6; align-self: center; }
.sum-card dd b { font-size: 19px; color: #fff; font-weight: 500; }
.sum-card dd.sm { font-family: var(--f-jp); font-weight: 700; color: #fff; }
.sum-today { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 6px; }
.sum-today span { font-size: 15px; font-weight: 700; }
.sum-today b { font: 500 34px/1 var(--f-mono); letter-spacing: -.02em; background: linear-gradient(100deg, #7dd3fc, #a5b4fc 50%, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sum-today small { font-size: 17px; margin-left: 2px; }
.sum-note { margin: 4px 0 14px; font-size: 14px; color: #dfe3ec; }
.sum-safe { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: #dfe3ec; }
.sum-safe li { display: flex; gap: 8px; align-items: center; }
.sum-safe li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; background: rgba(16,185,129,.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 1.9L10 5' fill='none' stroke='%2334d399' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.bump { animation: bump .45s cubic-bezier(.2,.8,.2,1); display: inline-block; }
@keyframes bump { 0% { transform: translateY(6px); opacity: .2; } 100% { transform: none; opacity: 1; } }

/* スマホ：合計は下に固定の帯、カードは本文の最後 */
.sum-bar { display: none; }
@media (max-width: 980px) {
  .ap-grid { grid-template-columns: 1fr; }
  .sum { position: static; }
  .sum-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 800; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 18px; background: rgba(11,15,25,.94); color: #fff; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); transition: transform .35s, opacity .35s; }
  .sum-bar.gone { transform: translateY(140%); opacity: 0; }
  .sum-bar small { display: block; font-size: 12.5px; color: #c5cbd8; }
  .sum-bar b { font: 500 20px/1.1 var(--f-mono); }
  .sum-bar-r { text-align: right; font-size: 14.5px; }
  .page-apply .foot { padding-bottom: 110px; }
}
@media (max-width: 560px) {
  .field-2 { grid-template-columns: 1fr; }
  .ap-sec { padding: 20px 16px; }
  .card-in { padding: 14px 14px 14px 42px; }
  .card-in::before { left: 14px; top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .bump { animation: none; } }
@media (max-width: 560px) {
  .ap .tbl { min-width: 0; font-size: 14.5px; }
  .ap .tbl th, .ap .tbl td { padding: 12px 10px; }
  .ap .tbl thead th { font-size: 12px; }
}

/* プランを2段で選ぶ（2026-11-15） */
.ap-q { margin: 6px 0 12px; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.ap-q b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; }
.cards + .ap-q { margin-top: 26px; }
.cards-plan { grid-template-columns: 1fr; }
.cards-plan .card-price { white-space: nowrap; }
.card[hidden] { display: none; }
.card-for { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.55; }
