/* =====================================================
   룸메이트 스타일 - 토스 디자인 시스템
   ===================================================== */

/* 토스 컬러 팔레트 */
:root {
  --toss-blue: #3182f6;
  --toss-blue-light: #4990f7;
  --toss-blue-dark: #1b64da;
  --toss-blue-50: #e8f3ff;
  --toss-blue-100: #c9e2ff;
  --toss-gray-50: #f9fafb;
  --toss-gray-100: #f2f4f6;
  --toss-gray-200: #e5e8eb;
  --toss-gray-300: #d1d6db;
  --toss-gray-400: #b0b8c1;
  --toss-gray-500: #8b95a1;
  --toss-gray-600: #6b7684;
  --toss-gray-700: #4e5968;
  --toss-gray-800: #333d4b;
  --toss-gray-900: #191f28;
  --toss-red: #f04452;
  --toss-red-light: #ff6b6b;
  --toss-green: #30c85e;
  --toss-green-light: #e8f9ed;
  --toss-orange: #f59f00;
  --toss-orange-light: #fff5e5;
}

/* =====================================================
   공통 컴포넌트
   ===================================================== */

/* 페이지 헤더 */
.roommate-page-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--toss-gray-100);
  margin-bottom: 24px;
}

.roommate-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0 0 8px 0;
}

.roommate-page-header p {
  font-size: 15px;
  color: var(--toss-gray-600);
  margin: 0;
}

/* 필터 바 - product.html과 동일한 스타일 */
.roommate-filter-bar {
  display: flex;
  gap: 10px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.roommate-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #f9fafb;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #4e5968;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  background: #e5e8eb;
  color: #191f28;
}

.filter-chip:active {
  transform: scale(0.96);
}

.filter-chip.active {
  background: #3182f6;
  color: #fff;
}

.filter-chip.active:hover {
  background: #1b64da;
}

.filter-chip i {
  font-size: 12px;
}

/* =====================================================
   룸메이트 리스트 (토스 프로덕션 스타일)
   ===================================================== */

.roommate-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

/* ===== 리스트 아이템 ===== */
.roommate-card {
  display: flex;
  /* align-items: stretch (기본값) - 이미지가 상하 꽉 참 */
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.roommate-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
  transition: border-color 0.25s ease;
}

.roommate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.roommate-card:hover::before {
  border-color: rgba(49, 130, 246, 0.2);
}

.roommate-card:active {
  transform: scale(0.995);
}

/* ===== 썸네일 이미지 (카드 높이에 맞춤) ===== */
.roommate-card-image {
  position: relative;
  width: 140px;
  min-width: 140px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8f9fa;
  /* border-radius 제거 - 카드 overflow:hidden이 처리 */
}

.roommate-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.roommate-card:hover .roommate-card-image img {
  transform: scale(1.05);
}

/* 이미지 플레이스홀더 */
.roommate-card-image .placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #f0f4ff 0%, #e8eef9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roommate-card-image .placeholder-image i {
  font-size: 36px;
  color: #c5d0e6;
}

/* 이미지 오버레이 (그라데이션) */
.roommate-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
  pointer-events: none;
}

/* ===== 상태 배지 ===== */
.roommate-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.roommate-status-badge.recruiting {
  background: #3182f6;
  color: #fff;
}

.roommate-status-badge.early-start {
  background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
  color: #fff;
}

.roommate-status-badge.full {
  background: #30c85e;
  color: #fff;
}

.roommate-status-badge.closed {
  background: #8b95a1;
  color: #fff;
}

/* ===== D-Day 배지 (콘텐츠 헤더 우측) ===== */
.roommate-dday-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #191f28;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-left: auto;
  white-space: nowrap;
}

.roommate-dday-badge.urgent {
  background: #f04452;
  animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ===== 콘텐츠 영역 ===== */
.roommate-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  min-width: 0;
}

