/* =========================================================
   components.css — 共通部品
   ボタン／フォーム／カード／リスト／チップ／タブ／モーダル ほか
   ========================================================= */

/* ---------- Button ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent; font: 700 15px/1 var(--font-sans); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.btn--block { display: flex; width: 100%; }
.btn--cta { background: var(--c-cta); color: #fff; box-shadow: 0 6px 18px rgba(224, 71, 111, .32); }
.btn--cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(224, 71, 111, .4); }
.btn--gold { background: var(--c-accent); color: var(--c-on-accent); }
.btn--ghost { background: transparent; color: var(--c-text); border-color: var(--c-line-strong); }
.btn--danger { background: transparent; color: var(--c-danger); border-color: var(--c-danger); }
.btn--md { height: 46px; font-size: 14px; }
.btn--sm { height: 36px; padding: 0 16px; font-size: 12.5px; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; gap: 10px; } .btn-row > * { flex: 1; } .btn-row > .btn--fixed { flex: 0 0 110px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 12px; color: var(--c-text-sub); }
.field__note { font-size: 11px; line-height: 1.6; color: var(--c-text-weak); }
.field__error { font-size: 12px; color: var(--c-danger); }
.field__count { font-size: 11px; color: var(--c-text-weak); text-align: right; }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 14px; background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--radius-sm); color: var(--c-text); font-size: 14px; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.8; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--c-text-weak); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-accent); outline: none; box-shadow: 0 0 0 3px var(--c-gold-soft); }
.input.is-error { border-color: var(--c-danger); }
.input[readonly] { color: var(--c-text-sub); background: transparent; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f2ecdf' stroke-opacity='.5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input-wrap { position: relative; } .input-wrap .input { padding-right: 46px; }
.input-wrap > .i { position: absolute; right: 14px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--c-text-weak); }
.fields-row { display: flex; gap: 8px; } .fields-row > * { flex: 1; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.7; color: var(--c-text-sub); }
.check input { appearance: none; width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; border: 1px solid var(--c-line-strong); border-radius: 4px; background: var(--c-surface-2); display: grid; place-content: center; }
.check input:checked { background: var(--c-accent); border-color: var(--c-accent); }
.check input:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--c-on-accent); border-bottom: 2px solid var(--c-on-accent); transform: rotate(-45deg) translate(1px, -1px); }
.seg { display: flex; gap: 10px; } .seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-text-sub); font-size: 14px; }
.seg input:checked + span { border-color: var(--c-accent); background: var(--c-gold-soft); color: var(--c-accent); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.switch { appearance: none; position: relative; width: 44px; height: 24px; flex-shrink: 0; border-radius: 12px; background: rgba(242, 236, 223, .16); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--c-text); transition: left .2s; }
.switch:checked { background: var(--c-accent); } .switch:checked::after { left: 22px; background: var(--c-on-accent); }
/* 範囲スライダー（見た目のみ。実装は noUiSlider や input[type=range]×2 に置換） */
.range { position: relative; height: 28px; margin: 4px 0 2px; }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: rgba(242, 236, 223, .14); }
.range__fill { position: absolute; top: 12px; height: 4px; border-radius: 2px; background: var(--c-accent); left: var(--a); width: calc(var(--b) - var(--a)); }
.range__thumb { position: absolute; top: 5px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--c-accent); border: 3px solid var(--c-bg); box-shadow: 0 0 0 1px var(--c-accent); }
.range__thumb--a { left: var(--a); } .range__thumb--b { left: var(--b); }
.range__scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--c-text-weak); }

/* ---------- Surface ---------- */
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; }
.card--gold { border-color: var(--c-line-strong); background: rgba(212, 175, 106, .07); }
.card--danger { border-color: rgba(224, 71, 111, .5); }
.card--flush { padding: 0; overflow: hidden; }
.sec-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.sec-head__en { font-size: 10px; letter-spacing: .2em; font-weight: 700; color: var(--c-accent); }
.sec-head__ja { font: 700 17px/1.5 var(--font-serif); }
.divider { border: 0; border-top: 1px solid var(--c-line-soft); margin: 0; }
.photo { position: relative; overflow: hidden; background: radial-gradient(circle at 25% 20%, rgba(212,175,106,.30) 0, transparent 42%), radial-gradient(circle at 78% 18%, rgba(212,175,106,.16) 0, transparent 38%), radial-gradient(circle at 60% 80%, rgba(255,255,255,.06) 0, transparent 30%), #131620; display: flex; align-items: center; justify-content: center; }
.photo::after { content: attr(data-label); font-size: 11px; color: rgba(242, 236, 223, .3); }
.avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--c-line-strong); }
.avatar--sm { width: 36px; height: 36px; } .avatar--lg { width: 104px; height: 104px; border: 2px solid var(--c-accent); }
.avatar::after { content: none; }

