/* ===== รีวิวจริง (reviews-real.js) ===== */
#realReviews { max-width: 1160px; margin: auto; color: #fff; }
.rr-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; margin-bottom: 36px; }
.rr-eyebrow { color: var(--orange); font-weight: 600; font-size: 14px; letter-spacing: .04em; margin: 0 0 6px; }
.rr-intro h2 { font: 700 clamp(26px, 3.2vw, 38px)/1.25 "Mali", cursive; margin: 0 0 12px; color: #fff; }
.rr-intro p:last-child { color: rgba(255, 255, 255, .72); max-width: 46ch; line-height: 1.7; margin: 0; }

.rr-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.rr-stars i { position: relative; width: 16px; height: 16px; display: block; }
.rr-stars i svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #e7dccb; }
.rr-stars i::after { content: ""; position: absolute; inset: 0; width: var(--f); overflow: hidden;
  background: var(--orange); -webkit-mask: var(--star-mask) left / 16px 16px no-repeat; mask: var(--star-mask) left / 16px 16px no-repeat; }
.rr-stars.lg i { width: 22px; height: 22px; }
.rr-stars.lg i::after { -webkit-mask-size: 22px 22px; mask-size: 22px 22px; }
:root { --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4-4.7-4.4 6.4-.8z'/%3E%3C/svg%3E"); }

.rr-summary { background: #fff; color: var(--brown); border-radius: var(--radius); padding: 22px 24px; display: grid;
  grid-template-columns: auto 1fr; gap: 10px 26px; align-items: center; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.rr-score { text-align: center; display: grid; justify-items: center; gap: 4px; }
.rr-score strong { font: 700 52px/1 "Prompt", sans-serif; }
.rr-score small { color: #8a7563; font-size: 13px; }
.rr-summary.is-empty .rr-score strong { color: #cbbba8; }
.rr-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rr-bars li { display: grid; grid-template-columns: 12px 14px 1fr 22px; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; }
.rr-bars svg { width: 13px; height: 13px; fill: var(--orange); }
.rr-bars i { height: 8px; border-radius: 99px; background: #f1e8da; overflow: hidden; }
.rr-bars b { display: block; height: 100%; background: linear-gradient(90deg, #f9a11b, #ffc85a); border-radius: inherit; transition: width .8s ease; }
.rr-bars em { font-style: normal; color: #8a7563; text-align: right; }
.rr-write { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--orange); color: var(--brown); font: 600 15px "Prompt", sans-serif; padding: 12px 20px; border-radius: 99px;
  box-shadow: 0 4px 0 #c97a08; transition: transform .15s, box-shadow .15s; }
.rr-write svg { width: 18px; height: 18px; fill: currentColor; }
.rr-write:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #c97a08; }
.rr-write:active { transform: translateY(3px); box-shadow: 0 1px 0 #c97a08; }

.rr-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.rr-filter button { border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; padding: 7px 16px; border-radius: 99px; font: 500 14px "Prompt", sans-serif; cursor: pointer; }
.rr-filter button.is-on { background: #fff; color: var(--brown); border-color: #fff; }

.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; align-items: start; }
.rr-card { background: #fff; color: var(--brown); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.rr-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rr-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 18px "Mali", cursive; flex: none; }
.rr-who { display: grid; line-height: 1.3; min-width: 0; }
.rr-who small { color: #8a7563; font-size: 12.5px; }
.rr-verified { margin-left: auto; flex: none; font-size: 12px; font-weight: 600; color: #2f7a3a; background: #e6f4e4; padding: 3px 9px; border-radius: 99px; }
.rr-card h3 { font: 600 16px "Prompt", sans-serif; margin: 10px 0 4px; }
.rr-text { margin: 6px 0 0; line-height: 1.7; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rr-card.is-open .rr-text { -webkit-line-clamp: unset; }
.rr-card.is-mine { outline: 3px solid var(--orange); outline-offset: -3px; }
.rr-card.is-new { animation: rrPop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rrPop { from { transform: translateY(18px) scale(.94); opacity: 0; } }
.rr-mine-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px -8px 12px; padding: 6px 8px 6px 12px;
  background: #fff3dc; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: #9a5d00; }
.rr-del { border: 0; background: #fff; color: #c0392b; font: 600 12.5px "Prompt", sans-serif; padding: 4px 10px; border-radius: 99px; cursor: pointer; flex: none; }
.rr-more { border: 0; background: none; color: var(--red); font: 600 14px "Prompt", sans-serif; padding: 6px 0 0; cursor: pointer; }

.rr-empty { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 26px 28px;
  border: 2px dashed rgba(255, 255, 255, .3); border-radius: var(--radius); background: rgba(255, 255, 255, .05); }
.rr-empty-ico { width: 58px; height: 58px; border-radius: 50%; background: rgba(249, 161, 27, .18); display: grid; place-items: center; }
.rr-empty-ico svg { width: 28px; height: 28px; fill: var(--orange); }
.rr-empty b { font-size: 18px; }
.rr-empty p { margin: 4px 0 0; color: rgba(255, 255, 255, .72); line-height: 1.65; max-width: 62ch; }
.rr-empty .rr-write { grid-column: auto; white-space: nowrap; }

/* ฟอร์ม */
.rr-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; overflow: auto; border: 0; padding: 0; border-radius: 22px; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); color: var(--brown); background: #fffaf2; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.rr-dialog::backdrop { background: rgba(30, 17, 10, .6); backdrop-filter: blur(3px); }
.rr-form header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #efe3d1; position: sticky; top: 0; background: #fffaf2; z-index: 1; }
.rr-form h3 { margin: 0; font: 700 19px "Prompt", sans-serif; }
.rr-x { border: 0; background: #f1e8da; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; color: var(--brown); }
.rr-step { display: none; padding: 18px 22px 22px; }
.rr-step.is-on { display: grid; gap: 14px; }
.rr-field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; position: relative; }
.rr-field > span, .rr-field legend { font-weight: 600; font-size: 14px; padding: 0; }
.rr-field input, .rr-field select, .rr-field textarea { font: 400 15px "Prompt", sans-serif; color: var(--brown); border: 1.5px solid #e4d6c2; border-radius: 12px; padding: 10px 12px; background: #fff; width: 100%; box-sizing: border-box; }
.rr-field textarea { resize: vertical; min-height: 104px; }
.rr-field :focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249, 161, 27, .25); }
.rr-count { font-style: normal; font-size: 12px; color: #a08c78; justify-self: end; }
.rr-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rr-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rr-pick label { cursor: pointer; }
.rr-pick svg { width: 34px; height: 34px; fill: #e7dccb; transition: fill .12s, transform .12s; }
.rr-pick label:hover svg, .rr-pick label:hover ~ label svg, .rr-pick input:checked ~ label svg { fill: var(--orange); }
.rr-pick label:hover svg { transform: scale(1.12); }
.rr-pick input:focus-visible + label svg { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.rr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.rr-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.rr-err { margin: 0; color: #c0392b; font-weight: 600; font-size: 14px; }
.rr-send { border: 0; cursor: pointer; background: var(--red, #d23b2a); color: #fff; font: 600 16px "Prompt", sans-serif; padding: 13px; border-radius: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.rr-send:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.rr-send:disabled { opacity: .6; }
.rr-fine { margin: 0; font-size: 12.5px; color: #8a7563; text-align: center; }
.rr-step[data-step="done"] { text-align: center; justify-items: center; }
.rr-done-ico { width: 60px; height: 60px; border-radius: 50%; background: #e6f4e4; color: #2f7a3a; display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.rr-done-title { font-size: 20px; }
.rr-done-text { margin: 0; color: #6e5a48; line-height: 1.6; }
.rr-copybox { width: 100%; box-sizing: border-box; font: 400 14px/1.6 "Prompt", sans-serif; border: 1.5px solid #e4d6c2; border-radius: 12px; padding: 10px 12px; background: #fff; color: var(--brown); resize: none; }
.rr-done-btns { display: grid; gap: 10px; width: 100%; }
.rr-ghost { color: var(--brown); font-weight: 600; text-decoration: none; padding: 8px; }

@media (max-width: 860px) {
  .rr-head { grid-template-columns: 1fr; gap: 22px; }
  .rr-empty { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 420px) {
  .rr-summary { grid-template-columns: 1fr; }
  .rr-pick svg { width: 30px; height: 30px; }
}
