/* One2Event room discovery v3: professional community mosaic. */

@media (min-width: 1121px) {
  .room-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 226px;
    grid-auto-flow: dense;
  }

  .room-card {
    height: 100%;
    min-height: 0;
  }

  .room-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .room-card:nth-child(4) {
    grid-column: span 2;
  }

  .room-card:nth-child(1) .room-card-top {
    height: 234px;
  }

  .room-card:nth-child(1) .room-art-label {
    font-size: 44px;
  }

  .room-card:nth-child(1) h3 {
    font-size: 31px;
  }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 232px;
    grid-auto-flow: dense;
  }

  .room-card {
    height: 100%;
    min-height: 0;
  }

  .room-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .room-card:nth-child(1) .room-card-top {
    height: 238px;
  }
}

@media (max-width: 720px) {
  .app-header {
    color: #fff;
    background: linear-gradient(118deg, #582cff 0%, #7841ff 52%, #2d5bff 100%);
    border-bottom: 0;
    box-shadow: 0 12px 30px rgba(45, 38, 135, .22);
  }

  .app-header::after {
    display: none;
  }

  .brand img {
    border-color: rgba(255,255,255,.44);
  }

  .brand small {
    color: #dffcff;
  }

  .connection-chip i {
    border: 2px solid rgba(255,255,255,.72);
  }

  .account-avatar {
    color: #301b82;
    background: #fff;
  }

  .home-view {
    background: #f4f5fa;
  }

  .home-wrap {
    width: 100%;
    padding: 0 12px 104px;
  }

  .discovery-shell {
    margin: 0 -12px 10px;
    padding: 18px 18px 12px;
    border-width: 0 0 1px;
    border-radius: 0 0 26px 26px;
    box-shadow: 0 12px 28px rgba(26, 34, 67, .08);
  }

  .discovery-heading {
    align-items: center;
  }

  .discovery-heading .section-kicker {
    color: #6a3cff;
    font-size: 9px;
  }

  .discovery-heading h1 {
    margin: 3px 0 2px;
    font-size: 30px;
  }

  .discovery-heading p {
    max-width: 290px;
    font-size: 12px;
    line-height: 1.45;
  }

  .room-category-tabs {
    margin: 15px -18px 0 0;
    padding-right: 18px;
    gap: 4px;
  }

  .room-category-tabs button {
    min-height: 40px;
    padding: 0 13px;
    border-color: transparent;
    border-radius: 0;
    color: #7f8493;
    background: transparent;
    position: relative;
  }

  .room-category-tabs button span {
    display: none;
  }

  .room-category-tabs button.is-active {
    color: #111525;
    border-color: transparent;
    background: transparent;
  }

  .room-category-tabs button.is-active::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6b3cff, #2d5bff);
  }

  .discovery-quick-join {
    margin: 8px 0 17px;
    padding: 5px;
    border-radius: 13px;
    background: #fff;
  }

  .discovery-quick-join .code-input,
  .discovery-quick-join form > button {
    min-height: 40px;
  }

  .rooms-section {
    padding-top: 0;
  }

  .rooms-section .section-heading {
    margin-bottom: 12px;
  }

  .rooms-section .section-heading h2 {
    font-size: 25px;
  }

  .room-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 172px;
    grid-auto-flow: dense;
    gap: 8px;
    padding: 0;
    overflow: visible;
  }

  .room-card {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0 10px 10px;
    border-radius: 15px;
    scroll-snap-align: none;
  }

  .room-card:nth-child(1) {
    grid-row: span 2;
  }

  .room-card:only-child {
    grid-column: 1 / -1;
    grid-row: span 2;
  }

  .room-card:first-child:nth-last-child(2) + .room-card {
    grid-row: span 2;
  }

  .room-card:nth-child(4) {
    grid-column: span 2;
  }

  .room-card-top {
    height: 72px;
    margin: 0 -10px 8px;
    padding: 9px;
  }

  .room-card:nth-child(1) .room-card-top,
  .room-card:only-child .room-card-top,
  .room-card:first-child:nth-last-child(2) + .room-card .room-card-top {
    height: 164px;
  }

  .room-card .room-art-label {
    left: 10px;
    bottom: 8px;
    font-size: 17px;
  }

  .room-card:nth-child(1) .room-art-label,
  .room-card:only-child .room-art-label,
  .room-card:first-child:nth-last-child(2) + .room-card .room-art-label {
    bottom: 13px;
    font-size: 28px;
  }

  .room-card .live-badge {
    padding: 4px 6px;
    font-size: 7px;
  }

  .room-card .room-code {
    font-size: 7px;
  }

  .room-card h3 {
    margin: 0 0 4px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .room-card:not(:nth-child(1)):not(:only-child) p,
  .room-card:not(:nth-child(1)):not(:only-child) .room-people {
    display: none;
  }

  .room-card:nth-child(1) p,
  .room-card:only-child p,
  .room-card:first-child:nth-last-child(2) + .room-card p {
    min-height: 34px;
    font-size: 10px;
  }

  .room-card:nth-child(1) .room-people,
  .room-card:only-child .room-people,
  .room-card:first-child:nth-last-child(2) + .room-card .room-people {
    display: flex;
  }

  .room-card-footer {
    margin-top: auto;
    padding-top: 6px;
  }

  .room-card-footer small {
    max-width: calc(100% - 28px);
    font-size: 8px;
  }

  .room-card-footer button {
    width: 27px;
    height: 27px;
    font-size: 14px;
  }

  .empty-rooms {
    grid-column: 1 / -1;
  }
}

@media (max-width: 370px) {
  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
