/* Room and personal record card layouts. */

/* v53 room / record mobile layout */
.room-summary-card{padding:18px}

.v53-room-list,.v53-record-list{
  display:grid;
  gap:14px;
}

.v53-room-card,.v53-record-card{
  display:grid;
  grid-template-columns:132px minmax(0,1fr);
  gap:16px;
  padding:16px;
  border-radius:28px;
  background:#fff;
  border:1px solid var(--v51-line);
  box-shadow:0 14px 36px rgba(22,36,65,.08);
  text-decoration:none;
  color:var(--v51-text);
}
.open-rooms-page .v53-room-card{
  position:relative;
  overflow:hidden;
  transition:transform .1s ease, border-color .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color:transparent;
}
.open-rooms-page .v53-room-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  transform:translateX(-75%);
  background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.68) 48%,transparent 72%);
}
.open-rooms-page .v53-room-card.is-pressing,
.open-rooms-page .v53-room-card:active{
  transform:translateY(2px) scale(.985);
  border-color:#c9d8f4;
  box-shadow:0 7px 18px rgba(22,36,65,.10);
}
.open-rooms-page .v53-room-card.is-entering{
  transform:scale(.985);
  border-color:#a9dfb5;
  box-shadow:0 8px 22px rgba(52,168,83,.14);
}
.open-rooms-page .v53-room-card.is-entering::after{
  opacity:1;
  animation:open-room-enter-sweep .12s ease-out both;
}
.open-rooms-page .v53-room-card.is-entering .v53-state-badge{
  background:#e4f7e7;
  border-color:#bde6c5;
  color:#238b3c;
}
@keyframes open-room-enter-sweep{
  to{transform:translateX(75%)}
}
@media (prefers-reduced-motion:reduce){
  .open-rooms-page .v53-room-card{transition:none}
  .open-rooms-page .v53-room-card.is-entering::after{animation:none}
}

