:root {
  --brand: #dc4a58;
  --brand-dark: #c63b49;
  --ink: #171719;
  --muted: #818394;
  --surface: #f4f4f1;
  --surface-2: #f7f7f5;
  --line: #dedfe5;
  --star: #f2b437;
  --success: #58a856;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: #f7f7f5;
  color: var(--ink);
}

button, textarea, input { font: inherit; }
button { cursor: pointer; }

.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;
}

.site-header {
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ecece9;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}
.brand img { width: 168px; height: auto; display: block; }

.header-page-link {
  margin-left: auto;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(85, 86, 95, .35);
  color: #55565f;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}

.header-page-link:hover,
.header-page-link:focus-visible {
  border-color: currentColor;
  color: var(--brand-dark);
}

main { padding: 54px 24px 0; }

.review-form-section,
.reviews-section {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.review-form-section {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(520px, 1.22fr);
  align-items: start;
  gap: clamp(48px, 7vw, 92px);
}

.form-intro { padding-top: 26px; }
.form-intro > p {
  max-width: 420px;
  margin: 24px 0 0;
  color: #6f7079;
  font-size: 18px;
  line-height: 1.55;
}

.review-form-card {
  padding: 30px;
  border: 1px solid #e9e9e5;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(28, 28, 24, .07);
}

h1 {
  margin: 0;
  max-width: 500px;
  font-size: clamp(42px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -2.3px;
  font-weight: 550;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: #5f6068;
  font-size: 13px;
  font-weight: 700;
}

.stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: -3px;
}

.star {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d9dbe3;
  font-size: 33px;
  line-height: 1;
  transition: color .18s ease, transform .18s ease;
}

.star:hover { transform: translateY(-2px) scale(1.03); }
.star.is-active { color: var(--star); }

.rating-extra { margin: 14px 0 22px; }
.rating-extra[hidden] { display: none; }
.rating-extra p { margin: 0 0 10px; color: #55565e; font-size: 13px; font-weight: 650; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  color: #27272a;
  background: var(--surface);
  font-size: 14px;
}
.pill--active { color: #9f2f3a; background: #fdebed; box-shadow: inset 0 0 0 1px #f3cdd1; }
.pill span { color: var(--brand); }

.composer {
  overflow: hidden;
  border: 1px solid #deded9;
  border-radius: 18px;
  background: #fbfbfa;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.composer:focus-within {
  border-color: #aaa9a3;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 23, 25, .06);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 142px;
  padding: 20px 20px 10px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
}

textarea::placeholder { color: #8f919b; }

.composer-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px 14px;
  color: #777881;
  font-size: 12px;
}

.review-actions {
  display: grid;
  grid-template-columns: 184px 1fr;
  align-items: center;
  gap: 16px;
  margin: 14px 0 0;
  padding: 2px 0;
}

.review-actions p {
  margin: 0;
  color: #77717a;
  font-size: 13px;
  line-height: 1.38;
}
.review-actions p strong { color: #4f4b51; font-weight: 700; }

.mic-button {
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--brand);
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 7px 18px rgba(220, 74, 88, .18);
  font-size: 15px;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.button-mic-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mic-button:hover { transform: translateY(-1px); border-color: var(--brand-dark); background: var(--brand-dark); }
.mic-button.is-recording { color: #fff; border-color: var(--brand-dark); background: var(--brand-dark); }

.mic-icon,
.mini-mic {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 9px;
}

.mic-icon::before,
.mini-mic::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  transform: translateX(-50%);
}

.mic-icon::after,
.mini-mic::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 2px;
  height: 5px;
  background: currentColor;
  transform: translateX(-50%);
}

.recording-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(23, 23, 25, .46);
  backdrop-filter: blur(5px);
}

.recording-modal[hidden], .review-confirmation[hidden], .processing-panel[hidden], .result-meta[hidden], .moderation-notice[hidden] { display: none; }
body.is-recording, body.has-open-dialog { overflow: hidden; }

.recording-dialog {
  width: min(620px, 100%);
  padding: 26px 30px 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .24);
  text-align: center;
  animation: modal-in .28s ease both;
}

.recording-head { display: flex; justify-content: space-between; align-items: center; }
.recording-head strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.recording-status {
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #fff0f1;
  font-size: 14px;
  font-weight: 800;
}
.recording-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse 1s infinite; }

.recording-mic {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 20px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 0 0 11px #fff0f1;
}
.recording-mic::before {
  content: "";
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(220, 74, 88, .32);
  border-radius: inherit;
  animation: record-ring 1.6s ease-out infinite;
}
.recording-mic .mic-icon { transform: scale(1.08); }

