/* ============================================================
   «Оцени внешку по фото» — намеренно ИНОЙ, яркий стиль.
   (Общий с сайтом — только верхний навбар.)
   ============================================================ */
body.rate-body {
  margin: 0;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #15121f;
  background: linear-gradient(135deg, #ff5fa2 0%, #a64bff 45%, #4cc9f0 100%) fixed;
  min-height: 100vh;
}
/* ВАЖНО: уважать атрибут hidden даже на элементах с display:flex (модалки, загрузка) */
.rate-body [hidden] { display: none !important; }
.rate-app { position: relative; padding: calc(var(--nav-height, 74px) + 26px) 18px 120px; max-width: 560px; margin: 0 auto; overflow: hidden; }

/* Декоративные «капли» */
.rate-blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 420px at 12% 18%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(380px 380px at 92% 30%, rgba(76,201,240,.35), transparent 60%),
    radial-gradient(460px 460px at 60% 100%, rgba(255,126,179,.4), transparent 60%); }

/* Заголовок */
.rate-hero { text-align: center; color: #fff; margin-bottom: 18px; }
.rate-hero h1 { font-family: 'Wix Madefor Display', sans-serif; font-weight: 700; font-size: clamp(1.9rem, 7vw, 2.6rem); margin: 0 0 8px; text-shadow: 0 4px 18px rgba(0,0,0,.25); }
.rate-hero h1 span { display: inline-block; animation: rwiggle 1.6s ease-in-out infinite; }
@keyframes rwiggle { 0%,100%{ transform: rotate(-8deg) scale(1);} 50%{ transform: rotate(8deg) scale(1.15);} }
.rate-hero p { font-size: 1rem; opacity: .95; margin: 0 auto; max-width: 420px; line-height: 1.5; }

/* Сегмент-переключатель пола */
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.25); backdrop-filter: blur(8px); margin-top: 16px; }
.seg.small { display: flex; width: 100%; margin: 4px 0 0; background: #f0ecfb; }
.seg-btn { border: 0; cursor: pointer; font-family: inherit; font-weight: 700; font-size: .92rem; color: #fff; padding: 10px 18px; border-radius: 999px; background: transparent; transition: all .2s ease; white-space: nowrap; }
.seg.small .seg-btn { flex: 1; color: #6a5b8a; }
.seg-btn.active { background: #fff; color: #a64bff; box-shadow: 0 6px 16px rgba(0,0,0,.18); }

/* Сцена с карточкой */
.rate-stage { margin-top: 22px; min-height: 420px; }
.rate-loading { display: flex; justify-content: center; padding: 80px 0; }
.rate-spin { width: 52px; height: 52px; border-radius: 50%; border: 5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: rspin .8s linear infinite; }
@keyframes rspin { to { transform: rotate(360deg);} }

/* Карточка человека */
.rate-card { background: #fff; border-radius: 28px; padding: 14px; box-shadow: 0 30px 70px rgba(40,10,60,.4); animation: rpop .35s cubic-bezier(.22,.9,.41,1); }
.rate-card.swipe { animation: rswipe .32s ease forwards; }
@keyframes rpop { from { transform: scale(.9) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rswipe { to { transform: translateX(-60%) rotate(-10deg); opacity: 0; } }
.rc-photo { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; background: #ece8f6; }
.rc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-badge { position: absolute; left: 12px; bottom: 12px; background: rgba(20,12,30,.7); backdrop-filter: blur(6px); color: #ffd84d; font-weight: 800; font-size: 1rem; padding: 7px 13px; border-radius: 999px; }
.rc-report { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(20,12,30,.55); color: #fff; font-size: 1rem; }
.rc-report:hover { background: #ff4b6e; }
.rc-name { text-align: center; font-family: 'Wix Madefor Display', sans-serif; font-weight: 700; font-size: 1.35rem; color: #2a1b44; margin: 14px 0 4px; min-height: 1.2em; }

/* Звёзды 0–10 */
.rate-stars { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; margin: 6px 0; }
.rstar { background: none; border: 0; cursor: pointer; font-size: 1.9rem; line-height: 1; padding: 2px; color: #d9d2ea; transition: transform .12s ease; filter: grayscale(1); }
.rstar.on { color: #ffc83d; filter: none; transform: scale(1.05); }
.rstar:active { transform: scale(1.3); }
.rate-zero { display: block; margin: 4px auto 0; background: none; border: 0; cursor: pointer; font-size: .85rem; color: #9b8fb5; text-decoration: underline; }
.rate-zero.on { color: #ff4b6e; font-weight: 700; }
.rate-value { text-align: center; font-family: 'Wix Madefor Display', sans-serif; font-weight: 700; font-size: 1.1rem; color: #a64bff; min-height: 1.4em; margin-top: 6px; }

/* Кнопки */
.rate-actions { display: flex; gap: 10px; margin-top: 14px; }
.rbtn { flex: 1; border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 1.02rem; padding: 15px; border-radius: 18px; transition: transform .15s ease, box-shadow .2s ease, opacity .2s; }
.rbtn.primary { color: #fff; background: linear-gradient(135deg, #ff5fa2, #a64bff); box-shadow: 0 12px 26px rgba(166,75,255,.4); }
.rbtn.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(166,75,255,.55); }
.rbtn.ghost { background: #f0ecfb; color: #6a5b8a; flex: 0 0 40%; }
.rbtn.block { width: 100%; margin-top: 8px; }
.rbtn:disabled { opacity: .5; cursor: default; }

/* Пусто */
.rate-empty { text-align: center; color: #fff; padding: 50px 16px; }
.rate-empty .re-emoji { font-size: 3.4rem; }
.rate-empty h2 { font-family: 'Wix Madefor Display', sans-serif; margin: 8px 0; }
.rate-empty p { opacity: .95; }

/* Нижний док */
.rate-dock { position: fixed; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; z-index: 100; pointer-events: none; }
.dock-btn { pointer-events: auto; border: 0; cursor: pointer; font-family: 'Wix Madefor Display', sans-serif; font-weight: 700; font-size: 1.05rem; color: #a64bff; background: #fff; padding: 15px 30px; border-radius: 999px; box-shadow: 0 14px 34px rgba(40,10,60,.4); }
.dock-btn:hover { transform: translateY(-2px); }

/* Модалки */
.rm { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(30,10,45,.55); backdrop-filter: blur(6px); }
.rm-card { width: 100%; max-width: 400px; background: #fff; border-radius: 26px; padding: 26px 22px; position: relative; box-shadow: 0 40px 90px rgba(0,0,0,.5); animation: rpop .3s cubic-bezier(.22,.9,.41,1); max-height: 92vh; overflow-y: auto; }
.rm-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: #f0ecfb; color: #6a5b8a; font-size: 16px; }
.rm-card h3 { font-family: 'Wix Madefor Display', sans-serif; font-size: 1.4rem; color: #2a1b44; margin: 0 0 6px; }
.rm-sub { color: #8478a0; font-size: .9rem; margin: 0 0 16px; line-height: 1.45; }
.up-drop { display: block; border: 2px dashed #d6c9f5; border-radius: 18px; overflow: hidden; cursor: pointer; background: #f7f3ff; aspect-ratio: 3/4; max-height: 320px; position: relative; }
.up-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #9b8fb5; font-weight: 600; }
.up-ph span { font-size: 2.6rem; }
.rm-input { width: 100%; box-sizing: border-box; margin: 14px 0 8px; padding: 13px 15px; border-radius: 13px; border: 1.5px solid #e3daf6; font-size: 1rem; font-family: inherit; color: #2a1b44; }
.rm-input:focus { outline: none; border-color: #a64bff; }
.rm-err { display: none; background: #ffe1e7; color: #d12b54; padding: 10px 14px; border-radius: 12px; font-size: .9rem; margin: 12px 0 0; }
.rm-err.show { display: block; }
.rm-note { color: #8478a0; font-size: .82rem; text-align: center; margin: 10px 0 0; }
.mine-photo { border-radius: 18px; overflow: hidden; aspect-ratio: 3/4; max-height: 300px; background: #ece8f6; }
.mine-photo img { width: 100%; height: 100%; object-fit: cover; }
.mine-score { text-align: center; font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 2rem; color: #ffb800; margin: 14px 0 2px; }
.mine-votes { text-align: center; color: #8478a0; font-size: .92rem; margin-bottom: 14px; }

/* Тост */
.rate-toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: #2a1b44; color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .92rem; z-index: 7000; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: rpop .25s ease; }

@media (max-width: 420px) {
  .rstar { font-size: 1.7rem; }
  .rate-hero h1 { font-size: 1.8rem; }
}

/* ===== Комментарии (анонимные) ===== */
.rc-comments { margin-top: 12px; border-top: 1px solid #f0eafa; padding-top: 12px; }
.rc-com-toggle { width: 100%; background: #f6f2ff; border: 0; border-radius: 14px; padding: 11px; font-family: inherit; font-weight: 700; font-size: .92rem; color: #7a4bd0; cursor: pointer; }
.rc-com-toggle:hover { background: #efe7fd; }
.rc-com-body { margin-top: 10px; }
.rc-com-list { max-height: 168px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rc-com { background: #f3eefb; border-radius: 13px; padding: 9px 13px; font-size: .9rem; color: #36284f; line-height: 1.45; animation: rpop .25s ease; word-break: break-word; }
.rc-com .t { display: block; font-size: .7rem; color: #ab9fc6; margin-top: 4px; }
.rc-com-empty { color: #ab9fc6; font-size: .86rem; text-align: center; padding: 14px 8px; }
.rc-com-form { display: flex; gap: 8px; }
.rc-com-input { flex: 1; min-width: 0; border: 1.5px solid #e3daf6; border-radius: 13px; padding: 10px 13px; font-family: inherit; font-size: .92rem; color: #2a1b44; }
.rc-com-input:focus { outline: none; border-color: #a64bff; }
.rc-com-send { border: 0; border-radius: 13px; padding: 0 18px; background: linear-gradient(135deg, #ff5fa2, #a64bff); color: #fff; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.rc-com-send:disabled { opacity: .5; cursor: default; }

/* всплеск сердечек при оценке */
.rate-pop { position: fixed; pointer-events: none; font-size: 2rem; z-index: 9000; animation: heartUp .9s ease forwards; }
@keyframes heartUp { 0% { transform: translateY(0) scale(.5); opacity: 1; } 100% { transform: translateY(-120px) scale(1.4); opacity: 0; } }