/* 헤더: 카테고리 + 위치 */
.roommate-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.roommate-card-type {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: -0.2px;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.roommate-card-location {
  display: block;
  font-size: 16px;
  color: #8b95a1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

/* 제목 */
.roommate-card-title {
  font-size: 20px;
  font-weight: 500;
  color: #191f28;
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  flex: 1;
  min-width: 0;
}

/* ===== 진행률 섹션 ===== */
.roommate-progress-section {
  margin-top: 12px;
}

.roommate-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.roommate-count-text {
  font-size: 13px;
  color: #4e5968;
  font-weight: 500;
}

.roommate-count-text .roommate-count-number {
  color: #3182f6;
  font-weight: 700;
}

.roommate-percent-text {
  font-size: 13px;
  color: #3182f6;
  font-weight: 700;
}

.roommate-progress-bar {
  height: 8px;
  background: #f2f4f6;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.roommate-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182f6 0%, #6bb3ff 100%);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.roommate-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.roommate-progress-fill.high {
  background: linear-gradient(90deg, #30c85e 0%, #5fd87b 100%);
}

.roommate-progress-fill.warning {
  background: linear-gradient(90deg, #ff9500 0%, #ffb84d 100%);
}

/* 푸터: 가격 섹션 (우측 정렬) */
.roommate-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.roommate-footer-text {
  font-size: 18px;
  font-weight: 500;
  color: #191f28;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.roommate-count-number {
  color: #3182f6;
  font-weight: 700;
}

/* 가격 텍스트 (할인율 + 가격) */
.roommate-price-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.roommate-discount-rate {
  color: #f04452;
  font-size: 18px;
  font-weight: 500;
}

/* 가격 섹션 (할인가 + 정가) */
.roommate-price-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.roommate-original-price {
  font-size: 16px;
  font-weight: 400;
  color: #8b95a1;
  text-decoration: line-through;
}

/* =====================================================
   상세 페이지 스타일
   ===================================================== */

/* 이미지 슬라이더 */
.roommate-detail-images {
  position: relative;
  height: 320px;
  background: var(--toss-gray-100);
  overflow: hidden;
}

.roommate-detail-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-nav-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-nav-btn.prev { left: 16px; }
.image-nav-btn.next { right: 16px; }

.image-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.image-indicator span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.image-indicator span.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* 상세 정보 섹션 */
.roommate-detail-content {
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.roommate-detail-header {
  margin-bottom: 24px;
}

.roommate-detail-type {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--toss-blue);
  background: var(--toss-blue-50);
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.roommate-detail-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.roommate-detail-location {
  font-size: 15px;
  color: var(--toss-gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 펀딩 진행 현황 카드 */
.roommate-funding-card {
  background: linear-gradient(135deg, var(--toss-blue), var(--toss-blue-dark));
  border-radius: 20px;
  padding: 24px;
  color: #fff;
  margin-bottom: 24px;
}

.funding-progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

.funding-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.funding-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.funding-stat {
  text-align: center;
}

.funding-stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.funding-stat-label {
  font-size: 13px;
  opacity: 0.8;
}

.funding-deadline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 14px;
}

.funding-deadline i {
  font-size: 16px;
}

/* 얼리스타트 배너 */
.early-start-banner {
  background: linear-gradient(135deg, var(--toss-orange), #ff8c00);
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.early-start-banner i {
  font-size: 24px;
}

.early-start-banner-content h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
}

.early-start-banner-content p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

/* 정보 섹션 */
.roommate-info-section {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--toss-gray-100);
}

.roommate-info-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--toss-gray-900);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roommate-info-section h3 i {
  color: var(--toss-blue);
}

/* 정보 그리드 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item-label {
  font-size: 13px;
  color: var(--toss-gray-500);
}

.info-item-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--toss-gray-900);
}

/* 편의시설 태그 */
.amenity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--toss-gray-50);
  border-radius: 8px;
  font-size: 13px;
  color: var(--toss-gray-700);
}

.amenity-tag i {
  color: var(--toss-blue);
}

/* 참여자 섹션 */
.participants-section {
  margin-bottom: 24px;
}

.participants-avatars {
  display: flex;
  gap: -8px;
}

.participant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--toss-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--toss-gray-500);
  margin-left: -8px;
}

.participant-avatar:first-child {
  margin-left: 0;
}

.participant-avatar.empty {
  background: var(--toss-gray-100);
  border-style: dashed;
  border-color: var(--toss-gray-300);
}

.participant-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* =====================================================
   하단 고정 CTA
   ===================================================== */

.roommate-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 16px 24px;
  border-top: 1px solid var(--toss-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.cta-price-info {
  flex: 1;
}

.cta-price-label {
  font-size: 13px;
  color: var(--toss-gray-500);
  margin-bottom: 2px;
}

.cta-price-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

.cta-price-value span {
  font-size: 14px;
  font-weight: 400;
  color: var(--toss-gray-500);
}

.btn-join-roommate {
  flex: 1;
  max-width: 200px;
  padding: 16px 32px;
  background: var(--toss-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-join-roommate:hover {
  background: var(--toss-blue-dark);
}

.btn-join-roommate:disabled {
  background: var(--toss-gray-300);
  cursor: not-allowed;
}

.btn-join-roommate.joined {
  background: var(--toss-gray-100);
  color: var(--toss-gray-600);
}

/* =====================================================
   등록 폼 스타일
   ===================================================== */

.roommate-form {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
}

.form-section {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--toss-gray-100);
}

.form-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--toss-gray-900);
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title i {
  color: var(--toss-blue);
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--toss-gray-700);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--toss-red);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--toss-gray-50);
  border: 1px solid var(--toss-gray-200);
  border-radius: 12px;
  font-size: 15px;
  color: var(--toss-gray-900);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--toss-blue);
  background: #fff;
  box-shadow: 0 0 0 3px var(--toss-blue-50);
}

.form-input::placeholder {
  color: var(--toss-gray-400);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 13px;
  color: var(--toss-gray-500);
  margin-top: 6px;
}

/* 인원/가격 입력 */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.input-with-unit {
  position: relative;
}

.input-with-unit .form-input {
  padding-right: 50px;
}

.input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--toss-gray-500);
}

/* 토글 스위치 */
.form-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--toss-gray-50);
  border-radius: 12px;
}

.toggle-label {
  font-size: 15px;
  color: var(--toss-gray-800);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--toss-gray-300);
  border-radius: 28px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--toss-blue);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* 이미지 업로드 */
.image-upload-area {
  border: 2px dashed var(--toss-gray-300);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-upload-area:hover {
  border-color: var(--toss-blue);
  background: var(--toss-blue-50);
}

.image-upload-area i {
  font-size: 48px;
  color: var(--toss-gray-400);
  margin-bottom: 16px;
}

.image-upload-area p {
  font-size: 15px;
  color: var(--toss-gray-600);
  margin: 0 0 8px 0;
}

.image-upload-area span {
  font-size: 13px;
  color: var(--toss-gray-400);
}

/* 제출 버튼 */
.form-submit-section {
  padding: 24px;
  background: #fff;
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--toss-gray-100);
}

.btn-submit {
  width: 100%;
  padding: 18px;
  background: var(--toss-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background: var(--toss-blue-dark);
}

.btn-submit:disabled {
  background: var(--toss-gray-300);
  cursor: not-allowed;
}

/* =====================================================
   내 참여 현황 페이지
   ===================================================== */

.my-roommate-tabs {
  display: flex;
  border-bottom: 1px solid var(--toss-gray-200);
  margin-bottom: 24px;
}

.my-roommate-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--toss-gray-500);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.my-roommate-tab.active {
  color: var(--toss-blue);
}

.my-roommate-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--toss-blue);
}

.my-roommate-tab .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--toss-gray-200);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

.my-roommate-tab.active .badge {
  background: var(--toss-blue);
  color: #fff;
}

/* 참여 상태 카드 */
.my-roommate-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--toss-gray-100);
}

