:root {
  --ink: #12141c;
  --secondary: #8c8d9e;
  --pill: #f3f3f6;
  --dash: #d6d6dc;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 144px 24px 32px;
  text-align: center;
  flex: 1;
}

.brand {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 132px;
  height: 108px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 700px;
}

.mark {
  grid-area: 1 / 1;
  width: 132px;
  height: auto;
  transform-origin: center center;
  animation: logo-yaw 3.6s cubic-bezier(0.02, 0.82, 0.08, 1) forwards;
}

@keyframes logo-yaw {
  from { transform: rotateY(2160deg); }
  to { transform: rotateY(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mark { animation: none; }
}

h1 {
  margin: 8px 0 0;
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -1.5px;
  font-weight: 900;
}

.tag {
  margin: 10px 0 28px;
  color: var(--secondary);
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
}

.drop-wrap {
  position: relative;
  width: 250px;
  height: 230px;
  margin: 0 auto 22px;
}

.drop {
  display: grid;
  place-items: center;
  width: 250px;
  height: 230px;
  margin: 0;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.drop::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1.6px dashed var(--dash);
  border-radius: 28px;
}

.drop input { display: none; }

.drop.over::before { border-color: #3a86ff; }

.arrow { width: 42px; height: 48px; position: relative; z-index: 1; }

.preview {
  position: absolute;
  left: 16px;
  top: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  z-index: 1;
  display: block;
}

.drop.showing::before { z-index: 2; }
.drop.showing .arrow { display: none; }

.drop.showing { cursor: default; }
.drop.showing input { pointer-events: none; }

.clear {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1c1c28;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(20, 20, 30, 0.16);
}

.lead { margin: 0; font-size: 22px; font-weight: 650; }
.sub { margin: 6px 0 0; color: var(--secondary); }

#panel { margin-top: 28px; text-align: left; }

.filecard, .choice, .go, .more {
  border: 0;
  font: inherit;
}

.filecard {
  padding: 14px 16px;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  font-weight: 650;
}

.row { display: flex; justify-content: space-between; align-items: baseline; }
.row h2 { margin: 18px 0 10px; font-size: 22px; }
.row span { color: var(--secondary); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.choice, .more {
  height: 64px;
  border-radius: 16px;
  background: var(--pill);
  color: var(--ink);
  cursor: pointer;
}

.choice strong, .more strong { display: block; font-size: 15px; }
.choice em, .more em { font-style: normal; color: var(--secondary); font-size: 11px; }
.choice.on { outline: 2px solid #676fdd; background: #fff; }
.choice:disabled { opacity: 0.4; cursor: default; }

.go {
  width: 100%;
  height: 56px;
  margin-top: 16px;
  border-radius: 18px;
  color: #fff;
  font-size: 18px;
  font-weight: 650;
  cursor: pointer;
  background: linear-gradient(90deg, #06b3f4, #3a78ff, #676fdd, #fa459a);
}

.go:disabled { opacity: 0.45; cursor: default; }

.merge {
  margin-top: 10px;
  color: var(--ink);
  background: var(--pill);
}

.hint, .foot { color: var(--secondary); font-size: 13px; }
.error { color: #9b2340; }

.site-foot {
  margin-top: 24px;
  padding: 28px 16px 22px;
  text-align: center;
  background: linear-gradient(#f7f7f9, #ececf1);
  border-top: 1px solid #e4e4ea;
  box-shadow: inset 0 1px 0 #fff, 0 -10px 24px rgba(20, 20, 30, 0.05);
}

.site-foot nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
}

.site-foot a {
  color: #6e6f7c;
  font-size: 13px;
  text-decoration: none;
}

.site-foot a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.site-foot p {
  margin: 0;
  color: #8c8d9e;
  font-size: 12px;
}

.page {
  width: min(640px, 100%);
  padding-top: 72px;
  text-align: left;
}

.page h1 {
  font-size: 40px;
  letter-spacing: -0.5px;
}

.page p {
  color: #4c4d5a;
  font-size: 15px;
  line-height: 1.55;
}