/* ---------- List row ---------- */
.list { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; font-size: 14px; border-bottom: 1px solid var(--c-line-soft); }
.list__item:last-child { border-bottom: 0; }
.list__label { flex: 1; } .list__value { font-size: 12.5px; color: var(--c-text-weak); } .list__value--gold { color: var(--c-accent); }
.kv { display: flex; padding: 12px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 13px; } .kv:last-child { border-bottom: 0; }
.kv dt { width: 112px; color: var(--c-text-weak); flex-shrink: 0; }

/* ---------- Chip / Tag / Badge ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-text-sub); font-size: 12.5px; }
.chip.is-on { background: var(--c-gold-soft); border-color: var(--c-accent); color: var(--c-accent); }
.tag { display: inline-block; padding: 4px 10px; border-radius: 2px; border: 1px solid var(--c-line-strong); color: var(--c-accent); font-size: 11px; line-height: 1.5; }
.tag--danger { border-color: var(--c-danger); color: var(--c-danger); } .tag--weak { border-color: var(--c-line); color: var(--c-text-weak); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--c-cta); color: #fff; font-size: 10.5px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--c-line-strong); font-size: 12px; color: var(--c-accent); }

/* ---------- Tabs / Stepper ---------- */
.tabs { display: flex; border-bottom: 1px solid var(--c-line); background: var(--c-bg); }
.tabs__tab { flex: 1; text-align: center; padding: 13px 0; font-size: 13.5px; color: var(--c-text-weak); border-bottom: 2px solid transparent; }
.tabs__tab.is-on { color: var(--c-accent); font-weight: 700; border-bottom-color: var(--c-accent); }
.stepper { display: flex; position: relative; padding: 0 6px; }
.stepper::before { content: ""; position: absolute; top: 14px; left: 16%; right: 16%; height: 1.5px; background: var(--c-line-strong); }
.stepper__step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; font-size: 11.5px; color: var(--c-text-weak); }
.stepper__dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--c-line-strong); background: var(--c-surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; z-index: 1; }
.stepper__step.is-on { color: var(--c-accent); } .stepper__step.is-on .stepper__dot { border-color: var(--c-accent); background: var(--c-gold-soft); }
.stepper__step.is-ng { color: var(--c-danger); } .stepper__step.is-ng .stepper__dot { border-color: var(--c-danger); background: rgba(224,71,111,.12); }

/* ---------- Overlay / Dialog / Sheet / Toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: var(--c-overlay); display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay--bottom { align-items: flex-end; padding: 0; }
.dialog { width: 100%; max-width: 380px; padding: 30px 22px 22px; background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: 18px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 14px; }
.dialog__icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; border: 1px solid var(--c-line-strong); background: var(--c-gold-soft); display: flex; align-items: center; justify-content: center; color: var(--c-accent); }
.dialog__title { font: 800 20px/1.5 var(--font-serif); }
.sheet { width: 100%; max-width: 560px; padding: 10px 18px 22px; background: var(--c-surface); border: 1px solid var(--c-line-strong); border-bottom: 0; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; gap: 12px; }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--c-line-strong); margin: 0 auto 6px; }
.sheet__title { font: 700 16px/1.5 var(--font-serif); text-align: center; }
.sheet__action { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--c-line-soft); font-size: 14.5px; } .sheet__action:last-of-type { border-bottom: 0; }
.toast { position: fixed; left: 20px; right: 20px; bottom: calc(var(--nav-h) + 20px); z-index: 70; max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: var(--c-surface-3); border: 1px solid var(--c-line-strong); border-radius: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }

/* ---------- Misc ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--c-line-strong); background: rgba(212, 175, 106, .08); font-size: 12.5px; line-height: 1.8; color: var(--c-text-sub); }
.notice .i { margin-top: 2px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 56px 24px; }
.empty__icon { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--c-line-strong); background: var(--c-gold-soft); display: flex; align-items: center; justify-content: center; color: var(--c-accent); }
.empty__title { font: 800 19px/1.5 var(--font-serif); } .empty__text { font-size: 13px; line-height: 1.9; color: var(--c-text-sub); }
.plan-opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-surface); }
.plan-opt input { appearance: none; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--c-line-strong); display: grid; place-content: center; }
.plan-opt input:checked { border-color: var(--c-accent); } .plan-opt input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); }
.plan-opt:has(input:checked), .plan-opt.is-on { border: 1.5px solid var(--c-accent); background: rgba(212, 175, 106, .07); }
.plan-opt__body { flex: 1; } .plan-opt__name { font-size: 15px; font-weight: 700; } .plan-opt__sub { font-size: 11.5px; color: var(--c-text-sub); }
.plan-opt__price { text-align: right; font: 800 19px/1.2 var(--font-serif); } .plan-opt__price small { display: block; font: 400 10.5px var(--font-sans); color: var(--c-text-weak); }
.plan-opt__flag { position: absolute; top: -10px; right: 14px; padding: 3px 10px; border-radius: 999px; background: var(--c-cta); color: #fff; font-size: 10.5px; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--c-line-soft); vertical-align: middle; }
.table th { font-size: 11.5px; font-weight: 500; color: var(--c-text-weak); background: var(--c-surface); border-bottom-color: var(--c-line); }