.my-roommate-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.my-roommate-status {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.my-roommate-status.pending {
  background: var(--toss-orange-light);
  color: var(--toss-orange);
}

.my-roommate-status.approved {
  background: var(--toss-green-light);
  color: var(--toss-green);
}

.my-roommate-status.contracted {
  background: var(--toss-blue-50);
  color: var(--toss-blue);
}

.my-roommate-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--toss-gray-900);
  margin: 0 0 8px 0;
}

.my-roommate-card-info {
  font-size: 14px;
  color: var(--toss-gray-600);
  display: flex;
  gap: 16px;
}

/* =====================================================
   반응형
   ===================================================== */

@media (max-width: 768px) {
  /* 리스트 그리드 */
  .roommate-grid {
    gap: 12px;
  }

  /* 리스트 아이템 - 모바일 조정 */
  .roommate-card {
    border-radius: 16px;
  }

  .roommate-card::before {
    border-radius: 16px;
  }

  .roommate-card-image {
    width: 110px;
    min-width: 110px;
  }

  .roommate-card-image .placeholder-image i {
    font-size: 28px;
  }

  .roommate-status-badge {
    padding: 4px 8px;
    font-size: 10px;
    top: 8px;
    left: 8px;
    border-radius: 5px;
  }

  .roommate-dday-badge {
    padding: 3px 7px;
    font-size: 10px;
    bottom: 8px;
    left: 8px;
    border-radius: 5px;
  }

  .roommate-card-content {
    padding: 14px 14px;
  }

  .roommate-card-header {
    margin-bottom: 6px;
    gap: 8px;
  }

  .roommate-card-type {
    font-size: 10px;
    padding: 4px 8px;
    bottom: 8px;
    left: 8px;
  }

  .roommate-dday-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .roommate-card-location {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .roommate-card-title {
    font-size: 16px;
  }

  .roommate-progress-section {
    margin-top: 10px;
  }

  .roommate-progress-bar {
    height: 6px;
    margin-bottom: 8px;
  }

  .roommate-footer-text {
    font-size: 14px;
  }

  .roommate-discount-rate {
    font-size: 14px;
  }

  .roommate-original-price {
    font-size: 12px;
  }

  .roommate-detail-images {
    height: 240px;
  }

  .roommate-funding-card {
    border-radius: 0;
    margin: 0 -24px 24px;
    padding: 24px;
  }

  .funding-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .funding-stat {
    flex: 1;
    min-width: 80px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .roommate-cta-bar {
    padding: 12px 16px;
    gap: 12px;
  }

  .cta-price-value {
    font-size: 18px;
  }

  .btn-join-roommate {
    padding: 14px 24px;
    font-size: 15px;
  }
}

/* =====================================================
   빈 상태 (토스 프로덕션 스타일)
   ===================================================== */

.empty-state {
  text-align: center;
  padding: 80px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.empty-state-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0f4ff 0%, #e8eef9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.empty-state-icon i,
.empty-state > i {
  font-size: 44px;
  color: #b8c9e8;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #191f28;
  margin: 0 0 10px 0;
  letter-spacing: -0.3px;
}

.empty-state p {
  font-size: 15px;
  color: #8b95a1;
  margin: 0 0 28px 0;
  line-height: 1.5;
}

.empty-state-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #3182f6;
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.25);
}

.empty-state-action:hover {
  background: #1b64da;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 130, 246, 0.35);
}

.empty-state-action:active {
  transform: scale(0.98);
}

.empty-state-action i {
  font-size: 14px;
  color: inherit;
}

/* =====================================================
   로딩 상태
   ===================================================== */

/* 스켈레톤 리스트 아이템 */
.roommate-card.skeleton {
  pointer-events: none;
}

.roommate-card.skeleton .roommate-card-image,
.skeleton-image {
  background: linear-gradient(90deg, var(--toss-gray-100) 25%, var(--toss-gray-50) 50%, var(--toss-gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-line {
  background: linear-gradient(90deg, var(--toss-gray-100) 25%, var(--toss-gray-50) 50%, var(--toss-gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 120px;
  border-radius: 16px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

/* =====================================================
   모달
   ===================================================== */

.roommate-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.roommate-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.roommate-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: calc(100% - 48px);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.roommate-modal-overlay.active .roommate-modal {
  transform: translateY(0);
}

.roommate-modal-header {
  padding: 24px 24px 0;
}

.roommate-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0;
}

.roommate-modal-body {
  padding: 24px;
}

.roommate-modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
}

.btn-modal-cancel {
  flex: 1;
  padding: 14px;
  background: var(--toss-gray-100);
  color: var(--toss-gray-700);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-modal-confirm {
  flex: 1;
  padding: 14px;
  background: var(--toss-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* =====================================================
   룸메이트 상세 페이지 - Product Detail 스타일 호환
   ===================================================== */

/* 룸메이트 배지 (인라인) */
.roommate-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.roommate-badge.recruiting {
  background: var(--toss-blue-50);
  color: var(--toss-blue);
}

.roommate-badge.early-start {
  background: var(--toss-orange-light);
  color: var(--toss-orange);
}

.roommate-badge.full {
  background: var(--toss-green-light);
  color: var(--toss-green);
}

.roommate-badge.closed {
  background: var(--toss-gray-100);
  color: var(--toss-gray-500);
}

/* 참여자 카드 (사이드바) */
.participants-card {
  background: var(--toss-gray-50);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.participants-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-800);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.participants-title i {
  color: var(--toss-blue);
}

.participants-title span {
  color: var(--toss-gray-500);
  font-weight: 400;
}

/* 모바일 가격 카드 */
.price-card-mobile {
  background: var(--toss-gray-50);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.price-row-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.price-row-mobile:not(:last-child) {
  border-bottom: 1px solid var(--toss-gray-200);
}

.price-row-mobile .price-label {
  font-size: 14px;
  color: var(--toss-gray-600);
}

.price-row-mobile .price-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--toss-gray-900);
}

.price-row-mobile .price-value.highlight {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-blue);
}

.price-row-mobile.main-price {
  padding: 12px 0;
}

/* 모바일 참여자 아바타 */
.participants-avatars-mobile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 채팅 프리뷰 카드 */
.chat-preview-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--toss-gray-200);
}

.chat-preview-card .chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chat-preview-card .chat-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--toss-gray-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-preview-card .chat-header h3 i {
  color: var(--toss-blue);
}

.chat-preview-card .chat-count {
  background: var(--toss-blue);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.chat-preview-card .chat-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--toss-gray-500);
}

.chat-preview-card .chat-empty i {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
  color: var(--toss-gray-300);
}

.chat-preview-card .chat-empty p {
  margin: 0;
  font-size: 14px;
}

.chat-preview-card .btn-join-chat {
  width: 100%;
  padding: 14px;
  background: var(--toss-gray-100);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--toss-gray-700);
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
}

.chat-preview-card .btn-join-chat:hover:not(:disabled) {
  background: var(--toss-gray-200);
}

.chat-preview-card .btn-join-chat:disabled {
  cursor: not-allowed;
}

/* 모바일 섹션 스타일 */
.section-participants,
.section-chat {
  padding: 24px 20px;
  border-bottom: 1px solid var(--toss-gray-100);
}

.section-participants .section-title,
.section-chat h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0 0 16px 0;
}

/* 모바일 위치 섹션 - border-bottom 제거 (8px 구분선과 중복) */
.section-location {
  padding: 24px 20px;
}

.location-map-mobile {
  height: 200px;
  background: var(--toss-gray-100);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.location-map-mobile .map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f3ff, #f2f4f6);
  cursor: pointer;
}

.location-map-mobile .map-placeholder i {
  font-size: 32px;
  color: var(--toss-blue);
  margin-bottom: 8px;
}

.location-map-mobile .map-placeholder span {
  font-size: 14px;
  color: var(--toss-gray-600);
}

.location-address-mobile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.location-address-mobile > i {
  color: var(--toss-blue);
  font-size: 16px;
  margin-top: 2px;
}

.location-address-mobile .address-text p {
  margin: 0;
  font-size: 15px;
  color: var(--toss-gray-800);
  line-height: 1.5;
}

.location-address-mobile .address-text .address-sub {
  font-size: 13px;
  color: var(--toss-gray-500);
  margin-top: 4px;
}

/* 모바일 하단 CTA 바 */
.sticky-cta-bar.mobile-tablet-only {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 20px;
  border-top: 1px solid var(--toss-gray-100);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.sticky-cta-bar .cta-price-info {
  display: flex;
  flex-direction: column;
}

.sticky-cta-bar .cta-price-label {
  font-size: 12px;
  color: var(--toss-gray-500);
}

.sticky-cta-bar .cta-price-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

.sticky-cta-bar .cta-price-value small {
  font-size: 14px;
  font-weight: 400;
  color: var(--toss-gray-500);
}

.sticky-cta-bar .cta-btn-primary {
  flex: 1;
  max-width: 180px;
  padding: 14px 24px;
  background: var(--toss-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sticky-cta-bar .cta-btn-primary:hover:not(:disabled) {
  background: var(--toss-blue-dark);
}

.sticky-cta-bar .cta-btn-primary:disabled,
.sticky-cta-bar .cta-btn-primary.disabled {
  background: var(--toss-gray-300);
  cursor: not-allowed;
}

/* 하단 시트 오버레이 */
.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 0 calc(env(safe-area-inset-bottom) + 24px);
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--toss-gray-200);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.bottom-sheet-content {
  padding: 0 20px;
}

.bottom-sheet-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--toss-gray-100);
  font-size: 16px;
  color: var(--toss-gray-800);
  cursor: pointer;
}

.bottom-sheet-option:last-child {
  border-bottom: none;
}

.bottom-sheet-option i {
  font-size: 20px;
  color: var(--toss-gray-500);
  width: 24px;
  text-align: center;
}

/* 모달 오버레이 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: calc(100% - 48px);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--toss-gray-100);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--toss-gray-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--toss-gray-600);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
}

.modal-footer .btn-secondary {
  flex: 1;
  padding: 14px;
  background: var(--toss-gray-100);
  color: var(--toss-gray-700);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.modal-footer .btn-primary {
  flex: 1;
  padding: 14px;
  background: var(--toss-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--toss-gray-50);
  border: 1px solid var(--toss-gray-200);
  border-radius: 12px;
  font-size: 15px;
  color: var(--toss-gray-900);
  resize: vertical;
  min-height: 120px;
  transition: all 0.2s;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--toss-blue);
  background: #fff;
  box-shadow: 0 0 0 3px var(--toss-blue-50);
}

/* 데스크톱 위치 주소 상세 */
.location-address-detail {
  padding: 20px;
}

.location-address-detail .address-main {
  font-size: 16px;
  font-weight: 500;
  color: var(--toss-gray-900);
  margin: 0 0 4px 0;
}

.location-address-detail .address-sub {
  font-size: 14px;
  color: var(--toss-gray-500);
  margin: 0;
}

/* 반응형 - 모바일 CTA 바 표시 */
@media (max-width: 1023px) {
  .sticky-cta-bar.mobile-tablet-only {
    display: flex;
  }
}

@media (max-width: 768px) {
  .sticky-cta-bar.mobile-tablet-only {
    bottom: 60px;
  }

  /* 펀딩 카드 모바일 조정 */
  .mobile-tablet-only .roommate-funding-card {
    margin: 16px 0;
    border-radius: 16px;
  }

  .mobile-tablet-only .funding-stat-value {
    font-size: 22px;
  }
}

/* =====================================================
   룸메이트 상세 페이지 - Product Detail 모바일 레이아웃 호환
   (product-detail.html과 동일한 구조)
   ===================================================== */

/* 모바일 타이틀 섹션 (배지 + 제목) */
.mobile-title-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.mobile-title-section .roommate-badge {
  align-self: flex-start;
}

/* 참여자 아바타 그리드 */
.participants-avatars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 16px;
  padding: 0 20px 20px;
}

