/* 無料で始める流れ。土台（色・字・ボタン・人の印）は /styles.css を使う */
.su-body { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.su-head { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 64px; padding-inline: var(--gut); background: rgb(var(--bg-rgb) / .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.su-steps { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.su-steps li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.su-steps li + li::before { content: ""; width: 28px; height: 1px; margin-right: 2px; background: var(--line-3); }
.su-steps i { width: 8px; height: 8px; background: var(--line-3); transition: background .3s; }
.su-steps .is-done i { background: var(--fg-2); }
.su-steps .is-on { color: var(--fg); font-weight: 700; }
.su-steps .is-on i { background: var(--sig); }
.su-head__r { justify-self: end; display: flex; align-items: center; gap: 10px; }
.su-close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--mute); }
.su-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.su-close:hover { color: var(--fg); border-color: var(--line-3); }

.su { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 340px); justify-content: center; align-items: start; gap: clamp(40px, 6vw, 88px); padding: clamp(40px, 7vh, 80px) var(--gut) 72px; }
.su-step { animation: stepIn .55s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } }
.su-step:focus, .su-h:focus { outline: none; }
.su-k { margin-bottom: 14px; font-size: 14px; font-weight: 700; color: var(--sig); }
.su-h { font-size: clamp(32px, 3.6vw, 48px); font-weight: 900; line-height: 1.16; letter-spacing: -.045em; }
.su-p { margin-top: 18px; font-size: 16px; line-height: 1.9; color: var(--fg-2); }
.su-p b { color: var(--fg); font-weight: 700; }
.su-mock { display: block; margin-top: 4px; font-size: 13px; color: var(--mute); }
.su-form { display: grid; gap: 22px; margin-top: 34px; }
.fld { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.fld__l { padding: 0; font-size: 14px; font-weight: 700; color: var(--fg-2); }
.fld input[type="email"], .fld input[type="text"] { height: 54px; padding: 0 16px; font-size: 17px; color: var(--fg); background: var(--bg-1); border: 1px solid var(--line-3); border-radius: 4px; transition: border-color .2s, box-shadow .2s; }
.fld input::placeholder { color: var(--dim); }
.fld input:focus, .code input:focus { outline: none; border-color: var(--sig); box-shadow: 0 0 0 3px rgb(var(--sig-rgb) / .22); }
.fld__hint { font-size: 13px; color: var(--mute); }
.fld__hint a { margin-left: 6px; color: var(--sig-hi); text-decoration: underline; text-underline-offset: 3px; }
.seg4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg4 label { position: relative; }
.seg4 input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg4 span { display: grid; place-items: center; height: 48px; font-size: 15px; color: var(--fg-2); background: var(--bg-1); border: 1px solid var(--line-3); border-radius: 4px; transition: background .2s, color .2s, border-color .2s; pointer-events: none; }
.seg4 input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }
.seg4 input:focus-visible + span { outline: 2px solid var(--sig); outline-offset: 2px; }
.btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn[disabled]::before { display: none; }
.btn[disabled] .arrow { animation: none !important; }
.su-terms { font-size: 13px; line-height: 1.8; color: var(--mute); }
.su-terms a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }
.su-back { justify-self: start; padding: 8px 0; font-size: 14px; color: var(--fg-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-3); }
.su-back:hover { color: var(--fg); text-decoration-color: var(--sig); }
.su-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }

/* 確認コード */
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.code input { height: 66px; min-width: 0; text-align: center; font-family: var(--mono); font-size: 28px; font-weight: 600; color: var(--fg); background: var(--bg-1); border: 1px solid var(--line-3); border-radius: 4px; transition: border-color .2s, box-shadow .2s; }

