/* StillQR — one stylesheet, system fonts, light and dark, no animations. */
:root {
  --bg: #f6f7f5;
  --card: #ffffff;
  --ink: #121614;
  --muted: #5b6460;
  --line: #e1e6e3;
  --line-strong: #c9d1cd;
  --field: #ffffff;
  --accent: #0f6e4f;
  --accent-hover: #0c5c42;
  --accent-soft: #e3f2ec;
  --accent-ink: #ffffff;
  --ok: #0f7b46;
  --warn-bg: #fff4e0;
  --warn-ink: #7a4500;
  --shadow: 0 1px 2px rgb(16 24 20 / 0.05), 0 8px 28px rgb(16 24 20 / 0.06);
  --radius: 20px;
  --check: #e9ecea;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1211;
    --card: #171b1a;
    --ink: #edf1ef;
    --muted: #9ba6a1;
    --line: #29302d;
    --line-strong: #3a423f;
    --field: #111514;
    --accent: #2fa57b;
    --accent-hover: #39b98a;
    --accent-soft: #15302a;
    --accent-ink: #04120d;
    --ok: #4cc893;
    --warn-bg: #3a2a10;
    --warn-ink: #ffd39a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 28px rgb(0 0 0 / 0.25);
    --check: #252b29;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1211;
  --card: #171b1a;
  --ink: #edf1ef;
  --muted: #9ba6a1;
  --line: #29302d;
  --line-strong: #3a423f;
  --field: #111514;
  --accent: #2fa57b;
  --accent-hover: #39b98a;
  --accent-soft: #15302a;
  --accent-ink: #04120d;
  --ok: #4cc893;
  --warn-bg: #3a2a10;
  --warn-ink: #ffd39a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 28px rgb(0 0 0 / 0.25);
  --check: #252b29;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(30px, 5.2vw, 50px);
  font-weight: 780;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 720;
}
h3 {
  font-size: 17px;
  font-weight: 680;
}
p {
  margin: 0 0 1em;
}
img,
svg {
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.narrow {
  max-width: 760px;
}
.ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* header */
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 720;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.langs {
  position: relative;
}
.langs summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.langs summary::-webkit-details-marker {
  display: none;
}
.langs summary:hover,
.langs[open] summary {
  background: var(--card);
  color: var(--ink);
}
.langs ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 170px;
  z-index: 5;
}
.langs a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
}
.langs a:hover {
  background: var(--bg);
}
.langs a[aria-current] {
  font-weight: 700;
  color: var(--accent);
}

/* hero */
.hero {
  padding-top: clamp(12px, 3vw, 36px);
  padding-bottom: clamp(16px, 2.5vw, 28px);
  text-align: center;
}
.hero h1 {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
}

