/* ============================================================
   Hatch — Design System
   温かく・静かで・信頼が宿るトーン。孵化(incubation)の世界観。
   §3 に従い、フォロワー数・ランキング煽りなどの虚栄指標は持たない。
   ============================================================ */

:root {
  --bg: #f3f7f8;
  --surface: #ffffff;
  --surface-2: #ebf2f2;
  --surface-3: #deebea;
  --ink: #2b3344;
  --ink-soft: #5f6678;
  --ink-faint: #99a0ac;
  --line: #e3eaeb;
  --line-strong: #ccd8d9;

  --accent: #3e4a77;
  --accent-deep: #313c64;
  --accent-ink: #3a4570;
  --accent-soft: #e5e8f2;
  --accent-glow: rgba(62, 74, 119, 0.22);

  --highlight: #edce16;
  --highlight-soft: #fbf2bf;
  --mint: #9eddd5;
  --mint-soft: #dcf2ee;

  --referral: #a98c06;
  --referral-soft: #fbf2bf;
  --oneonone: #2e9b90;
  --oneonone-soft: #d6f0ec;
  --casual: #7e8694;
  --casual-soft: #e7eced;
  --collab: #5560a0;
  --collab-soft: #e5e8f5;

  --danger: #d35a52;
  --danger-soft: #f7e1df;
  --ok: #3a9b6f;
  --ok-soft: #d8efe4;

  --shadow-sm: 0 1px 2px rgba(40, 50, 70, 0.06), 0 1px 3px rgba(40, 50, 70, 0.05);
  --shadow: 0 4px 14px rgba(40, 50, 70, 0.09), 0 1px 4px rgba(40, 50, 70, 0.06);
  --shadow-lg: 0 14px 40px rgba(40, 50, 70, 0.15), 0 4px 12px rgba(40, 50, 70, 0.08);
  --shadow-accent: 0 8px 22px var(--accent-glow);

  --r-xs: 8px;
  --r-sm: 11px;
  --r: 15px;
  --r-lg: 20px;
  --r-xl: 28px;
  --pill: 999px;

  --tabbar-h: 64px;
  --appbar-h: 56px;
  --maxw: 600px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b2233;
    --surface: #252d40;
    --surface-2: #2f3850;
    --surface-3: #3a445e;
    --ink: #eef1f6;
    --ink-soft: #b4bccc;
    --ink-faint: #828aa0;
    --line: #333c52;
    --line-strong: #45506b;

    --accent: #8b97c9;
    --accent-deep: #6f7cb8;
    --accent-ink: #aab4dd;
    --accent-soft: #2c3450;
    --accent-glow: rgba(139, 151, 201, 0.22);

    --highlight: #edce16;
    --highlight-soft: #3a3617;
    --mint: #9eddd5;
    --mint-soft: #1f3a37;

    --referral: #d9bb3a;
    --referral-soft: #3a3417;
    --oneonone: #54bdb0;
    --oneonone-soft: #173330;
    --casual: #99a1b3;
    --casual-soft: #2a3146;
    --collab: #8b93cf;
    --collab-soft: #28304a;
    --danger: #e8736b;
    --danger-soft: #3a201e;
    --ok: #5cb98a;
    --ok-soft: #173024;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); }

/* scrollbars (desktop) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg); }

/* ---------- boot splash ---------- */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 20px; background: var(--bg);
}
.boot-mark { animation: bob 2.4s var(--ease) infinite; filter: drop-shadow(var(--shadow)); }
@keyframes bob { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-7px) } }
.boot-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ============================================================
   App shell
   ============================================================ */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

.appbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--appbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.appbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 0.02em; font-size: 17px; }
.appbar .brand svg { width: 26px; height: 26px; }
.appbar .brand .tag { font-size: 10.5px; font-weight: 600; color: var(--ink-faint); letter-spacing: 0.04em; }
.appbar .spacer { flex: 1; }

.community-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  max-width: 46vw; box-shadow: var(--shadow-sm);
}
.community-switch b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-switch .chev { color: var(--ink-faint); }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-content: center; color: var(--ink-soft);
  transition: background 0.18s, color 0.18s, transform 0.1s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-content: center; border: 2px solid var(--bg);
}

/* content */
.view {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px);
  animation: viewIn 0.32s var(--ease);
}
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view-head { margin: 4px 2px 16px; }
.view-head h1 { font-size: 23px; font-weight: 800; letter-spacing: 0.01em; }
.view-head p { color: var(--ink-soft); font-size: 13.5px; margin-top: 4px; }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: center; gap: 6px; align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-faint); font-size: 11.5px; font-weight: 700; height: 100%;
  justify-content: center; transition: color 0.18s; position: relative;
  width: 78px; max-width: 24vw;
}
.tab svg { width: 23px; height: 23px; }
.tab.active { color: var(--accent-deep); }
.tab:active { transform: scale(0.94); }
.tab.center { transform: translateY(-14px); }
.tab.center .bub {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-content: center; color: #fff;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: var(--shadow-accent), 0 4px 10px rgba(0,0,0,0.12);
  border: 4px solid var(--bg); transition: transform 0.15s var(--ease);
}
.tab.center svg { width: 27px; height: 27px; }
.tab.center.active .bub { transform: scale(1.04); }
.tab.center span { margin-top: 2px; }

