:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #20252b;
  background: #ededed;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible {
  outline: 2px solid #971bb5;
  outline-offset: 3px;
}
.app {
  max-width: 500px;
  margin: auto;
  background: white;
  min-height: 100vh;
}
header {
  height: 64px;
  padding: 0 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}
header h1 {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
}
header .back {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}
header .edit {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
h1 {
  font-size: 21px;
  color: #000;
  margin: 0;
  font-weight: 600;
}
.demo-tag {
  font-size: 10px;
  color: #9821b5;
  border: 1px solid #9821b5;
  border-radius: 3px;
  padding: 2px 4px;
  vertical-align: middle;
}
.back {
  font-size: 37px;
  color: #111;
  border: 0;
  background: none;
  line-height: 1;
  width: 50px;
  text-align: left;
}
.edit {
  font-size: 13px;
  border: 0;
  background: none;
  color: #418ce9;
  padding: 8px 0;
}
.subnav {
  position: relative;
  text-align: center;
  padding: 14px;
  font-size: 20px;
  border-bottom: 1px solid #eee;
}
.subnav button {
  position: absolute;
  right: 16px;
  top: 17px;
  color: #418ce9;
  background: none;
  border: 0;
  font-size: 14px;
}
.code-section {
  text-align: center;
  background: #f8f8f8;
  padding: 10px 0 12px;
}
.clock {
  font-size: 29px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  margin: 0 0 7px;
}
.pattern {
  width: 60%;
  margin: auto;
  aspect-ratio: 1;
  overflow: hidden;
}
.pattern svg {
  display: block;
  width: 100%;
  height: auto;
}
.code-caption {
  font-size: 18px;
  margin: 10px 0 0;
}
.demo-note {
  font-size: 10px;
  color: #9a289d;
  margin: 6px 0 0;
}
.details {
  padding: 16px 16px 21px;
}
h2 {
  font-size: 19px;
  font-weight: 400;
  margin: 0 0 9px;
}
.profile-content {
  position: relative;
}
dl {
  margin: 0;
}
dl > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0;
  min-height: 29px;
  align-items: start;
  padding: 3px 0;
  font-size: 16px;
  line-height: 1.45;
}
dt {
  color: #969aa2;
  white-space: nowrap;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.details dl > div:nth-child(-n + 6) {
  padding-right: 33%;
}
.portrait {
  position: absolute;
  right: 0;
  top: 0;
  width: 32%;
  aspect-ratio: 3/4;
  background: #e9f6ff;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: #649cba;
  display: grid;
  place-items: center;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait span {
  font-size: 29px;
}
.portrait small {
  display: block;
  font-size: 12px;
}
.access {
  padding: 18px 16px 12px;
  border-top: 1px solid #eee;
}
#field-accessTime::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 50%;
  background: #4bc2c6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8 2.5 2.5L12 5' fill='none' stroke='white' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.instructions {
  padding: 10px 8px 5px;
  background: #f8f8f8;
}
.instructions h2 {
  font-size: 17px;
  margin: 0;
}
.instructions p {
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}
.instructions .purple-note {
  color: #a01cbd;
}
.actions {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}
.actions button {
  background: #4bc2c6;
  color: white;
  border: 0;
  border-radius: 2px;
  padding: 14px;
  font-size: 19px;
}
footer {
  padding: 14px;
  text-align: center;
  font-size: 11px;
  color: #999;
}
footer button {
  font-size: 12px;
  background: none;
  color: #6b9298;
  border: 0;
  margin: 0 6px;
}
dialog {
  border: 0;
  border-radius: 14px;
  width: calc(100% - 24px);
  max-width: 440px;
  padding: 23px;
  max-height: 90dvh;
  overflow: auto;
  color: #20252b;
}
dialog::backdrop {
  background: #0006;
}
.modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title h2 {
  font-size: 21px;
}
.close {
  border: 0;
  background: none;
  font-size: 28px;
  color: #888;
}
.muted {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
}
form label {
  display: block;
  margin-top: 14px;
  font-size: 14px;
}
input:not([type="file"]) {
  display: block;
  width: 100%;
  padding: 11px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 6px;
  background: #fafafa;
  color: #20252b;
}
.upload {
  padding: 15px;
  background: #f8f3fa;
  border: 1px dashed #b782c7;
  text-align: center;
  color: #9230ac;
  border-radius: 6px;
}
.upload input {
  max-width: 100%;
  display: block;
  margin-top: 10px;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: none;
  font-size: 12px;
  color: #888;
}
.primary {
  background: #4bc2c6;
  color: white;
  border: 0;
  padding: 13px;
  width: 100%;
  border-radius: 5px;
  margin-top: 18px;
}
#formError {
  color: #b33232;
  font-size: 13px;
}
#help p {
  font-size: 14px;
  line-height: 1.8;
}
#help h3 {
  font-size: 16px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  background: #20252bef;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
}
[hidden] {
  display: none !important;
}
@media (max-width: 360px) {
  dl > div {
    grid-template-columns: 86px minmax(0, 1fr);
    font-size: 14px;
  }
  .code-caption {
    font-size: 16px;
  }
  .clock {
    font-size: 26px;
  }
}
@media (min-width: 600px) {
  .app {
    margin: 24px auto;
    box-shadow: 0 8px 35px #0001;
  }
}

.qr-image {
  display: block;
  /* The 410px demo image contains a 40px quiet zone on each side. */
  width: calc(100% * 410 / 330);
  max-width: none;
  margin: calc(-100% * 40 / 330);
  height: auto;
  image-rendering: pixelated;
}
.qr-demo-label {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #85329f;
  background: #f0e2f7;
  border: 2px solid #ae66c7;
  padding: 10px;
  margin: 10px 16px;
}

.draft-preview {
  display: block;
  width: 108px;
  height: 138px;
  object-fit: cover;
  margin: 15px auto;
  border: 1px solid #e5d9e9;
  border-radius: 6px;
}
.photo-status {
  font-size: 12px;
  line-height: 1.6;
  color: #7d3d91;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}
.photo-status:empty {
  display: none;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.profile-heading h2 {
  margin: 0;
}
