@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;600;700;800&family=Fraunces:ital,opsz,wght@1,9..144,500;1,9..144,600&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0c0a14;
  --bg-raised: #110e1c;
  --panel: rgba(25, 19, 37, .88);
  --panel-soft: #1b1628;
  --field: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .15);
  --ink: #f5f1ff;
  --muted: #a59fbd;
  --dim: #77718f;
  --amber: #ffc94d;
  --pink: #ff8fb8;
  --mint: #6ee7c8;
  --red: #ff858c;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --body: "Outfit", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% 4%, rgba(88, 49, 131, .24), transparent 34rem),
    radial-gradient(ellipse at 98% 66%, rgba(111, 43, 91, .15), transparent 34rem),
    var(--bg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.page-shell {
  width: min(1100px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 800 21px/1 var(--display);
  letter-spacing: -.045em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 201, 77, .4);
  border-radius: 13px;
  background: rgba(255, 201, 77, .09);
  color: var(--amber);
  font: 700 19px/1 var(--serif);
  transform: rotate(-5deg);
}

.brand-name span { color: var(--amber); }
.top-nav { display: flex; align-items: center; gap: 9px; }
.top-nav a {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s, background .2s, border-color .2s;
}
.top-nav a:hover { color: var(--ink); background: rgba(255,255,255,.045); }
.top-nav a[aria-current="page"] {
  color: var(--amber);
  border-color: rgba(255, 201, 77, .2);
  background: rgba(255, 201, 77, .07);
}

.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(240px, .83fr) minmax(0, 1.17fr);
  align-items: center;
  gap: clamp(44px, 8vw, 112px);
  padding: 76px 0 96px;
}

.review-flow {
  display: grid;
  min-width: 0;
  gap: 17px;
}

.intro { position: relative; padding: 8px 0 14px 3px; }
.intro::before {
  position: absolute;
  z-index: -1;
  top: -36px;
  left: -26px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 143, 184, .055);
  filter: blur(26px);
  content: "";
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 20px;
  height: 1px;
  background: currentColor;
  content: "";
}
h1 {
  max-width: 470px;
  margin: 0;
  font: 800 clamp(42px, 5.6vw, 68px)/.99 var(--display);
  letter-spacing: -.06em;
}
h1 em {
  color: var(--amber);
  font: italic 500 1em/.98 var(--serif);
  letter-spacing: -.055em;
}
.intro-copy {
  max-width: 390px;
  margin: 21px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.personal-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 31px;
  color: var(--dim);
  font-size: 13px;
}
.note-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(110, 231, 200, .08);
}

.form-card {
  width: 100%;
  padding: clamp(24px, 4vw, 39px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(29, 23, 43, .94), rgba(19, 15, 29, .94));
  box-shadow: 0 32px 90px rgba(0, 0, 0, .23), inset 0 1px 0 rgba(255,255,255,.035);
  animation: arrive .65s var(--ease) both;
}
.auth-panel .form-intro { margin-bottom: 2px; }
.auth-panel .form-intro > div { width: 100%; }
.auth-panel .form-intro .eyebrow { margin: 0 0 13px; }
.auth-panel .form-intro p:not(.eyebrow) { max-width: 390px; line-height: 1.6; }
.auth-panel .submit-button { margin-top: 23px; }
.auth-status {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 12px;
  text-align: center;
}

.review-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(110, 231, 200, .18);
  border-radius: 16px;
  background: rgba(110, 231, 200, .045);
}
.review-identity > div { display: grid; min-width: 0; gap: 2px; }
.review-identity span { color: var(--dim); font-size: 11px; }
.review-identity strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; }
.signout-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  transition: border-color .2s, color .2s, background .2s;
}
.signout-button:hover { border-color: rgba(255, 143, 184, .38); background: rgba(255, 143, 184, .06); color: var(--pink); }

.cooldown-card { position: relative; padding-left: 74px; }
.cooldown-mark {
  position: absolute;
  top: 32px;
  left: 31px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(110, 231, 200, .25);
  border-radius: 50%;
  background: rgba(110, 231, 200, .09);
  color: var(--mint);
  font-size: 14px;
}
.cooldown-card h2 { margin: 0; font: 700 21px/1.25 var(--display); letter-spacing: -.03em; }
.cooldown-card p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.cooldown-card strong { color: var(--amber); font-variant-numeric: tabular-nums; }

.form-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 25px;
}
.form-intro h2 {
  margin: 0;
  font: 700 22px/1.2 var(--display);
  letter-spacing: -.035em;
}
.form-intro p { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
.form-spark {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 143, 184, .18);
  border-radius: 14px;
  background: rgba(255, 143, 184, .07);
  color: var(--pink);
}
.form-spark svg { width: 19px; height: 19px; }