.participants-avatars-grid .participant-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.participants-avatars-grid .participant-avatar .avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--toss-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--toss-gray-400);
  overflow: hidden;
}

.participants-avatars-grid .participant-avatar .avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participants-avatars-grid .participant-avatar .avatar-name {
  font-size: 12px;
  color: var(--toss-gray-700);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 채팅 프리뷰 콘텐츠 */
.chat-preview-content {
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--toss-gray-100);
}

.chat-empty-state {
  text-align: center;
  padding: 20px 0;
}

/* 모바일 섹션 디바이더 스타일 - 100vw 풀와이드 */
.mobile-tablet-layout .mobile-section-divider {
  height: 8px;
  background: linear-gradient(to bottom, #f7f8fb 0%, #f7f8fb calc(100% - 1px), #e9edf3 calc(100% - 1px), #e9edf3 100%);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  margin: 0;
}

/* space 정보 섹션 여백 - 상단/하단 동일하게 */
.mobile-tablet-layout .mobile-info-card .specs-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* 모바일 위치 섹션 - pricing-content 안에 있으므로 자체 padding 불필요 */
.mobile-location-section {
  padding: 0;
}

.mobile-location-section .location-map {
  height: 200px;
  background: var(--toss-gray-100);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

/* nearby-transport, mobile-location-section 스타일은 nearby-transport.css, product-detail.css 사용 */

/* space-description, read-more-btn 스타일은 product-detail.css 사용 */

/* review-header-new, notion-section 스타일은 product-detail.css 사용 */
}

/* 참여자 없음 상태 */
.reviews-container .no-reviews {
  text-align: center;
  padding: 40px 20px;
}

.reviews-container .no-reviews p {
  margin: 0;
  font-size: 15px;
  color: var(--toss-gray-600);
}

.reviews-container .no-reviews .no-reviews-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--toss-gray-400);
}

