:root {
  --bg: #f7f7f5;
  --paper: #ffffff;
  --ink: #141413;
  --muted: #777772;
  --line: #e7e7e2;
  --line-strong: #d8d8d2;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  width: min(100%, 648px);
  margin: 0 auto;
  padding: 72px 24px 64px;
}

.mast {
  display: flex;
  align-items: center;
  margin-bottom: 56px;
}

.brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--muted);
}

h1 {
  margin: 0 0 32px;
  font-size: clamp(38px, 8vw, 52px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.sheet {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(20 20 19 / 4%);
}

.field {
  display: block;
  padding: 19px 22px 21px;
  border-bottom: 1px solid var(--line);
  cursor: text;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.field:focus-within {
  background: #fbfbf9;
  box-shadow: inset 3px 0 0 var(--ink);
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}

input,
textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  line-height: 1.6;
  outline: 0;
}

textarea {
  min-height: 148px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 0;
}

.submit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.submit:hover {
  background: #2b2b29;
}

.submit:active {
  background: #000;
}

.submit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.submit:disabled {
  cursor: default;
  opacity: 0.5;
}

.error {
  margin: 14px 0 0;
  color: #a52a20;
  font-size: 13px;
  line-height: 1.5;
}

.receipt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.receipt-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.receipt-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .shell {
    padding: 52px 18px 40px;
  }

  .mast {
    margin-bottom: 44px;
  }

  h1 {
    margin-bottom: 26px;
  }

  .field {
    padding: 17px 18px 19px;
  }

  .submit {
    padding: 17px 18px;
  }

  .receipt {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field,
  .submit {
    transition: none;
  }
}
