:root {
  --ink: #1e3036;
  --blue: #205b60;
  --line: #dddcd0;
  --muted: #5b6a6b;
  --paper: #f7f6ef;
  --white: #fffef9;
  font: 16px/1.6 "DM Sans","Microsoft YaHei","PingFang SC",sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,input,textarea,select {
  font: inherit;
}

button,.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 600;
}

button:hover,.button:hover {
  filter: brightness(.91);
  text-decoration: none;
}

button:focus-visible,a:focus-visible,summary:focus-visible {
  outline: 3px solid #c78d3e;
  outline-offset: 3px;
}

.quiet {
  background: transparent;
  color: var(--blue);
  border-color: #c5ccc2;
}

.primary {
  justify-content: space-between;
  min-height: 48px;
}

.primary span {
  font-size: 1.25rem;
}

.top {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.bar {
  max-width: 1216px;
  min-height: 74px;
  padding: 12px 36px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: .06em;
  color: var(--ink);
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand span {
  font-size: .77rem;
  font-weight: 450;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
  margin-left: 4px;
}

.mark {
  height: 27px;
  width: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  background: var(--blue);
  border-radius: 8px;
  transform: rotate(-6deg);
}

.mark b {
  width: 4px;
  height: 13px;
  background: #f9edc9;
  transform: skew(-20deg);
  border-radius: 4px;
}

.mark b:nth-child(2) {
  height: 19px;
}

.mark b:nth-child(3) {
  height: 9px;
}

.topnote {
  color: var(--muted);
  font-size: .8rem;
}

.topnote i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #689282;
  border-radius: 50%;
  margin-right: 4px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: .92rem;
}

nav a {
  color: var(--muted);
}

nav a[aria-current] {
  color: var(--blue);
  font-weight: 750;
}

main {
  max-width: 1160px;
  padding: 32px 30px 72px;
  margin: auto;
}

h1,h2,h3,p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem,4vw,2.65rem);
  line-height: 1.22;
  letter-spacing: -.04em;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.32rem;
  line-height: 1.4;
  margin-bottom: 16px;
}

h3 {
  margin-bottom: 8px;
}

.sub,.muted,small,time,.crumb {
  color: var(--muted);
}

small,time {
  font-size: .8rem;
}

.sub {
  margin: 6px 0 25px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  max-width: 930px;
  margin: clamp(16px,6vh,76px) auto 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 18px 48px #263c3710;
}

.auth-form {
  padding: clamp(28px,4.1vw,60px);
}

.auth-form h1 {
  font-size: 2rem;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 25px;
  margin-bottom: 28px;
}

.tabs a {
  color: var(--muted);
  padding: 0 2px 9px;
}

.tabs .active {
  border-bottom: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 700;
}