/* 모바일 sticky buttons 프로모션 배너 */
.sticky-promo-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe9e9 100%);
  border-radius: 8px;
  margin-bottom: 12px;
}

.sticky-promo-banner .promo-icon {
  font-size: 16px;
}

.sticky-promo-banner .promo-text {
  font-size: 13px;
  color: var(--toss-gray-700);
}

.sticky-promo-banner .promo-text strong {
  color: #f04452;
  font-weight: 600;
}

/* 모바일 sticky buttons 행 */
.sticky-buttons-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sticky-buttons-row .bookmark-btn {
  flex-shrink: 0;
}

.sticky-buttons-row .reservation-btn {
  flex: 1;
}

/* 스티키 모집현황 미니바 */
.sticky-funding-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--toss-gray-100);
  margin-bottom: 12px;
}

.sticky-funding-info {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-900);
  white-space: nowrap;
}

.sticky-funding-current {
  color: var(--toss-blue);
  font-size: 15px;
}

.sticky-funding-separator {
  color: var(--toss-gray-400);
}

.sticky-funding-target {
  color: var(--toss-gray-600);
  font-size: 13px;
  font-weight: 500;
}

.sticky-funding-progress {
  flex: 1;
  height: 6px;
  background: var(--toss-gray-100);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.sticky-funding-bar {
  height: 100%;
  background: var(--toss-blue);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.sticky-funding-dday {
  font-size: 12px;
  font-weight: 600;
  color: #f04452;
  white-space: nowrap;
  padding: 2px 8px;
  background: #FEF2F2;
  border-radius: 4px;
}

/* 예약 버튼 disabled 상태 */
.reservation-btn.disabled,
.reservation-btn:disabled {
  background: var(--toss-gray-300) !important;
  cursor: not-allowed !important;
}

/* 모바일 info card 조정 */
@media (max-width: 1023px) {
  .mobile-tablet-layout .mobile-info-card {
    background: #fff;
    /* border-bottom 제거 - 8px 구분선과 중복됨 */
    /* 화면 가장자리에서 16px 여백: content-section의 12px 상쇄 + 16px 추가 */
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .mobile-tablet-layout .mobile-info-card .company-card {
    padding: 12px 0;  /* product-detail.css와 동일 (상하 12px) */
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .mobile-tablet-layout .mobile-info-card .company-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-tablet-layout .mobile-info-card .company-header {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-tablet-layout .mobile-info-card .company-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--toss-bg-base, #F2F4F6) 0%, var(--toss-line-normal, #E5E8EB) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--toss-text-primary, #191F28);
    overflow: hidden;
  }

  .mobile-tablet-layout .mobile-info-card .company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
  }

  .mobile-tablet-layout .mobile-info-card .company-title h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--toss-gray-900);
  }

  .mobile-tablet-layout .mobile-info-card .company-title p {
    font-size: 13px;
    color: var(--toss-gray-500);
    margin: 0;
  }

  .mobile-tablet-layout .mobile-info-card .company-header-actions {
    display: flex;
    gap: 8px;
  }

  .mobile-tablet-layout .mobile-info-card .card-divider {
    height: 1px;
    background: var(--toss-gray-100);
    margin: 16px 0;
  }

  .mobile-tablet-layout .mobile-info-card .company-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
  }

  .mobile-tablet-layout .mobile-info-card .stat-item {
    text-align: center;
  }

  .mobile-tablet-layout .mobile-info-card .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--toss-blue);
  }

  .mobile-tablet-layout .mobile-info-card .stat-label {
    font-size: 12px;
    color: var(--toss-gray-500);
    margin-top: 4px;
  }

}

/* 프라이싱 콘텐츠 섹션 - product-detail.css와 동일 */
.mobile-tablet-layout .mobile-info-card .pricing-content {
  padding: 12px 0 0 0;  /* 상단 12px만, 하단 여백 없음 */
}

.pricing-content .mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.pricing-content .mobile-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pricing-content .share-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--toss-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--toss-gray-600);
}

.pricing-content .share-btn:hover {
  background: var(--toss-gray-50);
}

/* 저장하기 버튼 */
.animated-subscribe-btn {
  position: relative;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--toss-gray-100);
  border: none;
  cursor: pointer;
  overflow: hidden;
  height: 36px;
}