.v53-room-thumb,.v53-record-thumb{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  background:linear-gradient(135deg,#edf3ff,#ffffff);
  min-height:132px;
}
.v53-record-thumb{min-height:96px}
.v53-room-thumb img,.v53-record-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.v53-room-thumb span,.v53-record-thumb span{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-size:34px;
  color:#fff;
}

.v53-room-card.theme-star .v53-room-thumb,
.v53-record-card.theme-star .v53-record-thumb{
  background:linear-gradient(135deg,#6b48ff 0%,#1ca8ff 100%);
}
.v53-room-card.theme-west .v53-room-thumb,
.v53-record-card.theme-west .v53-record-thumb{
  background:linear-gradient(135deg,#ffb04a 0%,#ff6b1c 100%);
}
.v53-room-card.theme-cube .v53-room-thumb,
.v53-record-card.theme-cube .v53-record-thumb{
  background:linear-gradient(135deg,#66c4ff 0%,#5a74ff 55%,#a65dff 100%);
}
.v53-room-card.theme-down .v53-room-thumb,
.v53-record-card.theme-down .v53-record-thumb{
  background:linear-gradient(135deg,#67e8f9 0%,#34d399 100%);
}
.v53-room-card.theme-flight .v53-room-thumb,
.v53-record-card.theme-flight .v53-record-thumb{
  background:linear-gradient(135deg,#7dd3fc 0%,#60a5fa 54%,#c084fc 100%);
}
.v53-room-card.theme-strike .v53-room-thumb{
  background:linear-gradient(135deg,#22c55e 0%,#0ea5e9 100%);
}
.open-rooms-page .v53-room-card.theme-strike .v53-room-thumb img{
  object-fit:contain;
  box-sizing:border-box;
  padding:4px;
}

.v53-room-body,.v53-record-body{
  min-width:0;
  display:grid;
  gap:12px;
}

.v53-room-top,.v53-record-body{
  align-items:start;
}
.v53-room-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.v53-room-title-area,.v53-record-main{min-width:0}
.v53-game-name{
  display:flex;
  align-items:center;
  gap:6px;
  color:#7f8ba2;
  font-size:13px;
  font-weight:900;
  letter-spacing:-.02em;
  margin-bottom:6px;
}
.v53-room-title-area h4,.v53-record-main h4{
  margin:0;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.04em;
  color:var(--v51-text);
  word-break:keep-all;
}
.v53-room-time{
  flex:0 0 auto;
  color:#7f8ba2;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
  padding-top:2px;
}

.v53-room-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.v53-state-badge,.v53-soft-badge,.v53-stat-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid #e5ebf6;
  background:#f7f9fd;
  color:#6f7b93;
  font-size:13px;
  font-weight:900;
  white-space:nowrap;
}
.v53-state-badge.state-open{background:#eef9ee;border-color:#d9efdc;color:#34a853}
.v53-state-badge.state-closed{background:#f2f4f8;border-color:#e0e5ee;color:#6f7b93}
.v53-state-badge.state-expired{background:#fff2f0;border-color:#ffd9d2;color:#d45845}

.v53-room-stat-line{
  display:grid;
  grid-template-columns:1fr 1px 1fr;
  gap:14px;
  align-items:center;
  min-height:52px;
  padding:0 16px;
  border-radius:18px;
  border:1px solid #e6edf7;
  background:#fff;
}
.v53-stat-divider{
  width:1px;
  height:22px;
  background:#e4e9f2;
}
.v53-stat-chip{
  justify-content:flex-start;
  padding:0;
  border:0;
  min-height:auto;
  background:transparent;
  font-size:14px;
}

.v53-room-bottom{
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px;
  align-items:end;
}
.v53-room-mini-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.v53-room-mini-grid > div{
  padding:10px 12px;
  border-radius:16px;
  border:1px solid #e6edf7;
  background:#f8fafd;
}
.v53-room-mini-grid span{
  display:block;
  margin-bottom:3px;
  color:#8b97ad;
  font-size:11px;
  font-weight:700;
}
.v53-room-mini-grid b{
  display:block;
  font-size:15px;
  line-height:1.2;
  color:var(--v51-text);
}

.v53-room-actions{
  display:flex;
  gap:10px;
  align-items:center;
}
.v53-action-btn{
  min-width:88px;
  height:46px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid #e2e8f4;
  background:#fff;
  color:#68758d;
  font-size:15px;
  font-weight:900;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 22px rgba(22,36,65,.06);
}
.v53-action-btn.primary{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#a855f7,#7b3bed);
  box-shadow:0 14px 24px rgba(123,59,237,.22);
}
.v53-room-card.theme-west .v53-action-btn.primary{
  background:linear-gradient(135deg,#ffb347,#ff7b22);
  box-shadow:0 14px 24px rgba(255,123,34,.22);
}
.v53-room-card.theme-cube .v53-action-btn.primary{
  background:linear-gradient(135deg,#59bfff,#3387ff);
  box-shadow:0 14px 24px rgba(51,135,255,.22);
}
.v53-room-card.theme-down .v53-action-btn.primary{
  background:linear-gradient(135deg,#67e8f9,#34d399);
  box-shadow:0 14px 24px rgba(52,211,153,.22);
}

.v53-record-card{
  grid-template-columns:150px minmax(0,1fr);
  align-items:center;
}
.v53-record-body{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
}
.v53-record-sub{
  color:#7f8ba2;
  font-size:14px;
  line-height:1.45;
}
.v53-record-side{
  flex:0 0 auto;
  min-width:96px;
  text-align:right;
  padding-left:16px;
  border-left:1px solid #e7ecf5;
}
.v53-record-side b{
  display:block;
  margin-bottom:8px;
  font-size:20px;
  line-height:1.05;
  letter-spacing:-.03em;
  color:var(--v51-text);
  white-space:nowrap;
}
.v53-record-side span{
  display:block;
  color:#8793a8;
  font-size:13px;
  line-height:1.45;
}

@media (max-width: 560px){
  .room-summary-card{padding:15px}
  .v53-room-list,.v53-record-list{gap:12px}

  .v53-room-card,.v53-record-card{
    grid-template-columns:104px minmax(0,1fr);
    gap:12px;
    padding:12px;
    border-radius:24px;
  }
  .v53-room-thumb,.v53-record-thumb{
    min-height:104px;
    border-radius:18px;
  }
  .v53-record-thumb{min-height:86px}
  .v53-room-thumb span,.v53-record-thumb span{font-size:26px}

  .v53-game-name{
    font-size:11px;
    margin-bottom:5px;
  }
  .v53-room-title-area h4,.v53-record-main h4{
    font-size:16px;
    line-height:1.2;
  }
  .v53-room-time{
    font-size:11px;
    padding-top:1px;
  }

  .v53-room-badges{
    gap:6px;
  }
  .v53-state-badge,.v53-soft-badge,.v53-stat-chip{
    min-height:28px;
    padding:0 9px;
    border-radius:12px;
    font-size:11px;
  }

  .v53-room-stat-line{
    min-height:42px;
    padding:0 12px;
    gap:10px;
    border-radius:15px;
  }
  .v53-stat-divider{
    height:18px;
  }
  .v53-stat-chip{
    font-size:12px;
  }

  .v53-room-bottom{
    grid-template-columns:1fr;
    gap:10px;
  }
  .v53-room-mini-grid{
    gap:8px;
  }
  .v53-room-mini-grid > div{
    padding:9px 10px;
    border-radius:14px;
  }
  .v53-room-mini-grid span{
    font-size:10px;
  }
  .v53-room-mini-grid b{
    font-size:13px;
  }
  .v53-room-actions{
    gap:8px;
  }
  .v53-action-btn{
    flex:1 1 auto;
    min-width:0;
    height:42px;
    padding:0 12px;
    font-size:14px;
  }

  .v53-record-card{
    grid-template-columns:86px minmax(0,1fr);
  }
  .v53-record-body{
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
  }
  .v53-record-sub{
    font-size:12px;
  }
  .v53-record-side{
    min-width:74px;
    padding-left:10px;
  }
  .v53-record-side b{
    margin-bottom:6px;
    font-size:17px;
  }
  .v53-record-side span{
    font-size:11px;
    line-height:1.35;
  }
}

@media (max-width: 400px){
  .v53-room-card{
    grid-template-columns:1fr;
  }
  .v53-room-thumb{
    min-height:116px;
  }
  .v53-record-card{
    grid-template-columns:78px minmax(0,1fr);
    gap:10px;
  }
  .v53-record-side b{
    font-size:16px;
  }
}


/* v55: 만든 방 / 내 기록 모바일 전용 구조안 적용
   - 방 만들기: 1200x720 가로 배너 유지
   - 만든 방/내 기록: 512x512 게임 아이콘 우선 사용, 정사각형 표시
*/
.v53-room-card{
  grid-template-columns:88px minmax(0,1fr);
  gap:12px;
  padding:14px;
  border-radius:24px;
  align-items:start;
}
.v53-room-thumb{
  width:88px;
  min-height:88px;
  aspect-ratio:1/1;
  border-radius:20px;
  align-self:start;
}
.v53-room-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.v53-room-body{
  gap:8px;
}
.v53-room-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:start;
}
.v53-game-name{
  font-size:11px;
  margin-bottom:4px;
}
.v53-room-title-area h4{
  font-size:16px;
  line-height:1.18;
  max-width:100%;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.v53-room-time{
  font-size:11px;
  max-width:86px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v53-room-badges{
  display:flex;
  flex-wrap:nowrap;
  overflow-x:auto;
  gap:6px;
  scrollbar-width:none;
}
.v53-room-badges::-webkit-scrollbar{display:none}
.v53-state-badge,.v53-soft-badge{
  min-height:25px;
  padding:0 8px;
  border-radius:999px;
  font-size:10.5px;
  flex:0 0 auto;
}
.v53-room-stat-line{
  min-height:36px;
  padding:0 10px;
  gap:8px;
  border-radius:14px;
}
.v53-stat-chip{
  font-size:11.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v53-room-mini-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.v53-room-mini-grid > div{
  padding:8px 9px;
  border-radius:13px;
}
.v53-room-mini-grid span{
  font-size:9.5px;
}
.v53-room-mini-grid b{
  font-size:12.5px;
}
.v53-room-bottom{
  grid-template-columns:1fr;
  gap:8px;
}
.v53-room-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.v53-action-btn{
  height:39px;
  min-width:0;
  font-size:13px;
  padding:0 10px;
}

/* 기록은 썸네일보다 기록 수치가 주인공이 되도록 더 컴팩트하게 */
.v53-record-card{
  grid-template-columns:72px minmax(0,1fr);
  gap:11px;
  padding:12px;
  border-radius:22px;
  min-height:96px;
}
.v53-record-thumb{
  width:72px;
  min-height:72px;
  aspect-ratio:1/1;
  border-radius:17px;
  align-self:center;
}
.v53-record-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.v53-record-body{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
}
.v53-record-main h4{
  font-size:15px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v53-record-sub{
  font-size:11.5px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v53-record-side{
  min-width:66px;
  padding-left:8px;
}
.v53-record-side b{
  font-size:16px;
  margin-bottom:5px;
}
.v53-record-side span{
  font-size:10px;
  line-height:1.35;
}

@media (max-width:400px){
  .v53-room-card{
    grid-template-columns:80px minmax(0,1fr);
    padding:12px;
  }
  .v53-room-thumb{width:80px;min-height:80px;border-radius:18px}
  .v53-room-title-area h4{font-size:15px}
  .v53-room-time{display:none}
  .v53-record-card{
    grid-template-columns:64px minmax(0,1fr);
  }
  .v53-record-thumb{width:64px;min-height:64px}
  .v53-record-side b{font-size:15px}
}

/* Made rooms: concise list cards */
.v53-room-card{
  grid-template-columns:96px minmax(0,1fr);
  gap:14px;
  align-items:stretch;
  padding:14px;
}
.v53-room-thumb{
  width:96px;
  min-height:96px;
  aspect-ratio:1/1;
  border-radius:20px;
}
.v53-room-body{
  display:grid;
  grid-template-rows:auto auto 1fr;
  gap:10px;
  min-width:0;
}
.v53-room-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:start;
}
.v53-room-title-area h4{
  font-size:17px;
  line-height:1.22;
}
.v53-state-badge{
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
}
.v53-room-dates{
  display:flex;
  flex-wrap:wrap;
  gap:4px 10px;
  color:#728098;
  font-size:12px;
  line-height:1.35;
}
.v53-room-dates span{
  color:#68758d;
  font-weight:500;
  white-space:nowrap;
}
.open-rooms-page .open-room-top-record{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#68758d;
  font-size:10.5px;
  font-weight:600;
  line-height:1.3;
  white-space:nowrap;
}
.open-rooms-page .open-room-summary{
  margin-top:auto;
  color:#6f7b90;
  font-size:10.5px;
  font-weight:500;
  line-height:1.3;
  letter-spacing:-.02em;
  white-space:nowrap;
}
.open-rooms-page .v53-room-body{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.open-rooms-page .v53-game-name{
  margin-bottom:0;
  font-size:12px;
  font-weight:600;
}
.open-rooms-page .open-room-timing{
  color:#526078;
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
  letter-spacing:-.02em;
  white-space:nowrap;
}
.open-rooms-page .v53-state-badge{
  min-height:18px;
  padding:0 6px;
  font-size:9px;
  font-weight:600;
}
.open-rooms-page .page-head h2,
.open-rooms-page .section-title h3{
  font-weight:700;
}
.v53-room-dates b{
  margin-right:3px;
  color:#4f63d7;
  font-size:13px;
  font-weight:900;
}
.v53-room-dates span:nth-child(2) b{
  color:#e06b2f;
}
.v53-room-actions{
  align-self:end;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.v53-action-btn{
  height:40px;
  min-width:0;
  border-radius:14px;
  font-size:14px;
}

@media (max-width:420px){
  .v53-room-card{
    grid-template-columns:88px minmax(0,1fr);
    gap:12px;
    padding:12px;
  }
  .v53-room-thumb{
    width:88px;
    min-height:88px;
    border-radius:18px;
  }
  .v53-game-name{
    font-size:10.5px;
  }
  .v53-room-title-area h4{
    font-size:15px;
  }
  .v53-state-badge{
    min-height:24px;
    padding:0 8px;
    font-size:10.5px;
  }
  .v53-room-dates{
    gap:3px 8px;
    font-size:10.5px;
  }
  .v53-action-btn{
    height:38px;
    font-size:13px;
  }
}
