/* マイページ：material-design スキルのトークン（色・影はここだけで決める） */
:root {
  --primary: #4072B3; --on-primary: #ffffff; --primary-hover: #355e96;
  --primary-container: #AEC4E5;
  --secondary-container: #d7e3f7; --on-secondary-container: #101c2b;
  --success-container: #c8e6c9; --on-success-container: #0a3b0e;
  --warn-container: #fde8b8; --on-warn-container: #5a3a00;
  --error-text: #b3261e; --error-container: #fde0e0; --on-error-container: #5a1818;
  --surface: #ffffff; --surface-container: #f2f2f2;
  --on-surface: #1c1b1f; --on-surface-variant: #49454f;
  --outline: #C0C0C0; --divider: #e8e8e8;
  --shadow-1: 0 1px 2px 0 rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
  --shadow-2: 0 1px 2px 0 rgba(0,0,0,.3), 0 2px 6px 2px rgba(0,0,0,.15);
  --teiki-ink: #6e463b; --teiki-paper: #ffffff;
  --pass-teiki: #f7e4e8; --pass-teiki-ink: #4a2c25;
  --pass-norippa: #fdf0c4; --pass-norippa-ink: #4a3a00;
  --barcode-ink: #000000; --barcode-paper: #ffffff;
  --radius-m: 12px; --radius-l: 16px; --radius-full: 999px;
  --font: 'Salesforce Sans', 'Noto Sans JP', system-ui, -apple-system, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--surface-container); color: var(--on-surface); font-family: var(--font); font-size: 16px; line-height: 1.6; }
