:root {
  --paper: #f4f0e9;
  --ink: #262e29;
  --soft: #74776e;
  --accent: #d9f061;
  --line: #dcded2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
header {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header a {
  text-decoration: none;
  color: inherit;
  font-weight: 750;
  font-size: 19px;
}
header a span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--soft);
}
.edition {
  font-size: 11px;
  border: 1px solid #c7cdbd;
  border-radius: 30px;
  padding: 5px 10px;
}
main {
  max-width: 580px;
  margin: 0 auto;
  padding: 0 18px;
}
.hero {
  position: relative;
  aspect-ratio: 1.25;
  border-radius: 22px;
  overflow: hidden;
  background: #c8ccba;
}
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.28), transparent 65%);
}
.hero-copy {
  position: absolute;
  left: 22px;
  top: 15px;
  z-index: 1;
  color: white;
  text-shadow: 0 2px 10px #0004;
}
.hero-copy p {
  font-size: 11px;
  letter-spacing: 0.12em;
}
.hero-copy h1 {
  font-size: clamp(32px, 8vw, 46px);
  line-height: 1.2;
  margin: 14px 0;
  letter-spacing: -0.04em;
}
.intro {
  margin: 26px 4px 18px;
}
.intro h2 {
  font-size: 22px;
  letter-spacing: -0.04em;
  margin: 0 0 5px;
}
.intro p {
  color: var(--soft);
  font-size: 13px;
  margin: 0;
}
.upload {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 152px;
  border: 1px dashed #b1b8a5;
  border-radius: 18px;
  background: #ffffff75;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
}
.upload b {
  display: block;
  font-size: 28px;
  font-weight: 300;
  color: #717b5a;
}
.upload small {
  display: block;
  font-size: 11px;
  color: var(--soft);
  margin-top: 5px;
}
#preview {
  max-height: 230px;
  max-width: 100%;
  object-fit: contain;
}
#change {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: #fff;
  border-radius: 20px;
  font-size: 11px;
  padding: 3px 10px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 23px 0 18px;
}
legend {
  font-size: 13px;
  margin-bottom: 9px;
}
.gender {
  display: flex;
  gap: 12px;
}
.gender label {
  flex: 1;
  cursor: pointer;
}
.gender input {
  position: absolute;
  opacity: 0;
}
.gender span {
  display: block;
  text-align: center;
  padding: 12px;
  background: #ffffff80;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.gender input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--accent);
}
.gender input:focus-visible + span {
  outline: 3px solid #99aa44;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--soft);
  margin: 0 0 17px;
}
.consent input {
  margin: 4px 0;
  accent-color: #495737;
}
button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px 20px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.fine {
  font-size: 11px;
  color: var(--soft);
  line-height: 1.8;
  margin-top: 14px;
}
.secondary {
  background: #fff8;
  border: 1px solid var(--line);
  margin-top: 11px;
  justify-content: center;
}
.text {
  padding: 14px;
  background: transparent;
  font-size: 12px;
  justify-content: center;
  font-weight: 400;
}
footer {
  text-align: center;
  font-size: 11px;
  color: var(--soft);
  margin: 32px 0 24px;
  padding: 0 20px;
}
footer span {
  font-size: 9px;
  letter-spacing: 0.08em;
}
#error {
  margin: 16px 0;
  padding: 14px;
  background: #f4dfd4;
  border-radius: 12px;
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
#processing {
  text-align: center;
  padding: 34px 0;
}
.waiting-art {
  position: relative;
  width: 210px;
  height: 210px;
  overflow: hidden;
  border-radius: 50%;
  margin: 0 auto 28px;
}
.waiting-art img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}
.spinner {
  position: absolute;
  inset: 14px;
  border: 2px solid #fff3;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--soft);
  margin: 18px 0 8px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.3;
}
#detail,
#combo {
  font-size: 13px;
  color: var(--soft);
}
#result {
  padding-top: 16px;
}
#poster {
  width: 100%;
  border-radius: 15px;
  display: block;
  box-shadow: 0 9px 24px #3331;
}
#combo {
  line-height: 1.9;
  margin: 17px 2px;
}
@media (min-width: 700px) {
  .hero-copy {
    left: 30px;
    top: 20px;
  }
  main {
    padding: 0 26px;
  }
  .intro {
    margin-top: 30px;
  }
}
