.rooms-page { padding-bottom: var(--content-bottom); }

.hero {
  position: relative;
  height: 296px;
  overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--page-gutter) 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-art {
  position: absolute;
  inset: -8% -4% -22%;
  background: url("/static/assets/cover-hero.svg") center 34% / cover no-repeat;
  transform: scale(1.02);
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,5,6,0.72) 0%, rgba(5,5,6,0.08) 62%, rgba(5,5,6,0.3) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.36) 0%, transparent 28%, rgba(13,13,15,0.28) 72%, var(--bg) 100%);
}
.utility-row, .hero-heading { position: relative; z-index: 1; }

.hero-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.hero-heading h1 {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.hero-sub { margin-top: 7px; color: var(--text-muted); font-size: 12px; }
.rules-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  background: rgba(8,8,10,0.6);
  color: #ddd5d2;
  font-size: 11px;
  white-space: nowrap;
}
.rules-capsule .icon { width: 14px; height: 14px; }

.rooms-content { padding: 4px var(--page-gutter) 0; }
.create-room { min-height: 56px; }

.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  margin-top: 12px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid rgba(212,172,91,0.34);
  border-radius: var(--card-radius);
  background: linear-gradient(120deg, rgba(54,40,22,0.5), rgba(20,19,20,0.92));
}
.promo-copy { display: grid; gap: 4px; min-width: 0; }
.promo-copy strong { font-size: 14px; font-weight: 650; }
.promo-copy small { color: var(--text-muted); font-size: 11px; }
.promo-copy em { color: var(--gold); font-style: normal; }
.promo > .icon { width: 17px; height: 17px; color: var(--gold); }

.room-list { display: grid; gap: 12px; }
.room-card {
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.room-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.room-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4,4,5,0.96) 0%, rgba(4,4,5,0.78) 42%, rgba(4,4,5,0.12) 100%),
              linear-gradient(0deg, rgba(4,4,5,0.72), transparent 55%);
}
.room-card-top, .room-card-body, .room-card-meta { position: absolute; z-index: 1; }
.room-card-top { top: 12px; left: 13px; right: 12px; display: flex; align-items: center; gap: 7px; }
.mode-mark {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232,128,153,0.5);
  border-radius: 50%;
  color: var(--accent-text);
}
.mode-mark .icon { width: 12px; height: 12px; }
.genre { color: var(--accent-text); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.room-card-top .live-badge { margin-left: auto; }
.room-card-body { left: 13px; right: 13px; top: 45px; }
.room-card-body h3 {
  max-width: 90%;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.host-line { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--text-muted); font-size: 12px; }
.room-card-meta {
  left: 13px;
  right: 13px;
  bottom: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d8cfc9;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.room-card-meta span:last-child { display: flex; align-items: center; gap: 5px; }
.room-card-meta .icon { width: 13px; height: 13px; }

.recent-section { margin-top: 40px; }
.recent-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  white-space: nowrap;
}
.recent-title .icon { width: 14px; height: 14px; color: var(--accent-text); }
.recent-rule { flex: 1; height: 1px; background: var(--border); }
.recent-list { margin-top: 10px; }
.closed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 13px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: transparent;
}
.closed-row:first-child { border-top: 0; }
.closed-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 12px;
}
.closed-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.closed-name {
  overflow: hidden;
  color: #e8e1de;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.closed-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.closed-host, .closed-meta time { color: #8e8785; }
.closed-meta .mode-family, .closed-meta .mode-sponsor, .closed-meta .mode-test { color: var(--accent-text); }
.closed-meta .mode-werewolf { color: #b39ae8; }
.closed-meta time { overflow: hidden; text-overflow: ellipsis; }
.closed-row .demo-badge {
  flex: none;
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  color: #9a9391;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.closed-stats { flex: none; display: grid; gap: 2px; justify-items: end; }
.closed-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9a9391;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.closed-stat .icon { width: 13px; height: 13px; }
.closed-stat b { color: #d6cfcc; font-size: 12px; font-weight: 650; }

@media (max-width: 370px) {
  .hero { height: 282px; padding-inline: 12px; }
  .hero-heading h1 { font-size: 38px; }
  .rules-capsule { font-size: 10px; padding: 0 8px; }
  .utility-row { gap: 6px; }
  .utility-actions { gap: 5px; }
  .square-button { width: 34px; height: 34px; }
  .balance-pill { gap: 6px; padding: 6px 8px; }
  .balance-line small { display: none; }
  .rooms-content { padding-inline: 12px; }
}

@media (min-width: 768px) {
  .hero { height: 310px; padding-inline: 40px; }
  .hero-heading h1 { font-size: 48px; }
  .rooms-content { max-width: 1040px; margin: 0 auto; padding-inline: 0; }
  .room-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-card { height: 158px; }
}