.recording-dialog h2 { margin: 0; font-size: 30px; letter-spacing: -.7px; }
.recording-copy { margin: 8px auto 20px; max-width: 440px; color: var(--muted); line-height: 1.45; }

.waveform-shell {
  height: 112px;
  padding: 0 18px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #fff5f6;
}

#waveform { display: block; width: 100%; height: 112px; }
.recording-hint { margin: 12px 0 18px; color: var(--muted); font-size: 13px; }

.stop-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  transition: background .2s ease, transform .2s ease;
}
.stop-button:hover { background: var(--brand-dark); transform: translateY(-1px); }

.review-confirmation {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(23, 23, 25, .46);
  backdrop-filter: blur(5px);
}

.review-confirmation__dialog {
  width: min(460px, 100%);
  padding: 34px 34px 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .24);
  text-align: center;
  animation: modal-in .28s ease both;
}

.review-confirmation__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  box-shadow: 0 0 0 10px #eff8ee;
  font-size: 30px;
  font-weight: 800;
}

.review-confirmation h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -.7px;
}

.review-confirmation p {
  max-width: 370px;
  margin: 12px auto 24px;
  color: #676872;
  font-size: 16px;
  line-height: 1.5;
}

.review-confirmation__button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font-weight: 750;
  transition: background .2s ease, transform .2s ease;
}

