:root {
    --yp-orange: #ef5526;
    --yp-orange-dark: #d8431a;
    --yp-star: #f5a623;
    --yp-ink: #1e2630;
    --yp-muted: #6b7280;
    --yp-line: #e8ebef;
    --yp-bg: #f7f8fa;
}

.yp-reviews { font-family: inherit; color: var(--yp-ink); padding: 8px 0 20px; }

.yp-rev-head {
    display: grid;
    grid-template-columns: 250px 1fr 1.1fr;
    gap: 28px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--yp-line);
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 6px 24px rgba(30,38,48,.04);
}

.yp-rev-score-box {
    text-align: center;
    border-right: 1px solid var(--yp-line);
    padding-right: 22px;
}
.yp-rev-avg {
    font-size: 7.4rem;
    font-weight: 600;
    line-height: 1;
    color: var(--yp-ink);
    letter-spacing: -1px;
}
.yp-rev-total { margin-top: 10px; font-size: 13px; color: var(--yp-muted); font-weight: 600; }

.yp-star-wrap {
    position: relative;
    display: inline-block;
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
    margin-top: 8px;
}
.yp-star-bg { color: #d8dde3; letter-spacing: 3px; }
.yp-star-fill {
    position: absolute; top: 0; left: 0;
    overflow: hidden; white-space: nowrap;
    color: var(--yp-star); letter-spacing: 3px;
}
.yp-star-sm { font-size: 15px; margin-top: 0; }
.yp-star-sm .yp-star-bg, .yp-star-sm .yp-star-fill { letter-spacing: 2px; }

.yp-rev-dist { display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
.yp-dist-row { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 10px; }
.yp-dist-label { font-size: 13px; font-weight: 700; color: var(--yp-muted); display: flex; align-items: center; gap: 3px; }
.yp-dist-label i { color: var(--yp-star); font-size: 11px; }
.yp-dist-bar { height: 8px; background: #eef1f4; border-radius: 6px; overflow: hidden; }
.yp-dist-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--yp-orange), #ff7a4d); border-radius: 6px; }
.yp-dist-count { font-size: 13px; color: var(--yp-muted); text-align: right; font-weight: 600; }

.yp-rev-criteria { border-left: 1px solid var(--yp-line); padding-left: 24px; }
.yp-crit-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--yp-ink); }
.yp-crit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.yp-crit {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: var(--yp-bg); border-radius: 12px; padding: 14px 8px;
    text-align: center;
}
.yp-crit i { font-size: 20px; color: var(--yp-orange); }
.yp-crit-name { font-size: 12px; color: var(--yp-muted); font-weight: 600; line-height: 1.2; }
.yp-crit-val { font-size: 17px; font-weight: 800; color: var(--yp-ink); }

