.review-section {
  min-width: 0;
  scroll-margin-top: 12px;
}

.review-intro {
  max-width: 52ch;
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.review-form {
  width: min(100%, 46rem);
  padding: clamp(12px, 4vw, 26px);
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--card);
}

.review-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.review-fields {
  display: grid;
  gap: 17px;
}

.review-field,
.review-form legend {
  padding: 0;
  font-size: 0.94rem;
  font-weight: 680;
  line-height: 1.4;
}

.review-field input,
.review-field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid #a99e8d;
  border-radius: 4px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 430;
}

.review-field textarea { resize: vertical; }

.review-rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 3rem));
  gap: 0.3rem;
  margin-top: 5px;
}

.review-star {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid #ad9f90;
  border-radius: 4px;
  background: #faf7ef;
  color: #6c4e31;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.review-star input,
.review-file-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.review-star-mark::before { content: "☆"; }
.review-star:is(:has(input:checked), :has(~ .review-star input:checked)) .review-star-mark::before { content: "★"; }
.review-star:is(:hover, :has(input:checked)) { background: #efe3d2; }

.review-star:has(input:focus-visible),
.review-file-picker:focus-within {
  outline: 2px solid #815b32;
  outline-offset: 2px;
}

.review-photos legend span { color: var(--muted); font-weight: 430; }
.review-help { margin: 4px 0 10px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.review-photo-grid { display: grid; gap: 8px; }
.review-photo-slot { min-width: 0; }
.review-file-picker { position: relative; justify-content: flex-start; width: 100%; cursor: pointer; }

.review-photo-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #f4efe5;
}

.review-photo-preview img { width: 100%; aspect-ratio: 1.3; object-fit: cover; border-radius: 2px; }
.review-photo-name { overflow: hidden; color: var(--muted); font-size: 0.81rem; text-overflow: ellipsis; white-space: nowrap; }
.review-photo-remove { min-height: 44px; padding-inline: 7px; border: 0; background: transparent; color: #5e4333; font-size: 0.84rem; text-decoration: underline; text-underline-offset: 3px; }
.review-photo-remove:hover { background: #e8ddcc; }
.review-photo-status { color: #813c29; font-size: 0.84rem; line-height: 1.45; }
.review-photo-status:not(:empty) { margin-top: 4px; }

.review-permission {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 44px;
  padding-block: 3px;
  font-size: 0.9rem;
  line-height: 1.48;
  cursor: pointer;
}

.review-permission input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #6b5037; }
.review-status { color: var(--muted); font-size: 0.93rem; line-height: 1.5; }
.review-status:not(:empty) { margin-top: 11px; }
.review-status[data-state="success"] { color: #365c3b; }
.review-status[data-state="error"] { color: #813c29; }
.review-form > button { margin-top: 10px; }

.review-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@media (min-width: 600px) {
  .review-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-photo-preview { grid-template-columns: minmax(0, 1fr) auto; }
  .review-photo-preview img { grid-column: 1 / -1; }
}
