:root {
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: #272340;
  background: #f7f7fb;
  font-synthesis: none;
  --ink: #272340;
  --muted: #56506f;
  --line: #dedbe8;
  --purple: #4c387d;
  --panel: #262043;
  --lavender: #e0d5ff;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button:not(:disabled), select, input[type="checkbox"] { cursor: pointer; }
:focus-visible { outline: 3px solid #6955a0; outline-offset: 3px; }
.skip { position: fixed; inset: 1rem auto auto 1rem; transform: translateY(-220%); z-index: 2; background: white; padding: .55rem 1rem; }
.skip:focus { transform: none; }
.shell { width: min(100% - 3rem, 67rem); margin-inline: auto; }
.topbar, .site-footer { border-bottom: 1px solid var(--line); }
.topbar-inner, .footer-inner { display: flex; min-height: 4rem; flex-wrap: wrap; gap: .35rem 1.3rem; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: .52rem; align-items: center; font-size: 1.08rem; font-weight: 790; letter-spacing: -.035em; text-decoration: none; }
.brand-icon { display: grid; grid-template-columns: repeat(2, .31rem); gap: .15rem; padding: .34rem; background: var(--panel); border-radius: .4rem; }
.brand-icon i { width: .31rem; height: .31rem; border-radius: .08rem; background: #dfd3ff; }
.brand-icon i:last-child { background: #967bcf; }
nav { display: flex; gap: clamp(.85rem, 3vw, 1.6rem); }
nav a { text-decoration: none; font-weight: 660; color: var(--muted); font-size: .89rem; }
nav a:hover, .brand:hover { text-decoration: underline; text-underline-offset: .2em; }
.intro { padding-block: clamp(2rem, 4.85vw, 4rem) clamp(1.35rem, 3.6vw, 2.65rem); }
h1 { font-size: clamp(2.85rem, 7.55vw, 6.8rem); letter-spacing: -.085em; line-height: .95; font-weight: 820; }
h1 em { font-style: normal; color: #6a4ca3; }
.intro p { font-size: clamp(1rem, 1.8vw, 1.17rem); color: var(--muted); max-width: 35rem; margin-top: .85rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); gap: clamp(.75rem, 2.35vw, 1.45rem); align-items: start; }
.network-panel, .preview-panel { border-radius: 1.12rem; padding: clamp(1rem, 2.4vw, 1.6rem); }
.network-panel { border: 1px solid var(--line); background: #fff; }
.panel-heading, .preview-top { display: flex; align-items: center; justify-content: space-between; gap: .55rem 1rem; }
.panel-heading h2, .preview-top h2 { font-size: clamp(1.2rem, 2.55vw, 1.65rem); font-weight: 790; letter-spacing: -.037em; line-height: 1.12; }
.button { display: inline-flex; min-height: 2.47rem; align-items: center; justify-content: center; border-radius: .5rem; border: 1px solid transparent; padding: .47rem .76rem; font-size: .89rem; font-weight: 750; white-space: nowrap; }
.button:disabled { opacity: .63; }
.button-soft { background: #f1ecfb; border-color: #e0d7f1; color: #4b387a; }
.button-soft:hover { background: #e9defa; }
.button-link { color: #4c387d; background: transparent; }
.button-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.field { margin-top: .95rem; }
.field label { display: inline-block; color: #383151; font-size: .92rem; font-weight: 740; margin-bottom: .28rem; }
.field input, .field select { display: block; width: 100%; min-width: 0; height: 2.58rem; border: 1px solid #cecadb; border-radius: .47rem; background: white; color: var(--ink); padding: .43rem .62rem; font-size: .95rem; font-weight: 585; }
.field select { appearance: none; background: #fff url("./chevron.svg") no-repeat right .7rem center; padding-right: 1.65rem; }
.field input::placeholder { color: #6b637e; font-weight: 450; }
.field-help, .notice { margin-top: .3rem; color: var(--muted); font-size: .83rem; }
.notice:empty { display: none; }
.notice { color: #8c302d; font-weight: 700; }
.field input[aria-invalid="true"] { border-color: #a4463d; }
.password-control { position: relative; }
.password-control input { padding-right: 3.75rem; }
.button-reveal { position: absolute; inset: .22rem .22rem .22rem auto; min-height: 0; color: #4b387a; background: #f2ecfb; padding: .2rem .6rem; font-size: .83rem; }
.button-reveal:hover { background: #eae0f9; }
.checkbox-row { display: flex; width: fit-content; gap: .48rem; align-items: flex-start; margin-top: .95rem; cursor: pointer; }
.checkbox-row input { margin: .22rem 0 0; width: 1.01rem; height: 1.01rem; accent-color: #6a4ca3; }
.checkbox-row strong { display: block; color: #383151; font-size: .9rem; line-height: 1.3; }
.checkbox-row span span { color: var(--muted); display: block; margin-top: .11rem; font-size: .83rem; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: .4rem .9rem; margin-top: .9rem; padding-top: .68rem; border-top: 1px solid var(--line); }
.form-footer p { font-size: .85rem; color: var(--muted); }
.preview-panel { background: var(--panel); color: white; }
.preview-panel :focus-visible { outline-color: #e0d5ff; }
.preview-top span { padding: .23rem .4rem; border-radius: .36rem; border: 1px solid #7666a0; color: #e4dafa; font-size: .76rem; }
.qr-card { margin: .9rem auto; width: min(100%, 19rem); padding: .75rem .9rem .65rem; border-radius: .85rem; background: white; color: #272340; text-align: center; box-shadow: 0 .65rem 1.7rem #0e0b2280; }
.qr-card > p { color: #493c69; font-size: .86rem; font-weight: 750; }
.qr-stage { display: grid; place-items: center; margin-inline: auto; width: min(100%, 15rem); aspect-ratio: 1; }
.qr-stage canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
#qr-placeholder { padding: .75rem; color: var(--muted); border: 1px dashed #b9afcd; border-radius: .52rem; font-size: .93rem; }
#network-name { font-size: 1.05rem; font-weight: 760; color: #2a2345; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .48rem .6rem; }
.preview-footer p { max-width: 17.5rem; color: #ded4ef; font-size: .82rem; }
.button-download { color: #2a2345; background: var(--lavender); border-color: #b7a9db; }
.button-download:hover:not(:disabled) { background: #d3c4f9; }
.guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1.5rem; margin-block: 1.9rem 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.guide h2, .guide h3 { font-size: 1.04rem; font-weight: 770; }
.guide p { font-size: .94rem; color: var(--muted); margin-top: .25rem; }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.footer-inner > a:last-child { font-size: .84rem; color: var(--muted); text-underline-offset: .2em; }
@media (max-width: 46rem) {
  .shell { width: calc(100% - 2rem); }
  .workspace, .guide { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { min-width: 0; }
}
@media (max-width: 26rem) {
  .shell { width: calc(100% - 1.3rem); }
  .topbar-inner { padding-block: .45rem; }
  .qr-stage { width: min(100%, 13.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
