/* Moyo-inspired information density for the party finder.
   Mobile keeps the existing single-column experience; this layer only
   widens the desktop canvas and separates discovery from results. */
:root {
  --pc-list-max: 1440px;
  --pc-list-gutter: 48px;
  --pc-list-bg: #f6f8fc;
  --pc-list-line: #e3e9f2;
  --pc-list-muted: #687589;
}

.party-filter-panel { display: none; }

.party-list-loading,
.party-list-skeleton {
  display: grid;
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  padding: 20px 16px;
  grid-template-columns: 1fr;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid #dce8f3;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fbfe 100%);
  color: #718096;
  text-align: center;
}

.party-list-spinner {
  display: block;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 3px solid #dcecfb;
  border-top-color: #339cff;
  border-radius: 50%;
  animation: party-list-spin .8s linear infinite;
}

.party-list-loading > span:not(.party-list-spinner) {
  color: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

@keyframes party-list-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .party-list-spinner {
    animation: none;
  }
}

@media (min-width: 801px) {
  html:has(body.page-list) { background: var(--pc-list-bg); }

  body.page-list {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding-bottom: 0;
    background: var(--pc-list-bg);
  }

  body.page-list #app { min-height: 100vh; }
  body.page-list > #app { width: 100%; }

  body.page-list .site-head {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 88px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
  }

  body.page-list .site-head > .wrap,
  body.page-list .site-head .wrap {
    width: min(var(--pc-list-max), calc(100% - var(--pc-list-gutter) * 2));
  }

  body.page-list .main-nav { display: flex; }
  body.page-list .mobile-bottom-nav { display: none !important; }

  body.page-list .party-finder-page {
    min-height: calc(100vh - 88px);
    background: var(--pc-list-bg);
  }

  body.page-list .party-finder-hero {
    padding: 38px 0 26px;
    border-bottom: 1px solid var(--pc-list-line);
    background: #fff;
  }

  body.page-list .party-finder-hero .wrap,
  body.page-list .party-finder-layout {
    width: min(var(--pc-list-max), calc(100% - var(--pc-list-gutter) * 2));
    margin-right: auto;
    margin-left: auto;
  }

  body.page-list .party-finder-hero .wrap > span {
    color: #2d71e6;
    font-family: inherit;
    font-size: 24px;
    font-weight: 850;
    letter-spacing: -.04em;
  }

  body.page-list .party-finder-create-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 18px;
    border: 1px solid #cbdcf5;
    border-radius: 12px;
    background: #fff;
    color: #2d71e6;
    font-size: 14px;
    font-weight: 800;
  }

  body.page-list .party-finder-layout {
    padding-top: 34px;
    padding-bottom: 96px;
  }

  body.page-list .party-service-picker {
    margin-bottom: 30px;
  }

  body.page-list .party-service-options {
    grid-template-columns: repeat(8, minmax(110px, 1fr));
    gap: 14px;
    margin-top: 0;
  }

  body.page-list .party-service-option {
    min-height: 120px;
    border: 1px solid var(--pc-list-line);
    border-radius: 18px;
  }

  body.page-list .party-service-option:hover,
  body.page-list .party-service-option:focus-visible {
    border-color: var(--pc-list-line);
    outline: 0;
    box-shadow: none;
  }

  body.page-list .party-results {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px 30px;
    align-items: start;
  }

  body.page-list .party-results > .list-tools {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--pc-list-line);
  }

  body.page-list .party-results > .list-tools > b {
    color: #182232;
    font-size: 22px;
    font-weight: 850;
  }

  .list-tools-sort {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--pc-list-muted);
    font-size: 13px;
    font-weight: 700;
  }

  body.page-list .list-tools-sort select {
    min-width: 154px;
    min-height: 42px;
    padding: 0 34px 0 13px;
    border: 1px solid #d5dfed;
    border-radius: 12px;
    background: #fff;
    color: #24344a;
    font-size: 13px !important;
    font-weight: 750;
  }

  body.page-list .party-filter-panel {
    display: grid;
    position: sticky;
    top: 112px;
    grid-column: 2;
    grid-row: 2 / span 3;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--pc-list-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(37, 69, 111, .06);
  }

  body.page-list .party-search {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    background: #fbfcfe;
  }

  body.page-list .party-search > span {
    color: #6e7d91;
    font-size: 22px;
    line-height: 1;
  }

  body.page-list .party-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #182232;
    font: inherit;
    font-size: 14px;
  }

  .party-price-basis {
    display: grid;
    gap: 5px;
    padding: 14px;
    border-radius: 12px;
    background: #f5f8fe;
  }

  .party-price-basis span,
  .party-price-basis small { color: var(--pc-list-muted); }
  .party-price-basis span { font-size: 12px; font-weight: 700; }
  .party-price-basis strong { color: #2d71e6; font-size: 18px; }
  .party-price-basis small { font-size: 11px; line-height: 1.45; }

  body.page-list .service-feature-card,
  body.page-list .party-list,
  body.page-list .party-load-more {
    grid-column: 1;
  }

  body.page-list .service-feature-card { margin: 0; }
  body.page-list .party-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  body.page-list .party-list-loading {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  body.page-list .party-empty {
    grid-column: 1 / -1;
    min-height: 260px;
  }

  body.page-list .party-load-more {
    width: 100%;
    min-height: 46px;
    border: 1px solid #c9daf2;
    border-radius: 12px;
    background: #fff;
    color: #2d71e6;
    font-size: 14px;
    font-weight: 800;
  }

  /* Desktop feature chips must stay horizontal even when the result rail is
     narrow. Keep Korean labels intact instead of allowing glyph-by-glyph
     wrapping. */
  body.page-list .service-feature-card {
    /* The results rail can be as narrow as ~800px at a 1280px viewport once
       the sticky filter column and gutters are accounted for. Avoid hard
       minimums that create horizontal overflow; the feature-copy column may
       shrink while each chip keeps a stable, readable width. */
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  }
  body.page-list .service-feature-card ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.page-list .service-feature-card li b {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: normal;
    word-break: keep-all;
    writing-mode: horizontal-tb;
  }
}

/* The Fold/tablet breakpoint has less horizontal room than a desktop
   monitor. Let both feature columns shrink instead of forcing a horizontal
   overflow that clips the feature labels. */
@media (min-width: 801px) and (max-width: 1180px) {
  body.page-list .service-feature-card {
    grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  }
  body.page-list .service-feature-card ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  body.page-list .party-filter-panel {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
  }

  body.page-list .party-price-basis {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
  }

  body.page-list .party-price-basis small { margin-left: auto; }
}

/* Feature cards sit in the left result rail on desktop.  Four narrow chips
   make Korean labels wrap one glyph per line, which looks like clipped text.
   Use two readable columns and let labels wrap only at word boundaries. */
@media (min-width: 801px) {
  body.page-list .party-results > .service-feature-card {
    grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr);
  }

  body.page-list .party-results > .service-feature-card ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  body.page-list .party-results > .service-feature-card li,
  body.page-list .party-results > .service-feature-card li b,
  body.page-list .party-results > .service-feature-card li span {
    min-width: 0;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    line-break: strict;
    text-overflow: clip;
  }

  body.page-list .party-results > .service-feature-card li b {
    display: block;
    line-height: 1.35;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  body.page-list .party-results > .service-feature-card {
    grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr);
  }
  body.page-list .party-results > .service-feature-card ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