.field { margin-top: 20px; }
.field:first-of-type { margin-top: 0; }
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.field label, .field-label {
  color: #e9e4f3;
  font-size: 14px;
  font-weight: 600;
}
.optional { color: var(--dim); font-size: 12px; font-weight: 400; }

.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
}
.stars { display: flex; align-items: center; gap: 4px; }
.star-button {
  width: 41px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  appearance: none;
  background: transparent;
  color: rgba(255, 143, 184, .76);
  cursor: pointer;
  transition: color .18s, transform .18s;
}
.star-button:hover { transform: translateY(-2px); }
.star-button svg {
  width: 27px;
  height: 27px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill .18s, color .18s, transform .2s;
}
.star-button.is-filled { color: var(--pink); }
.star-button.is-filled svg { fill: currentColor; }
.star-button:active svg { transform: scale(.88); }
.rating-label {
  min-width: 118px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.rating-label.has-rating {
  color: var(--amber);
  border-color: rgba(255, 201, 77, .18);
  background: rgba(255, 201, 77, .065);
}

.control {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--field);
  color: var(--ink);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.control:hover { border-color: rgba(255,255,255,.22); }
.control:focus { border-color: rgba(255, 201, 77, .65); background: rgba(255,255,255,.05); }
.control::placeholder { color: #77718c; opacity: 1; }
.control.input { height: 48px; padding: 0 14px; }
.control.textarea {
  display: block;
  min-height: 154px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.55;
}
.control.select {
  height: 48px;
  padding: 0 42px 0 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3 5 4 4 4-4' stroke='%23a59fbd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.control.select option { background: #1b1628; color: var(--ink); }
.textarea-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--dim);
  font-size: 12px;
}
.counter { font-variant-numeric: tabular-nums; }
.counter.near-limit { color: var(--amber); }
.counter.over-limit { color: var(--red); }

.submit-button {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--amber);
  color: #21172a;
  cursor: pointer;
  font-weight: 700;
  transition: transform .25s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  box-shadow: inset 0 -2px 0 rgba(37, 21, 34, .15);
}
.submit-button:hover { transform: translateY(-2px); background: #ffd978; box-shadow: 0 10px 24px rgba(255, 201, 77, .13); }
.submit-button:active { transform: translateY(0) scale(.99); }
.submit-button:disabled { opacity: .72; cursor: wait; }
.submit-button svg { width: 17px; height: 17px; }
.button-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(33, 23, 42, .25);
  border-top-color: #21172a;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.status-message {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.status-message.is-visible { display: flex; }
.status-message.is-success {
  color: #a4f0d9;
  border-color: rgba(110, 231, 200, .2);
  background: rgba(110, 231, 200, .07);
}
.status-message.is-error {
  color: #ffb0b3;
  border-color: rgba(255, 133, 140, .2);
  background: rgba(255, 133, 140, .07);
}
.status-message svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.field-error { display: none; margin-top: 7px; color: #ff9ca4; font-size: 12px; }
.field-error.is-visible { display: block; }
.field.has-error .control { border-color: rgba(255, 133, 140, .65); }
.field.has-error .star-button { outline-color: var(--red); }
.rating-field.has-error .rating-row { border-radius: 12px; }

.bottom-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 23px;
  padding: 19px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}
.bottom-nav a { transition: color .2s; }
.bottom-nav a:hover { color: var(--amber); }
.bottom-nav .separator { color: #494257; }

@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 32px, 520px); }
  .topbar { min-height: 76px; }
  .main-content { grid-template-columns: 1fr; gap: 27px; padding: 43px 0 56px; }
  .intro { padding-left: 0; }
  .intro::before { top: -26px; left: -22px; }
  h1 { max-width: 520px; font-size: clamp(43px, 11vw, 62px); }
  .intro-copy { margin-top: 15px; font-size: 16px; }
  .personal-note { margin-top: 19px; }
  .form-card { padding: 24px 20px; border-radius: 22px; }
  .cooldown-card { padding-left: 61px; }
  .cooldown-mark { top: 27px; left: 22px; }
  .star-button { width: 36px; }
  .rating-row { gap: 8px; }
  .rating-label { min-width: 100px; padding-inline: 8px; font-size: 12px; }
  .bottom-nav { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .page-shell { width: calc(100% - 24px); }
  .brand { font-size: 19px; }
  .top-nav { gap: 0; }
  .top-nav a { padding: 8px 9px; font-size: 12px; }
  .form-card { padding: 21px 16px; }
  .cooldown-card { padding-left: 56px; }
  .cooldown-mark { top: 24px; left: 16px; }
  .star-button { width: 37px; }
  .rating-row { gap: 7px; }
  .rating-label { min-width: 108px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
