@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");
:root {
  --ink: #24153f;
  --violet: #6c48d8;
  --lilac: #e7dfff;
  --peach: #ff8f70;
  --cream: #fff7e8;
  --yellow: #ffd95a;
  --line: #d8cae4;
  --white: #fffdf8;
}
* {
  box-sizing: border-box;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 3%, #eadfff 0, transparent 26rem),
    var(--cream);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
button {
  font: inherit;
  color: inherit;
}
header {
  height: 76px;
  max-width: 1180px;
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}
.brand > span {
  width: 37px;
  height: 37px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  transform: rotate(-8deg);
}
.brand b {
  font-size: 20px;
}
.brand small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-left: -2px;
  margin-top: 5px;
}
.privacy {
  font-size: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 8px 11px;
  border-radius: 999px;
}
.privacy::first-letter {
  color: #40a96b;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 28px 24px 90px;
}
.hero {
  max-width: 100%;
  margin: 45px 0 55px;
}
.eyebrow {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--violet);
}
h1 {
  font:
    700 clamp(46px, 5.2vw, 66px) / 0.97 "Fraunces",
    serif;
  letter-spacing: -0.045em;
  margin: 15px 0 21px;
  white-space: nowrap;
}
h1 em {
  color: var(--peach);
}
.hero > p {
  font-size: 18px;
  line-height: 1.6;
  color: #655d70;
  max-width: 720px;
}
.hero-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}
.hero-summary b {
  background: var(--yellow);
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
}
.experience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}
.camera-card,
.reading-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 25px;
  padding: 25px;
  box-shadow: 0 18px 55px rgba(47, 30, 74, 0.08);
}
.card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 17px;
}
.card-head > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 800;
  font-size: 11px;
}
.card-head h2 {
  font:
    700 24px "Fraunces",
    serif;
  margin: 1px 0 4px;
}
.card-head p {
  margin: 0;
  font-size: 11px;
  color: #81778b;
}
.capture-setup {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -5px 0 12px;
}
.camera-mode {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--lilac);
}
.camera-mode button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #675c74;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.camera-mode button[aria-pressed="true"] {
  background: var(--violet);
  color: white;
  box-shadow: 0 2px 5px rgba(49, 30, 83, 0.2);
}
.capture-setup label {
  flex: 1 1 auto;
  min-width: 0;
}
.capture-setup input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 0 11px;
  color: var(--ink);
  font: 600 11px "DM Sans", sans-serif;
}
.capture-setup input:focus {
  outline: 2px solid rgba(108, 72, 216, 0.28);
  border-color: var(--violet);
}
.camera-stage {
  aspect-ratio: 4/5;
  background: #1c1630;
  border-radius: 17px;
  overflow: hidden;
  position: relative;
}
.camera-stage video,
.camera-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.friend-mode .camera-stage video {
  transform: none;
}
.face-guide {
  position: absolute;
  inset: 10% 21%;
  border: 2px dashed rgba(255, 217, 90, 0.8);
  border-radius: 48% 48% 44% 44%;
  box-shadow: 0 0 0 100vmax rgba(16, 10, 30, 0.2);
  pointer-events: none;
}
.face-guide i {
  position: absolute;
  left: -18%;
  right: -18%;
  top: 47%;
  border-top: 1px dashed rgba(255, 217, 90, 0.7);
}
.camera-empty,
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  color: white;
  background: linear-gradient(145deg, #251746, #3a2465);
  z-index: 3;
}
.camera-empty p {
  font-size: 11px;
  line-height: 1.6;
  max-width: 280px;
  color: #d7cbea;
}
.face-icon {
  width: 70px;
  height: 82px;
  border: 2px solid var(--yellow);
  border-radius: 48%;
  display: grid;
  place-items: center;
  font-size: 36px;
  margin-bottom: 17px;
}
.loading i {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}
.loading small {
  color: #d7cbea;
  margin-top: 6px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.button {
  border: 0;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}
.primary {
  background: var(--violet);
  color: white;
  box-shadow: 0 5px 0 #48309a;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
}
.live-guidance {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #faf7ff;
  padding: 11px 13px;
  border-radius: 12px;
  margin: 13px 0;
}
.live-guidance .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a79ab2;
  box-shadow: 0 0 0 4px #eee8f2;
}
.live-guidance.good .dot {
  background: #3fb06d;
  box-shadow: 0 0 0 4px #dbf3e4;
}
.live-guidance.warn .dot {
  background: #ef7a58;
  box-shadow: 0 0 0 4px #ffe3d9;
}
.live-guidance div {
  display: flex;
  flex-direction: column;
}
.live-guidance b {
  font-size: 11px;
}
.live-guidance small {
  font-size: 9px;
  color: #786e80;
  margin-top: 2px;
}
.capture {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 18px;
  width: 76px;
  height: 76px;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.38),
    0 9px 28px rgba(12, 7, 24, 0.35);
  transform: translateX(-50%);
  cursor: pointer;
}
.capture:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.capture span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--peach);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(36, 21, 63, 0.12);
}
.capture:not(:disabled):active {
  transform: translateX(-50%) scale(0.94);
}
.capture:disabled span {
  background: #aaa0b6;
}
.tips {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 9px;
  color: #7c7382;
  margin-top: 15px;
}
.tips span:before {
  content: "✓";
  color: var(--violet);
  margin-right: 4px;
}
.reading-card {
  min-height: 520px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, #f1eaff, #fff9ef);
}
.reading-placeholder {
  text-align: center;
  max-width: 340px;
}
.reading-placeholder > span {
  font-size: 48px;
  color: var(--peach);
}
.reading-placeholder h2,
.reading-result > h2 {
  font:
    700 32px/1.08 "Fraunces",
    serif;
  margin: 14px 0;
}
.reading-placeholder p {
  font-size: 12px;
  line-height: 1.65;
  color: #766c81;
}
.reading-result {
  width: 100%;
  text-align: center;
}
.portrait {
  width: 164px;
  height: 186px;
  margin: 0 auto 22px;
  position: relative;
  transform: rotate(-2deg);
  background: white;
  padding: 8px 8px 29px;
  box-shadow: 0 10px 25px rgba(41, 26, 66, 0.17);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait.no-caption {
  padding-bottom: 8px;
}
.portrait span {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
}
.kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  color: var(--violet);
}
.traits {
  display: grid;
  gap: 8px;
  text-align: left;
}
.trait {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.trait b {
  font:
    700 16px "Fraunces",
    serif;
}
.trait p {
  font-size: 10px;
  line-height: 1.45;
  color: #6e6478;
  margin: 4px 0 0;
}
.disclaimer {
  font-size: 9px;
  color: #81768a;
  margin: 16px 0;
}
.card-link {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#shareButton {
  grid-column: 1 / -1;
}
.share-status {
  min-height: 14px;
  margin: 9px 0 0;
  color: #6e6478;
  font-size: 9px;
}
.how {
  margin: 100px 0 15px;
  background: var(--ink);
  color: white;
  border-radius: 27px;
  padding: 55px;
}
.how > h2 {
  font:
    700 42px/1.05 "Fraunces",
    serif;
  margin: 14px 0 36px;
}
.how > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}
.how article {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  padding-top: 17px;
}
.how article > b {
  color: var(--yellow);
}
.how h3 {
  font:
    700 18px "Fraunces",
    serif;
  margin: 12px 0 7px;
}
.how article p {
  font-size: 10px;
  line-height: 1.6;
  color: #cabfd7;
}
footer {
  border-top: 1px solid var(--line);
  max-width: 1180px;
  margin: auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #776e7c;
}
footer a {
  color: var(--violet);
  font-weight: 800;
}
@media (max-width: 820px) {
  header {
    height: 52px;
    padding: 0 16px;
  }
  .privacy {
    font-size: 9px;
  }
  main {
    padding: 4px 10px 60px;
  }
  .hero {
    margin: 4px 4px 10px;
  }
  .eyebrow {
    display: none;
  }
  h1 {
    font-size: clamp(29px, 8.8vw, 42px);
    margin: 4px 0 6px;
  }
  .hero > p.hero-summary {
    display: flex;
    gap: 6px;
    max-width: none;
    margin: 0;
    font-size: clamp(8px, 2.35vw, 11px);
    line-height: 1;
  }
  .hero-summary b {
    padding: 5px 7px;
    font-size: inherit;
  }
  .experience {
    grid-template-columns: 1fr;
  }
  .camera-card,
  .reading-card {
    padding: 10px;
    border-radius: 18px;
  }
  .card-head {
    margin-bottom: 8px;
    align-items: center;
  }
  .card-head > span {
    width: 27px;
    height: 27px;
  }
  .card-head h2 {
    margin: 0;
    font-size: 19px;
  }
  .card-head p,
  .tips {
    display: none;
  }
  .capture-setup {
    margin: 0 0 8px;
  }
  .camera-mode button {
    min-height: 30px;
    padding: 0 9px;
  }
  .capture-setup input {
    height: 36px;
  }
  .camera-stage {
    aspect-ratio: 4 / 4.2;
    max-height: 50svh;
  }
  .live-guidance {
    margin: 8px 0;
    padding: 8px 11px;
  }
  .capture { bottom: 14px; width: 70px; height: 70px; }
  .reading-card {
    min-height: 280px;
  }
  .how {
    margin-top: 55px;
    padding: 30px 22px;
  }
  .how > h2 {
    font-size: 34px;
  }
  .how > div {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  footer {
    display: grid;
    gap: 8px;
    text-align: center;
    justify-content: center;
  }
  .brand small {
    display: none;
  }
}
@media (max-width: 380px) {
  h1 {
    font-size: 29px;
  }
  .privacy {
    display: none;
  }
  .actions {
    grid-template-columns: 1fr;
  }
}