.yp-rev-cta { margin: 20px 0 8px; }
.yp-rev-btn {
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--yp-orange); color: #fff; border: none;
    padding: 13px 30px; border-radius: 12px; font-size: 15px; font-weight: 700;
    cursor: pointer; text-decoration: none; transition: all .18s ease;
    box-shadow: 0 6px 18px rgba(239,85,38,.28);
}
.yp-rev-btn:hover { background: var(--yp-orange-dark); transform: translateY(-1px); color: #fff; }
.yp-rev-btn-ghost { background: #fff; color: var(--yp-orange); border: 1.5px solid var(--yp-orange); box-shadow: none; }
.yp-rev-btn-ghost:hover { background: #fff5f1; color: var(--yp-orange); }

.yp-rev-warn, .yp-rev-done {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
}
.yp-rev-warn { background: #fff5f1; color: var(--yp-orange-dark); border: 1px solid #ffd9c9; }
.yp-rev-warn i { font-size: 18px; }
.yp-rev-done { background: #eafaf1; color: #1c8a4e; border: 1px solid #c4ecd4; }
.yp-rev-done i { font-size: 18px; }

.yp-rev-list { margin-top: 30px; }
.yp-rev-list-title { font-size: 19px; font-weight: 800; margin: 0 0 18px; color: var(--yp-ink); }
.yp-rev-empty { text-align: center; padding: 44px 20px; color: var(--yp-muted); }
.yp-rev-empty i { font-size: 40px; color: #cfd5dc; margin-bottom: 12px; }
.yp-rev-empty p { margin: 0; font-size: 15px; }

.yp-comments { display: flex; flex-direction: column; gap: 14px; }
.yp-comment {
    display: flex; gap: 14px;
    background: #fff; border: 1px solid var(--yp-line); border-radius: 14px; padding: 18px 20px;
    transition: box-shadow .18s ease;
}
.yp-comment:hover { box-shadow: 0 6px 20px rgba(30,38,48,.06); }
.yp-comment-avatar {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--yp-orange), #ff8a5c); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800;
}
.yp-comment-body { flex: 1; min-width: 0; }
.yp-comment-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.yp-comment-author { font-size: 14px; font-weight: 700; color: var(--yp-ink); }
.yp-comment-verified { font-size: 11px; font-weight: 700; color: #1c8a4e; display: inline-flex; align-items: center; gap: 4px; }
.yp-comment-date { font-size: 12px; color: var(--yp-muted); margin-left: auto; }
.yp-comment-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: #374151; }

.yp-modal-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(20,26,33,.55); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.yp-modal-overlay.show { display: flex; }
.yp-modal {
    background: #fff; border-radius: 18px; width: 100%; max-width: 540px;
    max-height: 92vh; overflow-y: auto; position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: ypPop .22s ease;
}
@keyframes ypPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.yp-modal-close {
    position: absolute; top: 14px; right: 16px; background: none; border: none;
    font-size: 28px; line-height: 1; color: #aab; cursor: pointer; z-index: 2;
}
.yp-modal-close:hover { color: var(--yp-ink); }
.yp-modal-head {
    display: flex; align-items: center; gap: 14px;
    padding: 24px 26px 18px; border-bottom: 1px solid var(--yp-line);
    background: linear-gradient(180deg, #fff7f3, #fff);
    border-radius: 18px 18px 0 0;
}
.yp-modal-icon {
    flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
    background: var(--yp-orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.yp-modal-head-text h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--yp-ink); }
.yp-modal-head-text p { margin: 3px 0 0; font-size: 13px; color: var(--yp-muted); }
.yp-modal-body { padding: 22px 26px; }
.yp-rate-block { margin-bottom: 18px; }
.yp-rate-block > label { display: block; font-size: 13px; font-weight: 700; color: var(--yp-ink); margin-bottom: 7px; }
.yp-rate-block > label span { color: var(--yp-orange); }
.yp-rate-overall { text-align: center; background: var(--yp-bg); border-radius: 12px; padding: 16px; }
.yp-rate-overall .yp-rate-stars { font-size: 32px; }
.yp-rate-stars { display: inline-flex; gap: 6px; cursor: pointer; color: #d8dde3; font-size: 20px; }
.yp-rate-stars i { transition: color .12s ease, transform .12s ease; }
.yp-rate-stars i.fa-solid { color: var(--yp-star); }
.yp-rate-stars i:hover { transform: scale(1.14); }
.yp-rate-criteria-block { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-bottom: 6px; }
.yp-rate-criteria-block .yp-rate-block { margin-bottom: 6px; }
.yp-rate-criteria-block .yp-rate-stars { font-size: 18px; }
.yp-rate-comment label { display: block; font-size: 13px; font-weight: 700; color: var(--yp-ink); margin-bottom: 7px; }
.yp-rate-comment textarea {
    width: 100%; border: 1.5px solid var(--yp-line); border-radius: 12px; padding: 12px 14px;
    font-size: 14px; font-family: inherit; resize: vertical; outline: none; transition: border-color .15s;
}
.yp-rate-comment textarea:focus { border-color: var(--yp-orange); }
.yp-modal-foot {
    display: flex; gap: 12px; justify-content: flex-end;
    padding: 16px 26px 24px; border-top: 1px solid var(--yp-line);
}
.yp-modal-cancel {
    background: #fff; border: 1.5px solid var(--yp-line); color: var(--yp-muted);
    padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.yp-modal-cancel:hover { background: var(--yp-bg); }
.yp-modal-submit {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--yp-orange); border: none; color: #fff;
    padding: 11px 22px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer;
    transition: background .15s;
}
.yp-modal-submit:hover { background: var(--yp-orange-dark); }
.yp-modal-submit:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 900px) {
    .yp-rev-head { grid-template-columns: 1fr; gap: 22px; }
    .yp-rev-score-box { border-right: none; border-bottom: 1px solid var(--yp-line); padding-right: 0; padding-bottom: 18px; }
    .yp-rev-criteria { border-left: none; border-top: 1px solid var(--yp-line); padding-left: 0; padding-top: 18px; }
}
@media (max-width: 520px) {
    .yp-rev-avg { font-size: 52px; }
    .yp-crit-grid { grid-template-columns: 1fr 1fr; }
    .yp-rate-criteria-block { grid-template-columns: 1fr; }
    .yp-comment-date { margin-left: 0; width: 100%; }
}