.animated-subscribe-btn .btn-initial,
.animated-subscribe-btn .btn-subscribed {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.animated-subscribe-btn .btn-initial {
  color: var(--toss-gray-700);
}

.animated-subscribe-btn .btn-subscribed {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  color: var(--toss-blue);
}

.animated-subscribe-btn.subscribed .btn-initial {
  opacity: 0;
}

.animated-subscribe-btn.subscribed .btn-subscribed {
  opacity: 1;
}

.animated-subscribe-btn .btn-text {
  font-size: 13px;
  font-weight: 600;
}

/* 가격 표시 - 구분선이 있으므로 margin-bottom 제거 */
.price-display {
  margin-bottom: 0;
}

.price-display .price-main-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

/* price-unit, price-current는 product-detail.css 스타일 사용 */

.price-display .price-original-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.price-display .price-original-label {
  font-size: 14px;
  color: var(--toss-gray-500);
}

.price-display .price-original {
  font-size: 14px;
  color: var(--toss-gray-600);
}

/* 스펙 컨테이너 - rental.html 모바일과 동일 스타일 */
.specs-container {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;  /* 여백은 .pricing-content .specs-container에서 처리 */
}

.specs-container .product-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.specs-container .product-specs p {
  margin: 0;
  font-size: 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.specs-container .product-specs p strong {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--toss-text-tertiary, #8B95A1);
  flex-shrink: 0;
  min-width: 72px;
}

.specs-container .product-specs p span {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--toss-text-primary, #191F28);
  text-align: left;
}

/* 편의시설 섹션 - 위치 섹션과 동일한 스타일 */
.mobile-amenities-section {
  margin-top: 16px;  /* 위치 섹션 상단 여백과 동일 */
}

.mobile-tablet-layout .mobile-amenities-section .amenities-title-amazon {
  font-size: 16px !important;  /* 위치 타이틀(.notion-section-title)과 동일 */
  font-weight: 700 !important;
  color: var(--toss-text-primary, #191F28) !important;  /* 위치 타이틀과 동일 */
  margin-bottom: 12px;
}

.mobile-amenities-section .amenity-badge-amazon i {
  color: var(--toss-green);
  font-size: 11px;
}

/* 예약 버튼 컨테이너 */
.reservation-buttons-container {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.reservation-buttons-container .bookmark-btn {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--toss-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--toss-gray-500);
  transition: all 0.2s;
}

.reservation-buttons-container .bookmark-btn:hover {
  background: var(--toss-gray-50);
}

.reservation-buttons-container .bookmark-btn.active {
  border-color: #f04452;
  color: #f04452;
}

.reservation-buttons-container .bookmark-btn.active .bookmark-icon path {
  fill: #f04452;
}

.reservation-buttons-container .reservation-btn {
  flex: 1;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--toss-blue);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.reservation-buttons-container .reservation-btn:hover:not(:disabled) {
  background: var(--toss-blue-dark);
}

/* 썸네일 스타일 */
.product-thumbnails {
  display: flex;
  gap: 8px;
  padding: 8px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-thumbnails::-webkit-scrollbar {
  display: none;
}

.product-thumbnails .thumbnail {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.product-thumbnails .thumbnail.active {
  border-color: var(--toss-blue);
}

.product-thumbnails .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumbnails .thumbnail .thumbnail-placeholder {
  width: 100%;
  height: 100%;
  background: var(--toss-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--toss-gray-300);
}

/* 세션 리뷰 (참여자) */
.section-reviews {
  background: #fff;
}

/* 세션 스페이스 - product-detail.css 스타일 사용 */

/* =====================================================
   데스크톱 갤러리 이미지 오버플로우 수정
   product-detail.css 스타일 강제 오버라이드
   ===================================================== */

/* 갤러리 컬럼 컨테이너 - 오버플로우 방지 */
.roommate-detail-page .product-gallery-column {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* 갤러리 레이아웃 - 플렉스 컨테이너 오버플로우 */
.roommate-detail-page .gallery-layout {
  display: flex !important;
  gap: 12px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* 메인 이미지 영역 - flex item 축소 허용 */
.roommate-detail-page .gallery-main-image {
  flex: 1 1 0% !important;
  min-width: 0 !important; /* 핵심: flex item이 콘텐츠 크기 이하로 축소 가능하게 함 */
  max-width: calc(100% - 84px) !important; /* 썸네일 너비(72px) + gap(12px) 제외 */
  position: relative !important;
  overflow: hidden !important;
}

/* 메인 이미지 컨테이너 - 이미지 클리핑 (핵심) */
.roommate-detail-page .main-image-container {
  width: 100% !important;
  max-width: 100% !important;
  height: 0 !important;
  padding-bottom: 100% !important; /* 1:1 비율 유지 (aspect-ratio 대체) */
  position: relative !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #f5f5f5 !important;
}

/* 메인 이미지 - 컨테이너에 맞게 조정 (절대 위치) */
.roommate-detail-page .main-image-container img,
.roommate-detail-page .main-image-container .main-product-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* 썸네일 영역 - 고정 너비 유지 */
.roommate-detail-page .gallery-thumbnails-vertical {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  overflow: hidden !important;
}

/* 썸네일 아이템 - 오버플로우 방지 (thumb-item, thumbnail-item 둘 다 지원) */
.roommate-detail-page .gallery-thumbnails-vertical .thumb-item,
.roommate-detail-page .gallery-thumbnails-vertical .thumbnail-item {
  width: 70px !important;
  height: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.roommate-detail-page .gallery-thumbnails-vertical .thumb-item.active,
.roommate-detail-page .gallery-thumbnails-vertical .thumbnail-item.active {
  border-color: var(--toss-blue, #3182f6) !important;
}

.roommate-detail-page .gallery-thumbnails-vertical .thumb-item img,
.roommate-detail-page .gallery-thumbnails-vertical .thumbnail-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* =====================================================
   갤러리 아래 펀딩 카드 스타일 (데스크톱 & 모바일)
   가격 섹션과 동일한 스타일 (연한 회색 배경)
   ===================================================== */

/* 데스크톱 갤러리 펀딩 카드 */
.gallery-funding-card {
  margin-top: 20px;
  padding: 20px;
  background: var(--toss-bg-grouped-base, #F9FAFB);
  border-radius: 16px;
  color: var(--toss-text-primary, #191F28);
}

.gallery-funding-card .funding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.gallery-funding-card .funding-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--toss-text-primary, #191F28);
}

.gallery-funding-card .funding-title i {
  font-size: 16px;
  color: var(--toss-blue, #3182F6);
}

.gallery-funding-card .funding-deadline-badge {
  background: var(--toss-blue, #3182F6);
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.gallery-funding-card .funding-deadline-badge.urgent {
  background: #ff6b6b;
}

.gallery-funding-card .funding-deadline-badge.expired {
  background: #9CA3AF;
}

/* 프로그레스 섹션 (바 + 정보) */
.gallery-funding-card .funding-progress-section {
  margin-bottom: 16px;
}

.gallery-funding-card .funding-progress-bar {
  height: 10px;
  background: #E5E8EB;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.gallery-funding-card .funding-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182F6 0%, #1B64DA 100%);
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-funding-card .funding-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6B7280;
}

.gallery-funding-card .progress-participants {
  font-weight: 500;
}

.gallery-funding-card .progress-participants strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--toss-text-primary, #191F28);
}

.gallery-funding-card .progress-percent {
  font-size: 14px;
  font-weight: 700;
  color: var(--toss-blue, #3182F6);
}

/* 확정 금액 섹션 */
.gallery-funding-card .funding-amount-section {
  border-top: 1px solid #E5E8EB;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-funding-card .funding-amount-label {
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
}

.gallery-funding-card .funding-amount-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--toss-text-primary, #191F28);
  letter-spacing: -0.5px;
}

/* 마감일 표시 */
.gallery-funding-card .funding-deadline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.gallery-funding-card .funding-deadline i {
  font-size: 16px;
  opacity: 0.9;
}

/* 참여자 섹션 */
.gallery-funding-card .funding-participants {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.gallery-funding-card .participants-mini-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px 0;
  color: rgba(255, 255, 255, 0.9);
}

.gallery-funding-card .participants-avatars-mini {
  display: flex;
  align-items: center;
  gap: 0;
}

.gallery-funding-card .participants-avatars-mini .participant-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  margin-left: -8px;
}

.gallery-funding-card .participants-avatars-mini .participant-avatar-mini:first-child {
  margin-left: 0;
}

.gallery-funding-card .participants-avatars-mini .no-participants-text {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 13px;
  font-style: normal;
}

/* 모바일 갤러리 펀딩 카드 */
.mobile-gallery-funding-card {
  margin-left: -12px;
  margin-right: -12px;
  padding: 12px 16px;
  background: transparent;
  color: var(--toss-text-primary, #191F28);
}

.mobile-gallery-funding-card .funding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.mobile-gallery-funding-card .funding-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--toss-text-primary, #191F28);
}

.mobile-gallery-funding-card .funding-title i {
  font-size: 15px;
  color: var(--toss-blue, #3182F6);
}

.mobile-gallery-funding-card .funding-deadline-badge {
  background: var(--toss-blue, #3182F6);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* 모바일 프로그레스 섹션 */
.mobile-gallery-funding-card .funding-progress-section {
  margin-bottom: 0;
}

.mobile-gallery-funding-card .funding-progress-bar {
  height: 8px;
  background: #E5E8EB;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.mobile-gallery-funding-card .funding-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182F6 0%, #1B64DA 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.mobile-gallery-funding-card .funding-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6B7280;
}

.mobile-gallery-funding-card .progress-participants {
  font-weight: 500;
}

.mobile-gallery-funding-card .progress-participants strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--toss-text-primary, #191F28);
}

.mobile-gallery-funding-card .progress-percent {
  font-size: 13px;
  font-weight: 700;
  color: var(--toss-blue, #3182F6);
}

/* 모바일 확정 금액 섹션 */
.mobile-gallery-funding-card .funding-amount-section {
  border-top: 1px solid #E5E8EB;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-gallery-funding-card .funding-amount-label {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.mobile-gallery-funding-card .funding-amount-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--toss-text-primary, #191F28);
  letter-spacing: -0.5px;
}

.mobile-gallery-funding-card .funding-deadline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.mobile-gallery-funding-card .funding-participants {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-gallery-funding-card .participants-mini-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: rgba(255, 255, 255, 0.9);
}

.mobile-gallery-funding-card .participants-avatars-mini {
  display: flex;
  align-items: center;
  gap: 0;
}

.mobile-gallery-funding-card .participants-avatars-mini .participant-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  margin-left: -6px;
}

.mobile-gallery-funding-card .participants-avatars-mini .participant-avatar-mini:first-child {
  margin-left: 0;
}

.mobile-gallery-funding-card .participants-avatars-mini .no-participants-text {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 12px;
}

/* 가격 섹션 혜택 행 */
.price-row.benefit-row,
.price-original-row.benefit-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 12px;
  margin-top: 8px;
}

.benefit-value {
  color: var(--toss-blue) !important;
  font-weight: 600;
}

/* 데스크톱 가격 카드 내 혜택 */
.price-info-card .benefit-row {
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding-top: 12px;
  margin-top: 4px;
}

.price-info-card .benefit-value {
  color: var(--toss-blue);
  font-size: 14px;
}

/* 모바일 미디어 쿼리 */
@media (max-width: 1023px) {
  .mobile-gallery-funding-card {
    margin-left: -12px;
    margin-right: -12px;
    padding: 12px 16px;
  }

  .mobile-gallery-funding-card .funding-stats {
    flex-wrap: wrap;
    gap: 12px;
  }

  .mobile-gallery-funding-card .funding-stat {
    flex: 1;
    min-width: 70px;
  }

  .mobile-gallery-funding-card .funding-stat-value {
    font-size: 18px;
  }

  .mobile-gallery-funding-card .funding-stat-label {
    font-size: 11px;
  }

  .mobile-gallery-funding-card .funding-participants {
    margin-top: 16px;
    padding-top: 12px;
  }

  .mobile-gallery-funding-card .participants-avatars-mini .participant-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* =====================================================
   전체 월 비용 정가 취소선 스타일
   ===================================================== */

/* 데스크톱: 전체 월 비용 행 정가 취소선 */
#desktopTotalPriceRow .price-value-wrap {
  text-align: right;
}

#desktopTotalPriceRow #desktopTotalOriginal {
  font-size: 14px;
  color: #565959;
  text-decoration: line-through;
  margin-top: 2px;
}

/* 모바일: 전체 월 비용 행 정가 취소선 */
.price-total-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-total-original {
  font-size: 13px;
  color: #565959;
  text-decoration: line-through;
  margin-top: 2px;
}

/* =====================================================
   룸메이트 신청 모달 (Apply Modal)
   ===================================================== */

.roommate-apply-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.roommate-apply-modal.active {
  opacity: 1;
  visibility: visible;
}

.apply-modal-container {
  background: #fff;
  border-radius: 20px;
  max-width: 480px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.roommate-apply-modal.active .apply-modal-container {
  transform: translateY(0);
}

.apply-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--toss-gray-100);
}

.apply-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0;
}

.apply-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--toss-gray-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--toss-gray-600);
  transition: background 0.2s;
}

.apply-modal-close:hover {
  background: var(--toss-gray-200);
}

.apply-modal-body {
  padding: 24px;
}

/* 모집 현황 요약 */
.apply-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.apply-summary-item {
  background: var(--toss-gray-50);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.apply-summary-label {
  font-size: 12px;
  color: var(--toss-gray-500);
  margin-bottom: 4px;
}

.apply-summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

/* 인원 선택 */
.apply-section {
  margin-bottom: 24px;
}

.apply-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-800);
  margin-bottom: 12px;
}

.participant-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--toss-gray-50);
  border-radius: 12px;
  padding: 16px;
}

.participant-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--toss-gray-200);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--toss-gray-700);
  transition: all 0.2s;
}

.participant-btn:hover {
  background: var(--toss-gray-100);
}

.participant-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.participant-count-input {
  flex: 1;
  font-size: 24px;
  font-weight: 700;
  color: var(--toss-gray-900);
  text-align: center;
  border: none;
  background: transparent;
  width: 60px;
  outline: none;
}

.participant-count-input::-webkit-inner-spin-button,
.participant-count-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.participant-unit {
  font-size: 14px;
  color: var(--toss-gray-500);
}

/* 메시지 입력 */
.apply-textarea {
  width: 100%;
  min-height: 80px;
  padding: 14px;
  border: 1px solid var(--toss-gray-200);
  border-radius: 12px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}

.apply-textarea:focus {
  outline: none;
  border-color: var(--toss-blue);
}

.apply-textarea::placeholder {
  color: var(--toss-gray-400);
}

/* 결제 정보 */
.payment-info-card {
  background: linear-gradient(135deg, var(--toss-blue-50), #f0f7ff);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.payment-info-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-blue);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-info-title i {
  font-size: 16px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.payment-row.total {
  border-top: 1px dashed var(--toss-gray-300);
  margin-top: 8px;
  padding-top: 16px;
}

.payment-label {
  font-size: 14px;
  color: var(--toss-gray-600);
}

.payment-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-900);
}

.payment-value.highlight {
  color: var(--toss-blue);
  font-size: 18px;
}

.payment-value.later {
  color: var(--toss-gray-500);
}

/* 약관 동의 */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--toss-gray-50);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 20px;
}

