/* 友達の紹介（2026-11-04。assets/referral.js が作る）。Web だけ（iOSアプリ html.is-native では何も出さない。App Store 3.1.1）。
   1. 帯: ログイン前の案内・紹介を受けたお知らせ・チケットが届いた帯。作りは launch.css のお知らせと同じ（色は DESIGN.md の値）。複数あるときは上から積む。
   2. 契約の確認（subscription.html）の「友達の紹介」カード: 外枠・見出しは screens.css の .dpg-scr__card。ここは中身だけ。
      id で書いて、screens.css の .dpg-scr--sub button などより先に効かせる（subscription.html の他のカードと同じ部品の作り）。 */
:root{--ref-c-1:#fff;--ref-c-2:#c9b0f0;--ref-r-3:16px;--ref-sh-4:0 8px 24px #3a1c7a2e;--ref-c-5:#292622;--ref-fs-6:15px;--ref-c-7:#4b2491;--ref-fs-8:14px;--ref-c-9:#6424ed;--ref-r-10:12px;--ref-c-11:#65594d;--ref-c-12:#f3edff;--ref-fs-13:20px;--ref-r-14:999px;--ref-fs-15:13px;--ref-fs-16:16px;--ref-r-17:14px;--ref-sh-18:0 3px 0 #4215a8;--ref-fs-19:18px;--ref-c-20:#d9d6d3;--ref-c-21:#3b3631;--ref-c-22:#f1eeea;--ref-c-23:#e5dcd2}

.dpg-referral-stack{position:fixed;z-index:9998;top:calc(env(safe-area-inset-top,0px) + 12px);left:50%;transform:translateX(-50%);box-sizing:border-box;width:min(calc(100vw - 24px),440px);display:flex;flex-direction:column;gap:8px;pointer-events:none}
.dpg-referral-notice{pointer-events:auto;box-sizing:border-box;display:flex;align-items:flex-start;gap:12px;padding:14px 14px 14px 18px;background:var(--ref-c-1);border:1px solid var(--ref-c-2);border-radius:var(--ref-r-3);box-shadow:var(--ref-sh-4);color:var(--ref-c-5);font-size:var(--ref-fs-6);line-height:1.7}
.dpg-referral-notice__text{flex:1 1 auto;min-width:0;margin:0;overflow-wrap:anywhere}
.dpg-referral-notice__text strong{display:block;font-weight:800;color:var(--ref-c-7)}
.dpg-referral-notice__link{display:inline-flex;align-items:center;min-height:44px;font-size:var(--ref-fs-8);font-weight:800;color:var(--ref-c-7);text-decoration:underline}
.dpg-referral-notice__link:focus-visible,.dpg-referral-notice__close:focus-visible{outline:3px solid var(--ref-c-9);outline-offset:2px}
.dpg-referral-notice__close{flex:0 0 auto;min-width:44px;min-height:44px;margin:-8px -4px -8px 0;padding:0 10px;background:transparent;border:0;border-radius:var(--ref-r-10);color:var(--ref-c-11);font:inherit;font-size:var(--ref-fs-8);font-weight:700;cursor:pointer}
.dpg-referral-notice__close:hover{background:var(--ref-c-12)}
html.is-native .dpg-referral-stack,html.is-native .dpg-referral-notice,html.is-native #referral{display:none!important}

#referral-body{display:flex;flex-direction:column;gap:14px}
#referral .referral__main{display:flex;flex-direction:column;gap:14px}
#referral .referral__off{margin:0;font-size:var(--ref-fs-6);line-height:1.7}
#referral .referral__hero{display:flex;align-items:center;gap:14px;min-width:0}
#referral .referral__people{flex:none;width:56px;height:43px;fill:none;stroke:var(--scr-accent,var(--accent));stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#referral .referral__headline{margin:0;min-width:0;font-size:var(--ref-fs-13);font-weight:900;line-height:1.45;color:var(--scr-accent-ink,var(--accent));text-wrap:balance;overflow-wrap:anywhere}
#referral .referral__send-box{display:flex;flex-direction:column;align-items:stretch;gap:6px}
#referral .referral__code b{font-size:var(--ref-fs-6);letter-spacing:.08em;color:var(--scr-text,var(--text));overflow-wrap:anywhere}
#referral .referral__progress{display:flex;flex-direction:column;gap:6px}
#referral .referral__bar{box-sizing:border-box;height:8px;border-radius:var(--ref-r-14);background:var(--scr-accent-soft,var(--surface-2));border:1px solid var(--scr-accent-line,var(--separator));overflow:hidden}
#referral .referral__fill{display:block;height:100%;border-radius:var(--ref-r-14);background:var(--scr-accent,var(--accent))}
#referral .referral__small{margin:0;font-size:var(--ref-fs-15);line-height:1.6;color:var(--scr-muted,var(--text-2))}
#referral input[type=text]{box-sizing:border-box;display:block;width:100%;max-width:100%;min-height:48px;margin:0;padding:10px 12px;border:1.5px solid var(--scr-control,var(--control-border));border-radius:var(--ref-r-10);background:var(--ref-c-1);color:var(--scr-text,var(--text));font:inherit;font-size:var(--ref-fs-16);line-height:1.4}
#referral .referral__link{text-overflow:ellipsis}
#referral button{display:block;width:100%;max-width:100%;min-height:50px;margin:0;padding:10px 12px;text-wrap:balance;border:1.5px solid transparent;border-radius:var(--ref-r-17);font:inherit;font-size:var(--ref-fs-16);font-weight:800;line-height:1.4;text-align:center;cursor:pointer}
#referral .referral__send,#referral .referral__claim-go,#referral .referral-ticket__use:not(:disabled),#referral .referral-ticket__yes:not(:disabled){background:var(--scr-grad,var(--accent));color:var(--ref-c-1);box-shadow:var(--ref-sh-18)}
#referral .referral-ticket__no{background:var(--ref-c-1);border-color:var(--scr-control,var(--control-border));color:var(--scr-text,var(--text))}
#referral .referral__send{min-height:56px;font-size:var(--ref-fs-19)}
#referral .referral__copyonly{min-height:44px;background:transparent;border-color:transparent;box-shadow:none;color:var(--scr-accent,var(--accent));font-size:var(--ref-fs-8);font-weight:700;text-decoration:underline;text-underline-offset:3px}
#referral button:disabled{background:var(--ref-c-20);border-color:transparent;color:var(--ref-c-21);box-shadow:none;cursor:default}
#referral .referral-ticket__no:disabled{background:var(--ref-c-22);border-color:var(--ref-c-23);color:var(--ref-c-11)}
#referral .referral__status{margin:0;padding:12px 14px;border-radius:var(--ref-r-10);background:var(--scr-surface-2,var(--surface-2));font-size:var(--ref-fs-8);font-weight:700;line-height:1.6;overflow-wrap:anywhere}
#referral .referral__status:empty{display:none}
#referral details{margin:0;padding:0}
#referral summary{box-sizing:border-box;min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:800;color:var(--scr-accent,var(--accent))}
#referral .referral__enter-form{display:flex;flex-direction:column;gap:10px;padding:4px 0 0}
#referral .referral__enter-form label{margin:0;font-size:var(--ref-fs-8);font-weight:800}
#referral .referral__tickets{display:flex;flex-direction:column;gap:14px}
#referral .referral-ticket__head{display:flex;align-items:center;gap:14px;min-width:0}
#referral .referral-ticket__icon{flex:none;width:38px;height:38px;fill:none;stroke:var(--scr-accent,var(--accent));stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#referral .referral-ticket__text{display:flex;flex-direction:column;min-width:0}
#referral .referral-ticket__title{font-size:var(--ref-fs-16);font-weight:800;line-height:1.5;overflow-wrap:anywhere}
#referral .referral-ticket__sub{font-size:var(--ref-fs-15);line-height:1.6;color:var(--scr-muted,var(--text-2))}
#referral .referral-ticket__use{margin-top:14px}
#referral .referral-ticket__confirm{margin-top:10px;padding:14px 16px;border:1.5px solid var(--scr-accent-line,var(--separator));border-radius:var(--ref-r-17);background:var(--scr-accent-soft,var(--surface-2))}
#referral .referral-ticket__ask{margin:0;font-size:var(--ref-fs-6);font-weight:800;line-height:1.6}
#referral .referral-ticket__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
#referral .referral-ticket__actions button{flex:1 1 120px;width:auto}
[hidden]#referral,#referral [hidden]{display:none!important}