.wrap { max-width: 480px; margin: 0 auto; padding: 16px 16px 48px; }
.wrap > section { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; padding-top: 48px; }
.muted { color: var(--on-surface-variant); font-size: 14px; margin: 0; }
.lead { font-size: 18px; font-weight: 700; margin: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
.top h1 { font-size: 20px; margin: 0; }
.page-title { font-size: 20px; margin: 0; }
.link, .back { color: var(--primary); background: none; border: 0; padding: 10px 0; font: inherit; font-size: 14px; cursor: pointer; }
.back { display: inline-flex; align-items: center; gap: 4px; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.who { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.who .name { font-size: 18px; font-weight: 700; }
.who .no { color: var(--on-surface-variant); font-size: 14px; font-variant-numeric: tabular-nums; }
/* ご契約：契約1本＝箱1つ（利用者・自転車と、その契約のボタンを中に置く） */
.sec { font-size: 16px; margin: 8px 0 -4px; }
.keiyaku-list { display: flex; flex-direction: column; gap: 16px; }
.keiyaku { gap: 12px; }
.k-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.k-head .p { font-weight: 700; }
.k-info { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--divider); padding-top: 12px; }
.k-row { display: flex; align-items: center; gap: 12px; min-height: 28px; }
.k-label { flex: none; width: 4em; color: var(--on-surface-variant); font-size: 14px; }
.k-value { min-width: 0; overflow-wrap: anywhere; }
.k-actions { display: flex; gap: 8px; }
.k-actions .btn { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 8px; font-size: 14px; line-height: 1.3; }
@media (max-width: 340px) { .k-actions .btn { padding: 0 4px; font-size: 12px; } }
.sub { color: var(--on-surface-variant); font-size: 14px; }
.chip { border-radius: var(--radius-full); padding: 2px 12px; font-size: 13px; white-space: nowrap; }
.chip.ok { background: var(--success-container); color: var(--on-success-container); }
.chip.todo { background: var(--warn-container); color: var(--on-warn-container); }
.chip.ng { background: var(--error-container); color: var(--on-error-container); }
.menu { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 20px; background: none; border: 0; font: inherit; color: var(--on-surface); text-align: left; cursor: pointer; }
.menu button + button { border-top: 1px solid var(--divider); }
.menu .t { font-weight: 700; display: block; }
.menu .r { display: flex; align-items: center; gap: 8px; color: var(--on-surface-variant); }
.group { font-size: 13px; font-weight: 700; color: var(--on-surface-variant); letter-spacing: .04em; border-top: 1px solid var(--divider); padding-top: 14px; }
.page-title + .group, .notice + .group { border-top: 0; padding-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field select { font: inherit; color: var(--on-surface); background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-m); padding: 12px 14px; min-height: 48px; width: 100%; }
.field.bad input, .field.bad select { border-color: var(--error-text); }
.field.agree label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; min-height: 48px; cursor: pointer; }
.field.agree input { width: 22px; height: 22px; min-height: 0; flex: none; padding: 0; margin: 1px 0 0; accent-color: var(--primary); }
.err { color: var(--error-text); font-size: 13px; margin: 0; }
.notice { background: var(--secondary-container); color: var(--on-secondary-container); border-radius: var(--radius-m); padding: 12px 14px; margin: 0; font-size: 14px; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--primary-container); outline-offset: 2px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.btn { font: inherit; font-weight: 700; border-radius: var(--radius-full); min-height: 52px; border: 0; padding: 0 24px; background: var(--primary); color: var(--on-primary); cursor: pointer; transition: background 200ms ease-out; }
.btn:hover { background: var(--primary-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.danger { background: var(--error-text); color: var(--on-primary); }
.btn.danger:hover { background: var(--on-error-container); }
/* ホームのいちばん下：プライバシーポリシー・アカウントを削除 */
.foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; margin: 16px 0 0; font-size: 14px; color: var(--on-surface-variant); }
.footlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; background: none; border: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
/* 削除の方法のページ */
.steps { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.plain-list { margin: 0; padding-left: 1.2em; }
.plain { margin: 0; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* 会員証（お客様番号のバーコード。管理室の読み取り機にかざす） */
.member { gap: 10px; }
.member .m-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.member .m-site { color: var(--on-surface-variant); font-size: 13px; }
.member .m-tag { background: var(--primary); color: var(--on-primary); border-radius: var(--radius-full); padding: 2px 14px; font-size: 13px; font-weight: 700; }
.member .name { font-size: 20px; font-weight: 700; }
.member .m-code { background: var(--barcode-paper); padding: 6px 0 0; }
.member .barcode { display: block; width: 100%; height: 96px; fill: var(--barcode-ink); stroke: none; }
.member .no { text-align: center; color: var(--on-surface); font-size: 18px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

/* 定期利用承認証・NORIPPA カードの絵。カードの製作会社へ入稿した元データをそのまま図にした物（色・形・市章は絵の中） */
.card-defs { position: absolute; }
.teiki { overflow: hidden; background: var(--teiki-paper); aspect-ratio: 408.211 / 260.703; border-radius: 3.7% / 5.8%; box-shadow: var(--shadow-1); width: 100%; }
.teiki.norippa { aspect-ratio: 241.262 / 152.137; border-radius: 3.7% / 5.87%; }
.teiki .t-face { display: block; width: 100%; height: 100%; stroke: none; }
.teiki .t-in { font-family: 'Hiragino Maru Gothic ProN', 'Hiragino Maru Gothic Pro', var(--font); font-size: 15px; font-weight: 600; fill: var(--teiki-ink); stroke: none; }

/* ウォレットの形：契約1本＝カード1枚。開いている1枚に、承認証・自転車・バーコード・その契約のボタンが入る。
   ほかの契約は下に重なって見出しだけ見え、押すと入れ替わる */
.wallet, .kids { display: flex; flex-direction: column; }
.kids { gap: 12px; }
.wallet:empty, .kids:empty { display: none; }
.pass { border-radius: var(--radius-l); box-shadow: var(--shadow-2); background: var(--pass-teiki); color: var(--pass-teiki-ink); display: flex; flex-direction: column; min-width: 0; }
.pass.norippa { background: var(--pass-norippa); color: var(--pass-norippa-ink); }
.pass.plain { background: var(--surface); color: var(--on-surface); }
.wallet .pass.open { order: -1; }
.wallet .pass.open:not(:only-child) { margin-bottom: 20px; }
.wallet .pass:not(.open) { margin-top: -14px; }
.pass:not(.open) .p-body { display: none; }
.wallet .pass:not(.open) .p-head { padding-bottom: 26px; cursor: pointer; }
.wallet .pass:not(.open):last-child .p-head { padding-bottom: 14px; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 56px; background: none; border: 0; font: inherit; color: inherit; text-align: left; width: 100%; border-radius: var(--radius-l); }
.p-who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.p-label { font-size: 12px; letter-spacing: .04em; }
.p-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.p-prod { flex: none; font-size: 13px; font-weight: 700; text-align: right; }
.p-body { display: flex; flex-direction: column; gap: 14px; padding: 0 16px 16px; }
.p-body > .chip { align-self: flex-start; }
.p-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-field { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
/* 項目が1つだけの時は横いっぱい（メールアドレスが途中で折れないように） */
.p-field:only-child { grid-column: 1 / -1; }
.p-value { font-weight: 700; overflow-wrap: anywhere; }
.p-code { background: var(--barcode-paper); color: var(--on-surface); border-radius: var(--radius-m); padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.p-code .barcode { display: block; width: 100%; height: 72px; fill: var(--barcode-ink); stroke: none; }
.p-code .no { text-align: center; font-size: 16px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.pass:not(.plain) .btn.tonal { background: var(--surface); color: var(--on-surface); }

/* 保護者の登録（ホーム）・「ご利用になる方は」の選び方 */
.hogosha { gap: 12px; }
.lbl { font-size: 14px; font-weight: 700; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { flex: 1 1 140px; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--outline); border-radius: var(--radius-m); font-weight: 400; cursor: pointer; }
.seg input { width: 20px; height: 20px; min-height: 0; flex: none; padding: 0; margin: 0; accent-color: var(--primary); }
.field.bad .seg label { border-color: var(--error-text); }

/* カードの中の「ご利用者のスマホへ送る」（1つだけのボタンは横いっぱい） */
.p-body > .btn.send { min-height: 48px; font-size: 14px; }

/* お支払いへ進む（外のページへ行くリンクを、ボタンの形で） */
.link-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* 保護者に読み取ってもらう QR コード（白い地・黒い点のまま出す） */
.qr-card { align-items: center; text-align: center; }
.qr { width: 100%; max-width: 300px; background: var(--barcode-paper); }
/* アイコン用の線の決まり（太さ2・丸い端）が QR の点に掛からないよう、元の値に戻す */
.qr svg { display: block; width: 100%; height: auto; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.qr-card .k-row { align-self: stretch; text-align: left; }

/* 支払い待ち：QR コード・バーコードの画面（絵を大きく1つ・下に1行・戻る） */
.qr-card .btn { align-self: stretch; }
.cash-code { align-self: stretch; background: var(--barcode-paper); color: var(--on-surface); display: flex; flex-direction: column; gap: 8px; }
.cash-code .barcode { display: block; width: 100%; height: 120px; fill: var(--barcode-ink); stroke: none; }
.cash-code .no { text-align: center; font-size: 20px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
/* 言葉は切れ目のよい所でだけ折る。横並びのボタンは、2つとも同じ2行にそろえる */
.nb { display: inline-block; }
.k-actions .nb { display: block; }
/* ボタンが1つだけの時は、文字を折らない */
.k-actions .btn:only-child .nb { display: inline; }

/* 支払い待ちのカードのいちばん下：申し込みを取り消す（文字だけのリンク → 同じカードの中で確かめる） */
.p-cancel { display: flex; flex-direction: column; gap: 10px; }
.textlink { align-self: center; min-height: 44px; padding: 0 12px; background: none; border: 0; font: inherit; font-size: 14px; color: inherit; text-decoration: underline; cursor: pointer; }
.p-ask { display: flex; flex-direction: column; gap: 10px; }
.p-ask .lbl { margin: 0; text-align: center; }

/* 登録の画面の中のまとまり（あなたの登録／家族の登録で、出す・出さないを切り替える）。並びはカードの決まりのまま */
.box { display: contents; }
.page-title + .box > .group:first-child, .notice + .box > .group:first-child, .box[hidden] + .box > .group:first-child { border-top: 0; padding-top: 0; }

/* カードの中の、横いっぱいのボタン1つ（定期カードを家族のスマホへ渡す・家族が管理室で現金で払う）。高さは横並びのボタンとそろえる */
.p-body > .btn.wide { min-height: 48px; font-size: 14px; line-height: 1.3; }
.p-body > .btn.wide .nb { display: inline-block; }
.p-title { margin: 0; font-size: 16px; font-weight: 700; }
/* 読むだけのページ（プライバシーポリシー・サポート）：箱の中の文は詰め、文中のリンクはブランドの青 */
.doc .card p { margin: 0; }
.doc .card p a { color: var(--primary); display: inline-block; padding: 10px 0; }