.art {
  isolation: isolate;
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: radial-gradient(ellipse at 27% 25%,#467d7b,#214f55 59%,#153d43);
}

.orbit {
  position: absolute;
  width: 165%;
  aspect-ratio: 1;
  border: 1px solid #d9edd438;
  border-radius: 50%;
}

.orbit-a {
  left: -50%;
  top: 8%;
  box-shadow: 0 0 0 20px #a8d8c511,0 0 0 42px #a8d8c510,0 0 0 66px #a8d8c50e;
}

.orbit-b {
  left: -115%;
  top: -59%;
  width: 200%;
  box-shadow: 0 0 0 35px #d9edd41b,0 0 0 62px #d9edd416;
}

.paper {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 56%;
  aspect-ratio: 1.48;
  border-radius: 13px;
}

.p-back {
  background: linear-gradient(145deg,#a6c7b0,#709c90);
  transform: translate(-45%,-59%) rotate(17deg);
  border: 1px solid #b5caba;
}

.p-front {
  overflow: hidden;
  background: linear-gradient(135deg,#efe1b3,#f5eccf 54%,#dcc491);
  transform: translate(-58%,-39%) rotate(-13deg);
  box-shadow: 0 13px 24px #163d454d;
}

.paper-bands {
  position: absolute;
  top: 23%;
  left: -15%;
  height: 160%;
  width: 140%;
  border-radius: 48%;
  border: 1px solid #bc9c64;
  box-shadow: 0 0 0 5px #e3cfa3,0 0 0 6px #bda571,0 0 0 13px #e5d5ac,0 0 0 14px #c1ad7d,0 0 0 22px #e9d9b0,0 0 0 23px #c5b285;
  transform: rotate(-28deg);
}

.seal {
  position: absolute;
  right: 14%;
  top: 16%;
  width: 20%;
  aspect-ratio: 1;
  border: 1px solid #bcaa78;
  border-radius: 50%;
  background: repeating-linear-gradient(48deg,#beab79 0 1px,transparent 1px 4px);
}

.art-line {
  position: absolute;
  left: 11%;
  right: 11%;
  bottom: 17%;
  height: 1px;
  background: #d3ddc659;
}

.art-name {
  position: absolute;
  bottom: 8%;
  left: 11%;
  color: #e3ebd7;
  letter-spacing: .28em;
  font: 1.4rem Georgia,serif;
}

.stack,label {
  display: grid;
  gap: 7px;
}

.stack {
  gap: 16px;
}

.stack>button {
  justify-self: start;
}

.auth-form .stack>button {
  justify-self: stretch;
}

label {
  font-weight: 600;
  font-size: .9rem;
}

label small {
  font-weight: 400;
}

input,textarea,select {
  border: 1px solid #c7cfc7;
  border-radius: 7px;
  width: 100%;
  padding: 9px 12px;
  background: #fffefa;
  color: var(--ink);
}

input:focus,textarea:focus,select:focus {
  outline: 2px solid #487e7c;
  outline-offset: 1px;
}

input::placeholder,textarea::placeholder {
  color: #77837e;
}

textarea {
  resize: vertical;
}

label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 400;
}

input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.caution {
  margin: 0;
  border-left: 3px solid #aa803d;
  padding: 8px 12px;
  background: #f7f0db;
  color: #705429;
  font-size: .86rem;
}

.captcha {
  max-width: 100%;
  border-radius: 8px;
}

.back,.crumb {
  display: inline-block;
  margin-top: 15px;
}

.heading,.row,.purchase,.identity,.controls,.order-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.heading,.row,.purchase,.order-row {
  justify-content: space-between;
}

.heading {
  margin: 22px 0;
}

.heading h1,.heading h2,.identity p {
  margin: 0;
}

.heading>a {
  font-size: .9rem;
}

.box,.entry,.rows,.empty {
  background: var(--white);
}

.box,.rows,.empty {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.box,.empty {
  padding: 24px;
}

.box {
  margin-bottom: 16px;
  min-width: 0;
}

.cards,.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(300px,100%),1fr));
  gap: 16px;
}

.cols {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.cards .box,.cols .box {
  margin: 0;
}

.cols+.box,.box+.cols {
  margin-top: 16px;
}

.product {
  display: flex;
  flex-direction: column;
}

.product-mark {
  width: 34px;
  height: 10px;
  background: repeating-linear-gradient(120deg,#6e9690 0 3px,transparent 3px 6px);
  margin-bottom: 18px;
}

.purchase {
  margin-top: auto;
  padding-top: 12px;
}

.purchase strong {
  font-size: 1.25rem;
}

.entry,.row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.entry code,.entry small,.entry time {
  display: block;
}

.order-row {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.order-row:last-child {
  border: 0;
}

.order-row div {
  margin-right: auto;
}

.order-row small {
  display: block;
}

.status {
  display: inline-block;
  border-radius: 5px;
  padding: 2px 8px;
  background: #eaece5;
  color: #41524e;
  font-size: .8rem;
  white-space: nowrap;
}

.s-pay,.s-review,.s-new {
  background: #f5ebcd;
  color: #765324;
}

.s-paid,.s-delivered {
  background: #dcebe4;
  color: #285547;
}

.controls {
  flex-wrap: wrap;
  margin: 12px 0;
}

.controls button {
  font-size: .9rem;
}

.copy,.bubble {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inline {
  display: inline;
}

.secret,code {
  font-family: "IBM Plex Mono",Consolas,monospace;
  overflow-wrap: anywhere;
}

.secret-input {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  margin-top: -9px;
}

.identity img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #dde7dd;
}

.identity p {
  color: var(--muted);
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 9px 18px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.qr {
  display: block;
  width: min(230px,100%);
  height: auto;
}

summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 600;
}

details[open]>summary {
  margin-bottom: 12px;
}

.flash {
  padding: 12px 15px;
  background: #e0ede4;
  border-radius: 6px;
}

.flash.error {
  color: #763d29;
  background: #f6e6d8;
}

.narrow {
  max-width: 550px;
  margin: 60px auto;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(156px,28%) 1fr;
  gap: 16px;
}

.thread {
  display: block;
  padding: 10px;
  border-radius: 6px;
}

.selected {
  background: #e5eee5;
}

.history {
  height: 330px;
  overflow: auto;
  padding: 8px 4px;
}

.message {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 14px;
}

.mine {
  align-items: flex-end;
}

.bubble {
  background: #ecefe8;
  border-radius: 8px;
  padding: 8px 12px;
  max-width: 86%;
}

.mine .bubble {
  background: #d9e9df;
}

.bubble a {
  display: block;
}

.chat .stack {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

@media (max-width:720px) {
  .bar {
    padding: 12px 18px;
    min-height: 60px;
    gap: 9px;
    flex-wrap: wrap;
  }

  nav {
    gap: 12px;
    font-size: .85rem;
  }

  main {
    padding: 18px 15px 50px;
  }

  .auth-layout {
    margin: 6px auto;
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .art {
    min-height: 115px;
  }

  .paper {
    width: 110px;
    left: 72%;
    top: 45%;
  }

  .art-name {
    bottom: 32%;
    left: 8%;
  }

  .art-line {
    left: 8%;
    right: 56%;
    bottom: 24%;
  }

  .auth-form {
    padding: 23px;
  }

  .tabs {
    margin-bottom: 18px;
  }

  .cols {
    grid-template-columns: 1fr;
  }

  .box,.empty {
    padding: 18px;
  }

  .chat-layout {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .threadlist {
    max-height: 155px;
    overflow: auto;
  }

  .order-row {
    gap: 8px;
    flex-wrap: wrap;
  }

  .heading {
    gap: 8px;
  }

  .identity h1 {
    font-size: 1.6rem;
  }
}

.challenge-dialog {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(430px,90vw);
  padding: 0;
}

.challenge-dialog::backdrop {
  background: #132d32a8;
}

.challenge-dialog .auth-form {
  padding: 32px;
}