/* ============================================================
   Components
   ============================================================ */

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border-radius: var(--pill); font-weight: 700; font-size: 14.5px;
  background: var(--surface-2); color: var(--ink); transition: transform 0.1s, background 0.18s, box-shadow 0.18s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(150deg, var(--accent), var(--accent-deep)); color: #fff; box-shadow: var(--shadow-accent); }
.btn.primary:hover { box-shadow: 0 10px 26px var(--accent-glow); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.block { display: flex; width: 100%; }
.btn.sm { padding: 8px 13px; font-size: 13px; }
.btn.lg { padding: 14px 22px; font-size: 15.5px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }

/* cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 16px;
}
.card.flat { box-shadow: none; }
.stack { display: flex; flex-direction: column; }
.stack.g8 { gap: 8px; } .stack.g10 { gap: 10px; } .stack.g12 { gap: 12px; } .stack.g16 { gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.tiny { font-size: 12.5px; }

/* つなげた回数 (応援の軌跡) を目立たせる */
.spread-stat { display: inline-flex; align-items: baseline; gap: 5px; color: var(--accent-ink); font-weight: 800; }
.spread-stat .num { font-size: 22px; line-height: 1; }
.spread-stat .lbl { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.spread-stat.zero { color: var(--ink-faint); }
.spread-stat.zero .num { font-size: 15px; }
.center-text { text-align: center; }

/* avatar */
.avatar {
  --sz: 44px; width: var(--sz); height: var(--sz); border-radius: 50%; flex: none;
  display: grid; place-content: center; font-weight: 800; color: #fff; overflow: hidden;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep)); font-size: calc(var(--sz) * 0.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.avatar.sm { --sz: 34px; } .avatar.lg { --sz: 72px; } .avatar.xl { --sz: 92px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* chips / tags */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--pill);
  background: var(--surface-2); color: var(--ink-soft); font-size: 12px; font-weight: 600; border: 1px solid var(--line);
}
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.chip.lg { padding: 6px 13px; font-size: 13px; }
.chip.tap { transition: transform 0.1s, background 0.16s; }
.chip.tap:active { transform: scale(0.94); }
.chip .x { color: var(--ink-faint); font-weight: 800; margin-left: 1px; }

/* kind badge */
.kbadge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--pill); font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }
.kbadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.k-referral_request { background: var(--referral-soft); color: var(--referral); }
.k-one_on_one_request { background: var(--oneonone-soft); color: var(--oneonone); }
.k-casual { background: var(--casual-soft); color: var(--casual); }
.k-collab { background: var(--collab-soft); color: var(--collab); }
.bar-referral_request { background: var(--referral); }
.bar-one_on_one_request { background: var(--oneonone); }
.bar-casual { background: var(--casual); }
.bar-collab { background: var(--collab); }

/* inputs */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--ink-faint); padding-left: 2px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: var(--r); background: var(--surface);
  border: 1.5px solid var(--line-strong); transition: border-color 0.18s, box-shadow 0.18s; font-size: 15px;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }

/* tag input */
.taginput { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 10px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line-strong); transition: border-color 0.18s, box-shadow 0.18s; }
.taginput:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.taginput input { flex: 1; min-width: 90px; border: none; background: none; outline: none; padding: 4px; font-size: 14.5px; }
.taginput .chip { cursor: default; }

/* segmented control */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--pill); }
.seg button { flex: 1; padding: 8px 10px; border-radius: var(--pill); font-size: 13px; font-weight: 700; color: var(--ink-soft); transition: 0.18s; }
.seg button.active { background: var(--surface); color: var(--accent-deep); box-shadow: var(--shadow-sm); }

