/* =========================
   Random Recirculator - Final
   ========================= */

.rr{
  margin-top: 2.8rem;
  padding: 1.2rem 1.2rem 1.4rem;
  border-radius: 22px;

  /* Minimal Glass (base) */
  background: rgba(255,255,255,0.62); /* ←洗練A：少し透明寄りに */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255,255,255,0.35); /* ←洗練A：枠も少し弱めに */
  box-shadow:
    0 14px 40px rgba(0,0,0,0.18),
    0 1px 0 rgba(255,255,255,0.35) inset;
}

/* Head */
.rr__head{
  margin-bottom: 1rem;
}

.rr__title{
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(0,0,0,0.90);
  letter-spacing: 0.02em;

  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  margin: 0;
  padding: 0.25rem 0.1rem;
  background: none;
  border-radius: 0;
}

.rr__title::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.82);
  opacity: 0.25;
}

/* Grid */
.rr__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; /* ←洗練C：少し広げる */
}

/* Card */
.rr__card{
  display: block;
  text-decoration: none;

  border-radius: 18px;
  overflow: hidden;

  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.10);

  /* ←洗練B：影を弱める（“カード一覧感”を消す） */
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);

  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.rr__card:hover{
  transform: translateY(-2px);
  border-color: rgba(0,0,0,0.16);
  /* ←洗練B：hoverも上品に */
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.rr__thumb{
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.06);
  overflow: hidden;
}

.rr__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rr__cardTitle{
  padding: 0.7rem 0.85rem 0.8rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(0,0,0,0.86);
}

/* Controls */
.rr__controls{
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.05rem;
}

/* Icon Buttons */
.rr__iconBtn{
  width: 42px;
  height: 42px;
  border-radius: 999px;

  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.12);

  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  cursor: pointer;

  display: grid;
  place-items: center;

  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.rr__iconBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}

.rr__iconBtn:active{
  transform: translateY(0px) scale(0.97);
}

.rr__iconBtn:disabled{
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.rr__iconBtn svg{
  width: 21px;
  height: 21px;
  fill: rgba(0,0,0,0.78);
}

/* Status */
.rr__status{
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* タイトル高さを固定（2行で打ち切り） */
.rr__cardTitle{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: calc(1.45em * 2); /* line-height * 2行 */
}

/* ステータス領域の高さを確保（出ても出なくても高さ固定） */
.rr__status{
  min-height: 1.2em;
}

/* =========================
   RR: stable height (loading)
   ========================= */

/* ステータス領域の高さを常時予約し、表示の有無で伸縮させない */
.rr__status{
  min-height: 1.2em;          /* 1行分を固定 */
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 空のときも高さを維持しつつ、見た目だけ消す */
.rr__status:empty{
  visibility: hidden;         /* 공간은 유지 */
}

.rr.is-loading .rr__grid{
  opacity: 0.55;
  pointer-events: none;
}