.review-confirmation__button:hover { background: #303034; transform: translateY(-1px); }
.review-confirmation__button:focus-visible { outline: 3px solid rgba(220, 74, 88, .35); outline-offset: 3px; }

.processing-panel {
  min-height: 86px;
  margin-top: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 17px;
  background: #f6f6f3;
}

.processing-spinner {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 4px solid #e3e4e8;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.processing-panel strong { font-size: 15px; }
.processing-panel p { margin: 4px 0 0; color: #777881; font-size: 13px; }

.reviews-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.reviews-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -1.2px;
}

.result-meta {
  margin-top: 10px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  animation: reveal .35s ease both;
}

.result-meta__facts { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.result-meta__facts span + span { padding-left: 16px; border-left: 1px solid var(--line); }
.result-meta__facts b { color: var(--ink); font-size: 12px; }

.moderation-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #ead9b4;
  border-radius: 14px;
  color: #5f4a1f;
  background: #fff9e9;
}
.moderation-notice--review { color: #6c3d20; border-color: #e9cdbd; background: #fff4ee; }
.moderation-notice--block { color: #7e2730; border-color: #efc5ca; background: #fff0f1; }
.moderation-notice__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c88a19;
  font-size: 13px;
  font-weight: 800;
}
.moderation-notice--review .moderation-notice__icon { background: #b85c30; }
.moderation-notice--block .moderation-notice__icon { background: var(--brand); }
.moderation-notice strong { display: block; font-size: 14px; }
.moderation-notice p { margin: 3px 0 0; color: inherit; font-size: 13px; line-height: 1.4; }

.publish-row { display: flex; justify-content: flex-end; margin-top: 18px; }
.publish-row--single .publish-button { width: min(270px, 100%); }
.name-field span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.name-field em { margin-left: 4px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 400; }
.name-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #d9dae0;
  border-radius: 14px;
  outline: 0;
}
.name-field input:focus { border-color: var(--ink); }

.publish-button {
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font-weight: 750;
  transition: opacity .2s ease, background .2s ease, transform .2s ease;
}
.publish-button:hover:not(:disabled) { background: #303034; transform: translateY(-1px); }
.publish-button:disabled { cursor: not-allowed; color: #aaaab0; background: #ececea; }
.mic-button:disabled { cursor: wait; opacity: .55; transform: none; }

.reviews-section {
  margin-top: 76px;
  margin-bottom: 72px;
  padding: 42px 46px 22px;
  border: 1px solid #e9e9e5;
  border-radius: 30px;
  background: #fff;
}

.live-badge {
  margin-top: 5px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #567555;
  background: #eff8ee;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.live-badge span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #65ad61; }

.review-card {
  position: relative;
  display: block;
  padding: 26px 0;
  border-bottom: 1px solid #e4e4e7;
}
.review-card:last-child { border-bottom: 0; }

.review-meta { position: absolute; top: 28px; right: 0; display: flex; align-items: center; gap: 12px; }
.review-stars { color: var(--star); font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.review-stars span { color: #d8dae2; }
.review-meta time { color: #777881; font-size: 12px; }

.review-author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #68412c;
  background: #f1d5bd;
  font-size: 13px;
  font-weight: 800;
}
.avatar--small { width: 34px; height: 34px; color: #fff; background: var(--ink); }
.avatar--orange { color: #673320; background: #efc0a5; }
.avatar--gray { color: #555661; background: #e1e2e7; }
.avatar--persona {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 19px;
  font-weight: 400;
}
.avatar--rating-5 { background: #e8f3df; }
.avatar--rating-4 { background: #edf1dd; }
.avatar--rating-3 { background: #eeeef0; }
.avatar--rating-2 { background: #f8ead7; }
.avatar--rating-1 { background: #f8dede; }
.review-content { padding-right: 220px; }
.review-content p { max-width: 760px; margin: 13px 0 12px; font-size: 17px; line-height: 1.55; }
.review-footer { display: flex; min-height: 32px; align-items: center; gap: 12px; }
.voice-label { display: inline-flex; align-items: center; gap: 8px; color: #777881; font-size: 12px; }
.mini-mic { width: 8px; height: 12px; border-width: 1.5px; }
.mini-mic::before { width: 8px; height: 4px; bottom: -5px; border-width: 1.5px; }
.mini-mic::after { bottom: -7px; height: 3px; width: 1.5px; }
.like-button {
  min-width: 54px;
  min-height: 32px;
  margin-left: auto;
  padding: 4px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #dddde1;
  border-radius: 999px;
  color: #74757e;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.like-button:hover:not(:disabled) { border-color: #c9c9ce; color: var(--brand-dark); background: #faf4f4; transform: translateY(-1px); }
.like-button:focus-visible { outline: 3px solid rgba(220, 74, 88, .2); outline-offset: 2px; }
.like-button.is-liked { border-color: #edc2c7; color: var(--brand-dark); background: #fff3f4; }
.like-button:disabled { cursor: wait; opacity: .55; }
.like-button__icon { font-size: 19px; line-height: 1; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 360px;
  padding: 16px 19px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 35px rgba(0,0,0,.2);
  animation: reveal .25s ease both;
}
.toast[hidden] { display: none; }

footer {
  padding: 24px;
  border-top: 1px solid #e8e8e5;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes record-ring { 0% { opacity: .65; transform: scale(.9); } 75%, 100% { opacity: 0; transform: scale(1.32); } }

@media (max-width: 900px) {
  .review-form-section { max-width: 720px; grid-template-columns: 1fr; gap: 30px; }
  .form-intro { padding-top: 0; }
  .form-intro > p { max-width: 650px; margin-top: 16px; }
  h1 { max-width: 700px; }
  .reviews-section { max-width: 720px; }
}

@media (max-width: 700px) {
  .site-header { height: 68px; padding: 0 18px; }
  .brand img { width: 147px; }
  .header-page-link { font-size: 13px; }
  main { padding: 30px 14px 0; }
  h1 { font-size: 38px; letter-spacing: -1.6px; }
  .form-intro > p { font-size: 16px; }
  .review-form-card { padding: 20px; border-radius: 22px; }
  .star { width: 34px; height: 34px; font-size: 33px; }
  .rating-extra { margin-bottom: 18px; }
  .rating-extra p { font-size: 13px; }
  .pill { padding: 10px 13px; font-size: 13px; }
  .composer textarea { min-height: 142px; padding: 18px 16px 8px; font-size: 16px; }
  .composer-footer { padding: 0 20px 15px; }
  .review-actions { grid-template-columns: 1fr; gap: 10px; }
  .mic-button { width: 100%; }
  .review-actions p { font-size: 13px; text-align: center; }
  .result-meta { justify-content: flex-start; }
  .publish-row { display: block; }
  .publish-row--single .publish-button { width: 100%; }
  .reviews-section { margin-top: 52px; margin-bottom: 46px; padding: 26px 20px 12px; border-radius: 24px; }
  .reviews-heading { display: block; }
  .live-badge { display: inline-block; margin-top: 16px; }
  .review-card { padding: 22px 0; }
  .review-meta { position: static; justify-content: space-between; margin-bottom: 14px; }
  .review-content { padding-right: 0; }
  .review-content p { font-size: 16px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .recording-modal { padding: 12px; }
  .recording-dialog { padding: 22px 18px 20px; border-radius: 24px; }
  .recording-dialog h2 { font-size: 26px; }
  .recording-copy { font-size: 14px; }
  .waveform-shell { margin-inline: -2px; padding-inline: 10px; }
  .review-confirmation { padding: 12px; }
  .review-confirmation__dialog { padding: 30px 22px 22px; border-radius: 24px; }
  .review-confirmation h2 { font-size: 25px; }
}

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