/* the generator */
.tool {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  scroll-margin-top: 8px;
}
.kinds {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 10px;
  margin: 0 -2px;
}
.kinds::-webkit-scrollbar {
  display: none;
}
.kind {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.kind:hover {
  border-color: var(--line-strong);
}
.kind[aria-current='page'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.tool-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
/* phone: the fields, then the code, then the style; computer: fields and style on the left, the code beside them */
@media (min-width: 880px) {
  .tool-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: auto 1fr;
    align-items: start;
  }
  .fields {
    grid-column: 1;
    grid-row: 1;
  }
  .styling {
    grid-column: 1;
    grid-row: 2;
  }
  .result {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 16px;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}
.grid2 {
  display: grid;
  gap: 14px 12px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 560px) {
  .grid2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .grid2 > :not(.half) {
    grid-column: 1 / -1;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > span,
.row-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field);
  font-size: 17px;
}
.field textarea {
  resize: vertical;
  min-height: 108px;
  line-height: 1.45;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  min-height: 48px;
  font-weight: 500;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
details > summary {
  cursor: pointer;
}
.more-fields {
  grid-column: 1 / -1;
}
.more-fields > summary,
.ecc > summary {
  font-weight: 600;
  color: var(--accent);
  padding: 6px 0;
}
.more-fields .grid2 {
  margin-top: 10px;
}
.styling {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
@media (min-width: 560px) {
  .row {
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
  }
  .logo-row {
    align-items: start;
  }
  .logo-row .row-label {
    padding-top: 12px;
  }
}
.sws {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sw {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  padding: 0;
  background: var(--sw, #fff);
}
.sw[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--accent);
}
.sw-clear,
.preview.is-clear {
  background-color: #fff;
  background-image: conic-gradient(#d9dedb 25%, transparent 0 50%, #d9dedb 0 75%, transparent 0);
  background-size: 12px 12px;
}
.sw-pick {
  background: conic-gradient(#f43 0, #fb3 60deg, #3c6 120deg, #3bf 180deg, #63f 240deg, #f3b 300deg, #f43 360deg);
  cursor: pointer;
}
.sw-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.shapes {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  max-width: 360px;
}
.shape {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--muted);
}
.shape svg {
  flex: none;
}
.shape[aria-pressed='true'] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}
.logo-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px;
  margin: -10px;
  border-radius: 14px;
  border: 1.5px dashed transparent;
}
.logo-box.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.logo-set {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-set[hidden],
.add-logo[hidden] {
  display: none;
}
.logo-set img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px;
}
.hint {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.ecc .field {
  margin: 8px 0;
  max-width: 360px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover:not(:disabled) {
  border-color: var(--ink);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  padding: 12px 22px;
}
.btn.primary:hover {
  background: var(--accent-hover);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* result */
.preview {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  max-width: 340px;
  margin: 0 auto;
}
.preview img {
  width: 100%;
  height: 100%;
  max-width: 100%;
}
.example-tag {
  display: none;
}
.preview.is-example img {
  opacity: 0.22;
}
.preview.is-example .example-tag {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #26302c;
  font-weight: 650;
  font-size: 15px;
}
.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 14px;
  font-size: 14.5px;
  font-weight: 600;
}
.status[hidden] {
  display: none;
}
.status.ok {
  color: var(--ok);
}
.status.ok::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.3 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.3 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.status.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 10px 12px;
  border-radius: 12px;
}
.fixes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fixes button {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 9px;
  padding: 5px 10px;
  font-weight: 650;
  font-size: 14px;
}
.details {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  min-height: 1.4em;
}
.dls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  text-align: left;
}
.dl span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.dl b {
  font-size: 16px;
}
.dl small {
  font-size: 12px;
  color: var(--muted);
}
.dl:first-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.dl:first-child small {
  color: inherit;
  opacity: 0.8;
}
.dl:hover:not(:disabled) {
  border-color: var(--ink);
}
.dl:first-child:hover:not(:disabled) {
  background: var(--accent-hover);
}
.dl:disabled,
.more-actions .btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.more-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.more-actions .btn {
  border-color: var(--line);
  padding: 9px 10px;
  font-size: 14.5px;
  line-height: 1.2;
  min-width: 0;
}
.private {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.private .ico {
  width: 18px;
  height: 18px;
  color: var(--ok);
}

/* below the tool */
.why,
.how,
.faq,
.guides {
  padding-top: clamp(40px, 6vw, 72px);
}
.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.why-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.why-list .ico {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: 12px;
}
.why-list p {
  color: var(--muted);
  margin: 0;
  font-size: 15.5px;
}
.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.steps li {
  counter-increment: s;
  position: relative;
  padding: 18px 18px 18px 62px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}
.faq {
  max-width: 820px;
}
.qa {
  border-bottom: 1px solid var(--line);
}
.qa summary {
  list-style: none;
  position: relative;
  padding: 18px 36px 18px 0;
  font-weight: 650;
  font-size: 17px;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 24px;
  font-weight: 400;
  color: var(--muted);
}
.qa[open] summary::after {
  content: '−';
}
.qa p {
  color: var(--muted);
  margin: -4px 0 18px;
}
.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.guide-list a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.guide-list a:hover {
  border-color: var(--line-strong);
}
.guide-list b {
  font-size: 17px;
}
.guide-list span {
  color: var(--muted);
  font-size: 15px;
}

/* text pages */
.text {
  padding-top: clamp(16px, 4vw, 48px);
}
.text h1 {
  font-size: clamp(30px, 4.6vw, 44px);
}
.text h2 {
  margin-top: 1.6em;
}
.lead {
  font-size: 19px;
  color: var(--muted);
}
.text ul,
.text ol {
  padding-left: 1.3em;
}
.text li {
  margin-bottom: 0.5em;
}
.table {
  overflow-x: auto;
  margin: 1.2em 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
thead th {
  font-weight: 700;
}
tbody th {
  font-weight: 600;
  color: var(--muted);
}
.cta {
  margin-top: 2em;
}
.nf {
  text-align: center;
  padding-top: 12vh;
  padding-bottom: 12vh;
}

/* footer */
.foot {
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  font-size: 15px;
}
.foot-in {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.foot h2 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0;
}
.foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.foot li {
  margin: 0 0 8px;
}
.foot a {
  color: var(--ink);
  text-decoration: none;
}
.foot a:hover {
  text-decoration: underline;
}
.fine {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

#print {
  display: none;
}
@media print {
  body > *:not(#print) {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  #print {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 15mm;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  }
  #print img {
    width: 110mm;
    height: 110mm;
  }
  #print h1 {
    font-size: 30pt;
    margin: 0 0 6mm;
  }
  #print p {
    font-size: 16pt;
    margin: 2mm 0;
    word-break: break-all;
  }
  #print .scan {
    margin-top: 6mm;
    font-size: 13pt;
    color: #444;
  }
}

/* the editor of editable codes (v1.1, /edit) */
.edit-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  margin: 12px 0 8px;
}
@media (min-width: 680px) {
  .edit-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}
.edit-grid > * {
  min-width: 0;
}
.edit-grid .preview {
  width: 100%;
  margin: 0;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  word-break: break-all;
}
.saved {
  color: var(--ok);
  font-weight: 600;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.bars span {
  flex: 1;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.copyline {
  display: flex;
  gap: 8px;
}
.copyline input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field);
}

.sw[data-fg="#000000"]{background:#000000}
.sw[data-fg="#1d2b4f"]{background:#1d2b4f}
.sw[data-fg="#0b5cad"]{background:#0b5cad}
.sw[data-fg="#0f6e4f"]{background:#0f6e4f}
.sw[data-fg="#8a1c2b"]{background:#8a1c2b}
.sw[data-fg="#4b2a7b"]{background:#4b2a7b}
.sw[data-bg="#ffffff"]{background:#ffffff}
.sw[data-bg="#fbf6ec"]{background:#fbf6ec}
.sw[data-bg="#eef5ff"]{background:#eef5ff}