/* list row */
.lrow { display: flex; align-items: center; gap: 12px; padding: 13px 4px; }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .name { font-weight: 700; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* trust display (gratitude rolling) — NOT a rank */
.trust { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.trust svg { width: 15px; height: 15px; }
.trust .lbl { color: var(--ink-faint); font-weight: 600; font-size: 11.5px; }

/* status / need card */
.need { padding: 15px 16px; }
.need .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.need .body { font-size: 15.5px; line-height: 1.62; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.need .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.need .actions { display: flex; gap: 8px; margin-top: 13px; }

/* timeline status strip (horizontal) */
.strip { display: flex; gap: 11px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; margin: 0 -2px; }
.strip::-webkit-scrollbar { display: none; }
.scard {
  scroll-snap-align: start; flex: none; width: 158px; min-height: 128px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 12px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden;
}
.scard .edge { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.scard .who { display: flex; align-items: center; gap: 7px; }
.scard .who b { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .txt { font-size: 12.8px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scard.add { align-items: center; justify-content: center; color: var(--accent-deep); border-style: dashed; border-color: var(--line-strong); background: transparent; font-weight: 700; font-size: 13px; gap: 6px; cursor: pointer; }
.scard.add svg { width: 26px; height: 26px; }

/* empty state */
.empty { text-align: center; padding: 42px 20px; color: var(--ink-soft); }
.empty .em-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-content: center; background: var(--surface-2); color: var(--accent); }
.empty .em-ic svg { width: 30px; height: 30px; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 5px; }
.empty p { font-size: 13.5px; max-width: 280px; margin: 0 auto; }

/* stepper (intro state) */
.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0; }
.stepper .st { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-faint); }
.stepper .st .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-content: center; background: var(--surface); }
.stepper .st.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper .st.done { color: var(--ok); }
.stepper .st.cur .dot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.stepper .st.cur { color: var(--accent-deep); }
.stepper .ln { flex: 1; height: 2px; background: var(--line-strong); margin: 0 6px; border-radius: 2px; }
.stepper .ln.done { background: var(--ok); }

/* divider label */
.divlabel { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 12px; font-weight: 700; margin: 18px 2px 10px; }
.divlabel::before, .divlabel::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ============================================================
   Modal / Bottom sheet
   ============================================================ */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(40, 30, 16, 0.42); backdrop-filter: blur(2px); opacity: 0; animation: fade 0.2s forwards; }
@keyframes fade { to { opacity: 1; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: var(--maxw); margin: 0 auto;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg); padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow-y: auto; animation: sheetIn 0.32s var(--ease);
}
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
.sheet .grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: 8px auto 14px; }
.sheet h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.sheet .sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 16px; }
@media (min-width: 640px) {
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: var(--r-xl); animation: dlgIn 0.28s var(--ease); }
  @keyframes dlgIn { from { opacity: 0; transform: translateY(-46%) scale(0.97); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
}

/* toast */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: var(--pill); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn 0.3s var(--ease); max-width: 88vw; display: flex; align-items: center; gap: 8px; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* kind picker */
.kindgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.kindopt { display: flex; flex-direction: column; gap: 4px; padding: 13px; border-radius: var(--r); border: 1.5px solid var(--line-strong); background: var(--surface); text-align: left; transition: 0.16s; }
.kindopt b { font-size: 14px; font-weight: 800; }
.kindopt span { font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; }
.kindopt.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-glow); }
.kindopt.sel span { color: var(--accent-ink); }

/* auth */
.auth-wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px 22px calc(40px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand svg { width: 64px; height: 64px; filter: drop-shadow(var(--shadow)); }
.auth-brand h1 { font-size: 27px; font-weight: 800; margin-top: 12px; letter-spacing: 0.02em; }
.auth-brand p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.auth-card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 22px; }
.invite-note { display: flex; gap: 9px; align-items: flex-start; background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r); padding: 11px 13px; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.invite-note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.linklike { color: var(--accent-deep); font-weight: 700; }
.spinner-inline { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }

/* misc utility */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hide { display: none !important; }
.pretty-scroll { scrollbar-width: thin; }
.section-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.section-card > .hd { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.section-card > .bd { padding: 6px 16px 10px; }

.toggle { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--line-strong); transition: 0.2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.2s var(--ease); box-shadow: var(--shadow-sm); }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); }

.copybox { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-strong); font-weight: 800; font-size: 18px; letter-spacing: 0.08em; justify-content: space-between; }
.copybox .code { color: var(--accent-deep); }

/* ---- つながり / みんなの応援帳 / 会員プラン ---- */
.chip-link { background: var(--highlight-soft); border: 1px solid var(--highlight); border-radius: var(--r); padding: 11px 13px; }
.conn-chip { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border-radius: var(--pill); padding: 4px 11px 4px 4px; }

/* トグルスイッチ */
.toggle {
  flex: none; width: 46px; height: 27px; border-radius: 999px; padding: 3px;
  background: var(--line-strong); transition: background 0.2s; position: relative;
}
.toggle .knob {
  display: block; width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease);
}
.toggle.on { background: var(--accent); }
.toggle.on .knob { transform: translateX(19px); }

/* プラン特典リスト */
.planlist { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.planlist li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.planlist li svg { flex: none; color: var(--accent-deep); margin-top: 1px; }
.center-text { text-align: center; }

/* ホーム画面に追加 */
.install-cta { background: var(--highlight-soft); border: 1px solid var(--highlight); border-radius: var(--r); padding: 13px 14px; }
.install-cta .ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-content: center; color: #fff; background: linear-gradient(150deg, var(--accent), var(--accent-deep)); }
.ios-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ios-steps li { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.ios-steps .num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-content: center; }

/* 招待QR (白地＋余白で読み取り安定・ダークでも白固定) */
.qr-box { background: #fff; border-radius: 14px; padding: 14px; width: 220px; max-width: 72%; margin: 2px auto 0; box-shadow: var(--shadow-sm); }
.qr-box svg { display: block; width: 100%; height: auto; }
