:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2733;
  background: #fff;
  --accent: #1976c9;
  --muted: #657381;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 32px 24px; }
main { width: min(100%, 420px); margin: 0 auto; }
.identity { margin-bottom: 28px; text-align: center; }
.brand { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .18em; }
.identity-note { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.brand-mark {
  display: grid; place-items: center; width: 88px; height: 88px;
  margin: 0 auto 24px; border-radius: 50%; background: #edf5fc;
  color: var(--accent); font-size: 46px; font-weight: 750;
}
h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 650; text-align: center; letter-spacing: -.025em; }
h2 { margin: 0 0 8px; font-size: 18px; font-weight: 650; }
p { overflow-wrap: anywhere; }
.screen-hint { margin: 12px auto 24px; color: var(--muted); text-align: center; }
.connection-summary { margin: 20px 0 5px; font-size: 13px; line-height: 1.5; color: #596977; }
.connection-details { margin: 0 0 24px; }
.connection-details summary { font-size: 12px; font-weight: 400; }
#notice { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: #596977; }
#permissionStep h2 { display: none; }
.step-hint { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
section { margin: 0; }
button {
  display: block; width: 100%; min-height: 50px; margin: 16px 0 0; padding: 12px 16px;
  border: 1px solid transparent; border-radius: 11px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer; overflow-wrap: anywhere;
}
button:hover:not(:disabled) { background: #1267b3; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, summary:focus-visible { outline: 3px solid #125ca0; outline-offset: 4px; }
.text-button { margin-top: 8px; color: var(--accent); background: transparent; font-size: 14px; }
.text-button:hover:not(:disabled) { background: #edf5fc; }
.secondary-button { background: #edf5fc; color: #1267b3; }
.secondary-button:hover:not(:disabled) { background: #dfeefa; }
label { display: block; margin: 0 0 7px; font-size: 14px; color: #526170; }
input {
  display: block; width: 100%; min-height: 54px; margin: 0; padding: 14px 15px;
  border: 1px solid #aab5bf; border-radius: 11px; background: #fff;
  color: inherit; font: inherit; font-size: 17px;
}
input::placeholder { color: #788694; }
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.field-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.centered { text-align: center; }
output {
  display: block; margin: 18px 0 10px; padding: 10px 0;
  color: #1d2733; font: 700 28px/1.3 ui-monospace, monospace;
  letter-spacing: .14em; text-align: center; overflow-wrap: anywhere;
}
output:empty { display: none; }
.qr-visual { margin: 0 auto 28px; width: min(100%, 256px); }
#qrCanvas { display: block; width: 100%; max-width: 100%; height: auto; background: #fff; image-rendering: pixelated; }
.qr-placeholder {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1;
  padding: 32px; border-radius: 24px; background: #f4f7fa;
  color: var(--muted); text-align: center; font-size: 14px;
}
.qr-steps { list-style: none; counter-reset: steps; padding: 0; margin: 0 0 24px; }
.qr-steps li { display: flex; align-items: flex-start; gap: 13px; margin-top: 14px; font-size: 15px; }
.qr-steps li::before {
  counter-increment: steps; content: counter(steps); flex: 0 0 24px;
  height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 13px; line-height: 24px; text-align: center; font-weight: 600;
}
.qr-steps strong { font-weight: 600; }
#methodSwitch { margin-top: 9px; }
#attemptNote { margin-top: 16px; }
#status { margin: 20px 0 0; font-size: 14px; text-align: center; }
#status:empty { display: none; }
.recovery-note { margin: 16px 0 0; padding: 14px 16px; border-radius: 11px; background: #fff4df; color: #704b12; font-size: 14px; }
.account { margin: 0 0 14px; font-weight: 600; }
#sessionsStep { margin-top: 28px; border-top: 1px solid #e7ecf0; padding-top: 20px; }
summary { cursor: pointer; color: #526170; font-size: 14px; font-weight: 600; }
#sessionsStep[open] > summary { margin-bottom: 18px; }
#sessionTarget, #sessionsStatus { font-size: 13px; }
.session-nav { display: flex; gap: 12px; }
.session-nav button { flex: 1; width: auto; }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  body { padding: 24px 20px; }
  .identity { margin-bottom: 24px; }
  h1 { font-size: 27px; }
  .qr-visual { width: min(100%, 224px); margin-bottom: 24px; }
}
@media (max-width: 340px) {
  body { padding: 20px 16px; }
  h1 { font-size: 25px; }
  .qr-visual { width: min(100%, 208px); }
}