.terms-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--toss-blue);
  flex-shrink: 0;
}

.terms-text {
  font-size: 13px;
  color: var(--toss-gray-600);
  line-height: 1.5;
}

.terms-text strong {
  color: var(--toss-gray-800);
}

/* 모달 푸터 */
.apply-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
}

.btn-apply-cancel {
  flex: 0 0 100px;
  padding: 16px;
  background: var(--toss-gray-100);
  color: var(--toss-gray-700);
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-apply-cancel:hover {
  background: var(--toss-gray-200);
}

.btn-apply-submit {
  flex: 1;
  padding: 16px;
  background: var(--toss-blue);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-apply-submit:hover {
  background: var(--toss-blue-dark, #1565c0);
}

.btn-apply-submit:disabled {
  background: var(--toss-gray-300);
  cursor: not-allowed;
}

/* 취소 확인 모달 */
.cancel-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cancel-confirm-modal.active {
  opacity: 1;
  visibility: visible;
}

.cancel-modal-container {
  background: #fff;
  border-radius: 20px;
  max-width: 400px;
  width: calc(100% - 32px);
  padding: 24px;
}

.cancel-modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: #fff3e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.cancel-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
  text-align: center;
  margin-bottom: 8px;
}

.cancel-modal-desc {
  font-size: 14px;
  color: var(--toss-gray-600);
  text-align: center;
  margin-bottom: 20px;
}

.cancel-info-box {
  background: var(--toss-gray-50);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.cancel-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.cancel-info-label {
  font-size: 14px;
  color: var(--toss-gray-500);
}

.cancel-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-900);
}

.cancel-info-value.refund {
  color: var(--toss-blue);
}

.cancel-modal-buttons {
  display: flex;
  gap: 12px;
}

.cancel-modal-buttons .btn-keep {
  flex: 1;
  padding: 14px;
  background: var(--toss-gray-100);
  color: var(--toss-gray-700);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.cancel-modal-buttons .btn-cancel-confirm {
  flex: 1;
  padding: 14px;
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* 모바일 반응형 */
@media (max-width: 767px) {
  .apply-modal-container {
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
  }

  .roommate-apply-modal.active .apply-modal-container {
    transform: translateY(0);
  }

  .apply-summary {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .apply-summary-item {
    padding: 12px;
  }

  .apply-summary-value {
    font-size: 14px;
  }
}
