/* Catalog style "demo26" — rating + comments add-on (loaded instead of _rate.css): white app panels, squircle score keys, Google-blue selection. Mirrors /demo26/. */
/*
 * Card: the counters read like a place rating in a maps app ("★ 8.4/10 · 2 comments").
 * Post: the rating is a white panel with a huge Manrope score and ten squircle keys like the dock
 * icons; the chosen one turns Google blue inside a white + blue ring (the dock's "open" state).
 * Comments are a white panel: each comment a row with a coloured squircle avatar, the form a pair
 * of soft grey fields that turn white with a blue ring when focused.
 */

/* card counters */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.post__rating { color: var(--ink); font-weight: 800; }
.post__rating::before { content: "★ "; color: #e37400; }
.post__rating-avg { font-size: 14px; }
.post__rating-max { color: var(--muted); font-weight: 600; }
.post__comments { color: var(--muted); text-decoration: none; }
.post__comments::before { content: "· "; }
.post__comments:hover { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; }

.post__flash { margin: 16px 0 0; }

/* rating panel */
.rating { margin-top: 16px; padding: 32px 40px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.rating__title, .comments__title { margin: 0 0 10px; font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
.rating__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 20px; }
.rating__avg { font-size: 68px; font-weight: 800; line-height: 0.9; letter-spacing: -0.06em; }
.rating__max { color: var(--muted); font-size: 18px; font-weight: 800; }
.rating__count { padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12.5px; font-weight: 800; }
.rating__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.rating__scale { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rating__legend { width: 100%; margin-bottom: 10px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.rating__opt { position: relative; }
.rating__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rating__num {
    display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--soft); color: var(--ink);
    font-size: 17px; font-weight: 800; cursor: pointer; transition: background 0.15s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.15s;
}
.rating__opt:hover .rating__num { background: var(--soft-2); transform: translateY(-4px); }
.rating__input:checked + .rating__num { background: var(--blue); color: #fff; transform: translateY(-3px); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--blue), 0 8px 16px -6px var(--blue); }
.rating__input:focus-visible + .rating__num { outline: 2px solid var(--blue); outline-offset: 6px; }
.rating__submit { min-height: 50px; padding: 0 24px; background: var(--ink); color: #fff; }
.rating__submit:hover { background: #000; }
.rating__mine { margin: 0; color: var(--muted); font-weight: 600; line-height: 1.5; }
.rating__mine-score { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0 4px; border-radius: 13px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 800; }

/* comments panel */
.comments { margin-top: 16px; padding: 32px 40px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.comments__count { display: inline-grid; place-items: center; min-width: 30px; height: 24px; margin-left: 6px; padding: 0 8px; border-radius: 12px; background: var(--soft); font-size: 13px; font-weight: 800; letter-spacing: 0; vertical-align: 0.3em; }
.comments__list { display: grid; gap: 4px; margin: 6px 0 24px; padding: 0; list-style: none; }
.comment { --c: #1a73e8; position: relative; padding: 12px 12px 12px 70px; border-radius: 18px; transition: background 0.15s; }
.comment:nth-child(4n+2) { --c: #c2366b; }
.comment:nth-child(4n+3) { --c: #2f7d4f; }
.comment:nth-child(4n) { --c: #b8541a; }
.comment:hover { background: var(--soft); }
.comment::before { content: ""; position: absolute; left: 12px; top: 13px; width: 44px; height: 44px; border-radius: 14px; background: radial-gradient(circle at 50% 38%, rgb(255 255 255 / 0.92) 0 7px, transparent 7.5px), radial-gradient(ellipse 13px 10px at 50% 100%, rgb(255 255 255 / 0.92) 0 96%, transparent 100%), var(--c); box-shadow: inset 0 -10px 18px -10px rgb(0 0 0 / 0.3); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 2px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.comment__author { color: var(--ink); font-size: 15px; font-weight: 800; }
.comment__body { color: #2b2e35; font-size: 15px; overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 20px; color: var(--muted); }
.comment-form { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.comment-form__field { display: grid; gap: 6px; margin: 0; }
.comment-form__label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.comment-form__input, .comment-form__text { width: 100%; padding: 12px 16px; border: 1px solid transparent; border-radius: 16px; background: var(--soft); color: var(--ink); font: 600 15px/1.45 var(--font); transition: background 0.15s, box-shadow 0.15s; }
.comment-form__input { max-width: 360px; border-radius: 999px; }
.comment-form__text { min-height: 120px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--blue); outline: none; background: #fff; box-shadow: 0 0 0 3px rgb(26 115 232 / 0.22); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.comment-form__note { color: var(--muted); font-size: 13px; font-weight: 600; }

@media (max-width: 860px) {
    .rating, .comments { padding: 24px; }
}
@media (max-width: 520px) {
    .rating, .comments { padding: 22px 16px; border-radius: 24px; }
    .rating__scale { gap: 6px; }
    .rating__num { width: 46px; height: 46px; border-radius: 14px; }
    .rating__avg { font-size: 56px; }
    .comment { padding-left: 62px; }
    .comment::before { left: 8px; }
}