/* チャットを選ぶ・許可 */
.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; }
.pick__b { display: grid; justify-items: start; gap: 4px; padding: 20px 18px; text-align: left; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 6px; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.pick__b img { width: 36px; height: 36px; margin-bottom: 10px; object-fit: contain; }
.pick__b b { font-size: 16px; font-weight: 900; line-height: 1.35; }
.pick__b span { font-size: 13px; color: var(--fg-2); }
.pick__b:hover { border-color: var(--sig); background: var(--bg-2); transform: translateY(-2px); }
.allow { margin-top: 34px; padding: 26px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 6px; animation: stepIn .45s var(--ease) both; }
.allow__h { display: flex; align-items: center; gap: 12px; font-size: 17px; line-height: 1.6; }
.allow__h img { flex: none; }
.allow__h b { font-weight: 900; }
.allow__s { margin-top: 20px; font-size: 13px; color: var(--mute); }
.allow__l { display: grid; gap: 8px; margin-top: 10px; }
.allow__l li { position: relative; padding-left: 24px; font-size: 15px; color: var(--fg-2); }
.allow__l li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 10px; height: 5px; border: solid var(--sig); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.allow__n { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 13px; line-height: 1.8; color: var(--mute); }
.allow__a { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 22px; }
.allow__st { display: flex; align-items: center; gap: 10px; min-height: 24px; margin-top: 16px; font-size: 14px; color: var(--fg-2); }
.allow__st.is-busy::before, .tools .is-busy .tools__st::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--line-3); border-top-color: var(--sig); border-radius: 50%; animation: spin .7s linear infinite; }
.allow__st.is-done { color: var(--sig-hi); font-weight: 700; }
.allow__st.is-done::before { content: ""; width: 10px; height: 5px; margin: 0 2px 3px; border: solid var(--sig); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 道具をつなぐ */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; }
.tools button { display: grid; grid-template-columns: 26px 1fr auto; grid-template-areas: "i b s" "i e s"; align-items: center; column-gap: 12px; width: 100%; min-height: 62px; padding: 12px 16px; text-align: left; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 6px; transition: border-color .25s, background .25s; }
.tools button:hover { border-color: var(--line-3); background: var(--bg-2); }
.tools img { grid-area: i; width: 26px; height: 26px; object-fit: contain; }
.tools b { grid-area: b; font-size: 15px; font-weight: 700; line-height: 1.4; }
.tools em { grid-area: e; font-style: normal; font-size: 12px; color: var(--sig-hi); line-height: 1.4; }
.tools button:not(:has(em)) b { grid-row: 1 / 3; }
.tools__st { grid-area: s; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); white-space: nowrap; }
.tools .is-done { border-color: var(--sig); }
.tools .is-done .tools__st { color: var(--sig-hi); font-weight: 700; }

/* 最初のあいさつ */
.dm { --main: #fff; --text: #1d1c1d; --strong: #1d1c1d; --muted: #616061; --rule: #e6e6e6; --chip: #ececec; --chip-text: #5a5a5a; margin-top: 30px; background: var(--main); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; color: var(--text); font-size: 14px; box-shadow: var(--shadow); }
.dm__head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--rule); }
.dm__head b { font-weight: 900; color: var(--strong); }
.dm__log { display: grid; gap: 4px; min-height: 150px; padding: 12px 0 4px; }
.dm__log .m { animation: stepIn .45s var(--ease) both; }
.dm__typing { min-height: 18px; padding: 0 20px 6px; font-size: 11px; color: var(--muted); }
.dm__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 18px 18px; animation: stepIn .45s var(--ease) both; }
.dm__chips span { padding: 6px 14px; font-size: 13px; color: var(--strong); border: 1px solid var(--line-3); border-radius: 999px; }
.dm--teams { --main: #f5f5f5; background: var(--main); }
.dm--teams .m { margin: 4px 16px; padding: 10px 12px; border-radius: 6px; background: var(--msg, #fff); box-shadow: var(--msg-shadow, 0 1px 2px rgb(0 0 0 / .06)); }
.dm--teams .av, .dm--round .av { border-radius: 50%; }
.su-toast { margin-top: 14px; font-size: 14px; color: var(--sig-hi); }

/* 右: あなたのいとなす */
.su__side { position: sticky; top: 100px; }
.card-sum { padding: 24px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 6px; }
.card-sum__h { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; }
.card-sum__h .av { width: 44px; height: 44px; border-radius: 9px; }
.card-sum__h span:last-child { display: grid; }
.card-sum__h b { font-size: 16px; font-weight: 900; }
.card-sum__h small { font-size: 13px; color: var(--mute); }
.card-sum__l div { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.card-sum__l dt { color: var(--mute); }
.card-sum__l dd { color: var(--fg); font-weight: 500; }
.card-sum__n { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 12px; line-height: 1.8; color: var(--mute); }

.su-mockbar { justify-self: center; max-width: calc(100% - 32px); margin: 0 0 max(24px, env(safe-area-inset-bottom)); padding: 7px 16px; font-size: 12px; color: var(--mute); text-align: center; border: 1px solid var(--line-2); border-radius: 999px; }

@media (max-width: 900px) {
  .su { grid-template-columns: minmax(0, 1fr); padding-bottom: 48px; }
  .su__side { position: static; }
}
@media (max-width: 640px) {
  .su-head { grid-template-columns: auto 1fr auto; }
  .su-steps { justify-content: center; gap: 4px; }
  .su-steps span { display: none; }
  .su-steps .is-on span { display: inline; }
  .su-steps li + li::before { width: 12px; }
  .seg4 { grid-template-columns: 1fr 1fr; }
  .pick { grid-template-columns: 1fr 1fr; }
  .tools { grid-template-columns: 1fr; }
  .code { gap: 6px; }
  .code input { height: 56px; font-size: 22px; }
  .su-row .btn, .allow__a .btn { width: 100%; }
  .su-row .btn__t, .allow__a .btn__t { flex: 1; justify-content: center; }
  .su-mockbar { margin-inline: 16px; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .su-step, .allow, .dm__log .m, .dm__chips { animation: none; }
}
