:root{
  --rstar:#ff8c00;
}

/* 标题追加后缀：小字号、不换行 */
.rtitleext{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  white-space:nowrap;
  vertical-align:middle;
}
.rtitlescore{ font-weight:600; }

/* 星星（半星） */
.rstars{
  display:inline-flex;
  gap:2px;
  line-height:1;
}
.rstar{
  position:relative;
  display:inline-block;
  font-size:14px;
  line-height:1;
  color:#ddd; /* 空星底色 */
}
.rstar::before{
  content:"★";
  position:absolute;
  left:0;
  top:0;
  width: calc(attr(data-fill number, 0) * 1%);
  overflow:hidden;
  color: var(--rstar);
}

/* 兼容：部分浏览器不支持 attr(number) 用法时，JS 会用内联样式兜底（见 ratings.js） */

/* 卡片/弹窗（Astra 风格偏白卡片） */
.rwrap{ margin-top:18px; }
.rbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  text-decoration:none !important;
}
.rbartext {font-size: 14px;color: rgba(0, 0, 0, .75);}
.rbardate{ color:#666; font-size:12px; margin-right:8px; }
.rbararrow{ color:#999; }

.rcard{
  margin-top:12px;
  padding:14px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#fff;
}
.rcardtitle{ font-weight:700; margin-bottom:10px; }
.rmain{ display:flex; gap:14px; }
.rmainleft{ min-width:110px; }
.ravgnum{ font-size:34px; font-weight:700; line-height:1; }
.ravgstars{ margin-top:6px; }

.rmaindist{ flex:1; }
.rdrow{ display:flex; align-items:center; gap:10px; margin:6px 0; }
.rdlabel{ width:34px; color:#444; font-size:12px; text-align:right; }
.rdbar{ position:relative; height:8px; flex:1; border-radius:999px; overflow:hidden; }
.rdbarbg{ position:absolute; inset:0; background:rgba(0,0,0,.06); }
.rdbarfg{ position:absolute; inset:0; width:0; background:rgba(255,140,0,.55); }

.rbtns{ display:flex; gap:10px; margin-top:12px; }
.rbtn{
  padding:8px 12px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:999px;
  background:#000;
  cursor:pointer;
}
.rbtn.on{ border-color: rgba(255,140,0,.7); }
.rbtn:disabled{ opacity:.5; cursor:not-allowed; }

.rshowcomments{ display:inline-block; margin-top:10px;font-size: 13px;color: rgba(0, 0, 0, .65);}

/* 弹窗 */
.rmodal{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.rmodalcard{
  width:100%;
  max-width:420px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 20px 50px rgba(0,0,0,.15);
  overflow:hidden;
}
.rmodaltop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:2px 14px;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.rmodaltitle{ font-weight:700; }
.rclose {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 8px 8px 8px;
    color: rgba(0, 0, 0, .6);
}
.rpick{ padding:14px; display:flex; gap:6px; justify-content:center; }
.rpickstar{
  font-size:38px;
  color:#ddd;
  cursor:pointer;
}
.rpickstar.on{ color: var(--rstar); }

.rcomment{
  width: calc(100% - 28px);
  margin:0 14px 10px 14px;
  height:90px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:10px;
  padding:10px;
  resize:none;
}
.ractions{
  padding:0 14px 14px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  justify-content: flex-end;
}
.rsubmit{
  padding:8px 14px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.1);
  background:#8ed1fc;
  cursor:pointer;
}
.rmsg{ color:#c00; font-size:12px; }

.rlogintext{ padding:14px; color:#333; }
.rloginbtn{
  display:inline-block;
  padding:8px 14px;
  border-radius:10px;
  background: var(--rstar);
  color:#fff;
  text-decoration:none;
}

/* 评语列表 */
.rcommentlist{ padding:14px; max-height:55vh; overflow:auto; }
.rcom{ border-bottom:1px solid rgba(0,0,0,.06); padding:10px 0; }
.rcom:last-child{ border-bottom:0; }
.rcomtop{ display:flex; gap:10px; align-items:flex-start; }
.rcomname{ font-weight:700; font-size:13px; }
.rcomstars{ display:flex; align-items:center; gap:8px; margin-top:4px; }
.rcomdate{ color:#777; font-size:12px; }
.rcomtxt{ margin-top:8px; color:#333; font-size:13px; line-height:1.5; }
.rempty{ padding:12px; color:#666; text-align:center; }

.rcommentpager, .rboardpager{ padding:10px 14px 14px 14px; }

/* 通用分页 */
.rpager{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.rpager a, .rpager span{
  display:inline-block;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:10px;
  text-decoration:none;
  font-size:12px;
}
.rpagernum.current{
  border-color: rgba(255,140,0,.7);
  font-weight:700;
}
.rpagerbtn.disabled{ opacity:.45; pointer-events:none; }

/* 榜单 */
.rboard{ border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:14px; background:#fff; }
.rfilters{ margin-bottom:10px; display:flex; flex-direction:column; gap:10px; }
.rfilterrow{ display:flex; gap:10px; align-items:flex-start; }
.rfilterlabel{ width:40px; font-weight:700; font-size:12px; color:#444; padding-top:3px; }
.rfilterchips{ display:flex; gap:8px; flex-wrap:wrap; }
.rchip{
  display:inline-block;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:999px;
  text-decoration:none;
  font-size:12px;
}
.rchip.on{ border-color: rgba(255,140,0,.7); }
.rboardrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.rboardrow:last-child{ border-bottom:0; }
.rboardscore{ display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.rboardnum{ font-weight:700; }
