:root {
  color-scheme: light dark;
  --bg: #f5f7f5; --card: #fff; --text: #17261f; --muted: #56645b;
  --accent: #2f5d50; --on-accent: #fff; --line: #d1d9d3; --soft: #f2f6f3;
  --danger: #a42d26; --focus: #2f5d50;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1511; --card: #17221c; --text: #f2f5f1; --muted: #aab8ae; --accent: #92c6af; --on-accent: #10291e; --line: #46594c; --soft: #202e25; --danger: #ffaaa1; --focus: #a8dac4; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
body:lang(ja) { word-break: normal; }
main { width: min(100%, 496px); margin: 0 auto; padding: max(32px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.brand { width: 150px; height: auto; display: block; }
.language-select { min-height: 44px; max-width: 124px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); font: inherit; font-size: 14px; }
.steps { list-style: none; display: flex; justify-content: space-between; gap: 8px; padding: 0 4px; margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li > span:first-child { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; font-variant-numeric: tabular-nums; }
.steps [aria-current="step"] { color: var(--accent); font-weight: 650; }
.steps [aria-current="step"] > span:first-child { border-color: var(--accent); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
h1 { font-size: 25px; line-height: 1.4; letter-spacing: -.025em; margin: 0 0 10px; text-wrap: balance; }
p { margin: 0; }
.intro { margin-bottom: 24px; }
.muted, .field-help { color: var(--muted); }
.field-help { display: block; font-size: 13px; line-height: 1.65; margin-top: 8px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
input[type=email],input[type=text] { display: block; width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); color: var(--text); font: inherit; }
input[aria-invalid=true] { border-color: var(--danger); }
input:disabled { color: var(--muted); }
button,a,summary,select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; font: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
.button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 13px 16px; border-radius: 12px; border: 1px solid transparent; font-size: 16px; font-weight: 650; line-height: 1.5; text-align: center; text-decoration: none; }
.primary { background: var(--accent); color: var(--on-accent); }
.secondary,.provider { background: transparent; color: var(--text); border-color: var(--line); }
.providers { display: grid; gap: 12px; }
.providers .field-help { margin: -4px 0 4px; text-align: center; }
.provider { border-color: var(--muted); }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; }
button:disabled { cursor: default; opacity: .55; }
button[aria-busy=true] { opacity: 1; }
button[aria-busy=true]::before { content: ""; width: 16px; height: 16px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button[aria-busy=true]::before { animation: none; } }
:where(button,a,input,select,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1:focus { outline: none; }
@media (hover: hover) { .button:not(:disabled):hover { filter: brightness(.93); } .text-button:not(:disabled):hover,a:hover { text-decoration: underline; } }
.button:not(:disabled):active { transform: translateY(1px); }
#send,#verify { margin-top: 24px; }
.divider { display: flex; gap: 14px; align-items: center; margin: 22px 0; color: var(--muted); font-size: 13px; }
.divider::before,.divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.recipient { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.recipient bdi { min-width: 0; font-size: 14px; }
.recipient button { flex-shrink: 0; }
input.code { text-align: center; font-size: 26px; font-weight: 600; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.resend-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin-top: 12px; font-size: 13px; }
.notice { margin-bottom: 20px; padding: 12px 14px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 14px; }
.error { font-size: 14px; color: var(--danger); margin: 10px 0; }
#retry { margin-top: 16px; }
.destination { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; background: var(--soft); border-radius: 12px; font-size: 14px; }
.destination strong { font-size: 16px; }
.destination #host { grid-column: 1/-1; margin: 0; }
.permissions { margin: 24px 0 18px; }
.permissions dt { font-weight: 650; font-size: 14px; }
.permissions dd { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.choice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 20px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.choice strong { font-weight: 600; }
.choice .field-help { margin-top: 3px; }
.disclosure { font-size: 14px; margin: 20px 0; }
.disclosure p + p { margin-top: 12px; }
.actions { display: grid; gap: 5px; }
.retention { text-align: center; }
.client-details { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.client-details a { display: inline-flex; min-height: 44px; align-items: center; }
.connection { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 18px; }
.connection .text-button { color: var(--danger); margin-top: 6px; }
.page-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 4px 0; }
.page-footer > a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); }
.account { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 10px; }
.account bdi { min-width: 0; }
#returning .field-help { margin-top: 16px; }
#invalid .button { margin-top: 24px; }
[hidden] { display: none !important; }
@media (max-width: 380px) { main { padding-left: 16px; padding-right: 16px; } .panel { padding: 22px 18px; } h1 { font-size: 23px; } .brand { width: 136px; } }
