:root {
  --canvas: var(--wm-color-canvas);
  --panel: var(--wm-color-surface);
  --ink: var(--wm-color-ink);
  --muted: var(--wm-color-muted);
  --muted-soft: var(--wm-color-muted-soft);
  --teal: var(--wm-color-primary);
  --teal-deep: var(--wm-color-action);
  --teal-soft: var(--wm-color-primary-soft);
  --orange: var(--wm-color-accent);
  --line: var(--wm-color-line);
  --line-strong: var(--wm-color-line-strong);
  --page-width: var(--mobile-shell-content-width, 346.56px);
  --device-height: 760px;
  --bottom-nav-height: 62px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--wm-color-app-bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--wm-color-app-bg);
  font-family: var(--wm-font-ui);
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { border: 0; cursor: pointer; }

button:focus-visible,
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.group-page {
  position: relative;
  width: min(100%, var(--page-width));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--canvas);
}

.group-topbar {
  position: absolute;
  top: 25px;
  right: 0;
  left: 0;
  z-index: 5;
  display: flex;
  height: 51px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.group-topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.group-main {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 11px calc(var(--bottom-nav-height) + 18px + env(safe-area-inset-bottom));
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.group-main::-webkit-scrollbar { display: none; }

.group-join-banner {
  position: relative;
  height: 244px;
  min-height: 244px;
  margin: 0 -11px;
  overflow: hidden;
  isolation: isolate;
  background: var(--wm-color-primary-wash);
  border: 0;
  border-radius: 0;
}

.group-join-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  transform: scale(1.08);
}

.group-join-copy {
  position: absolute;
  top: 86px;
  left: 22px;
  z-index: 1;
  width: 62%;
}

.group-join-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 32px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, .65);
}

.group-join-copy p {
  margin: 10px 0 0;
  color: var(--wm-color-muted-strong);
  font-size: 12px;
  line-height: 18px;
  text-shadow: 0 1px 7px rgba(255, 255, 255, .8);
}

.group-service-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 88px;
  gap: 11px;
  align-items: center;
  margin-top: -26px;
  min-height: 76px;
  padding: 10px 12px 10px 10px;
  background: var(--teal-soft);
  border: 1px solid var(--wm-color-line);
  border-radius: 18px;
}

.group-service-avatar {
  display: block;
  width: 54px;
  height: 54px;
  overflow: hidden;
  background: var(--wm-color-primary-soft-strong);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(var(--wm-action-rgb), .12);
}

.group-service-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.group-service-strip div { display: grid; min-width: 0; gap: 2px; }

.group-service-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-service-strip div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-service-strip button {
  width: 88px;
  height: 36px;
  padding: 0;
  color: #fff;
  background: var(--teal-deep);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  white-space: nowrap;
}

.group-products { margin-top: 18px; }

.group-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.group-section-heading > div { display: grid; gap: 1px; }

.group-section-heading span {
  color: var(--teal-deep);
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
}

.group-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 26px;
}

.group-section-heading small {
  padding-bottom: 3px;
  color: var(--muted-soft);
  font-size: 9px;
  line-height: 14px;
}

.group-product-list { display: grid; gap: 10px; margin-top: 10px; }

.group-product-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(var(--wm-ink-rgb), .035);
}

.group-product-image {
  width: 100px;
  height: auto;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--wm-color-primary-wash);
  border-radius: 11px;
}

.group-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.group-product-content {
  display: grid;
  grid-template-rows: minmax(36px, auto) minmax(14px, auto) minmax(22px, auto) minmax(17px, auto) 24px;
  row-gap: 4px;
  min-width: 0;
  min-height: 129px;
}

.group-product-title-row {
  display: flex;
  min-width: 0;
  align-items: start;
  justify-content: space-between;
  gap: 5px;
}

.group-product-title-row h3 {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-status {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border: 1px solid var(--wm-color-line);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  line-height: 12px;
  white-space: nowrap;
}

.group-status--warm { color: #b87740; background: #fff6ed; border-color: #f5dfca; }

.group-product-subtitle {
  min-height: 14px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
  margin: 0;
}

.group-price-row strong {
  color: var(--orange);
  font-size: 19px;
  font-weight: 800;
  line-height: 22px;
}

.group-price-row del {
  color: var(--muted-soft);
  font-size: 9px;
  line-height: 13px;
}

.group-tags {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-content: start;
  gap: 4px;
  min-height: 17px;
  margin: 0;
}

.group-tags span {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 5px;
  color: var(--wm-color-muted-strong);
  background: var(--wm-color-primary-wash);
  border-radius: 6px;
  font-size: 8px;
  line-height: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-detail-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  gap: 3px;
  width: max-content;
  min-height: 24px;
  margin: 0;
  padding: 5px 8px 5px 9px;
  color: var(--teal-deep);
  background: var(--wm-color-primary-wash);
  border: 1px solid var(--wm-color-line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 12px;
}

.group-detail-button b { font-size: 14px; font-weight: 400; line-height: 12px; }

.group-footnote {
  margin: 14px 4px 0;
  color: var(--muted-soft);
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}

.group-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(var(--wm-ink-rgb), .38);
}

.group-modal {
  width: min(100%, 325px);
  overflow: hidden;
  background: var(--wm-color-surface);
  border: 1px solid var(--wm-color-line);
  border-radius: 17px;
  box-shadow: 0 24px 58px rgba(var(--wm-action-rgb), .2);
}

.group-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 13px;
  background: var(--teal-soft);
  border-bottom: 1px solid var(--wm-color-line);
}

.group-modal-head h2 { margin: 0; color: var(--teal-deep); font-size: 17px; line-height: 22px; }

.group-modal-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--teal-deep);
  background: #fff;
  border: 1px solid var(--wm-color-line);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

.group-modal-body { padding: 14px 18px 18px; }

.group-modal-body p { margin: 0; color: var(--wm-color-muted-strong); font-size: 12px; line-height: 1.7; }

.group-modal-note {
  margin-top: 10px;
  padding: 10px;
  color: var(--wm-color-muted-strong);
  background: var(--teal-soft);
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.55;
}

.group-modal-placeholder {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 2px auto 12px;
  padding: 16px 10px;
  color: var(--muted);
  background: var(--wm-color-primary-wash);
  border: 1px dashed var(--wm-color-line-strong);
  border-radius: 12px;
  text-align: center;
}

.group-modal-placeholder img { width: 38px; height: 38px; border-radius: 11px; }
.group-modal-placeholder strong { color: var(--ink); font-size: 12px; line-height: 16px; }
.group-modal-placeholder span { font-size: 10px; line-height: 14px; }

.group-modal-action {
  width: 100%;
  margin-top: 13px;
  padding: 10px;
  color: #fff;
  background: var(--teal-deep);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 350px) {
  .group-main { padding-right: 9px; padding-left: 9px; }
  .group-product-card { grid-template-columns: 88px minmax(0, 1fr); gap: 8px; padding: 9px; }
  .group-product-image { width: 88px; height: auto; aspect-ratio: 3 / 2; }
  .group-product-title-row h3 { font-size: 13px; }
  .group-status { display: none; }
  .group-join-copy { top: 80px; left: 17px; width: 62%; }
  .group-join-copy h2 { font-size: 20px; line-height: 28px; }
}

@media (min-width: 520px) { .group-page { box-shadow: 0 0 0 1px rgba(var(--wm-primary-rgb), .14); } }
