:root {
  --co-purple: #251381;
  --co-brand-purple: #6246f0;
  --co-orange: #ff5b17;
  --co-muted: #625f8e;
  --co-line: #e9ecf5;
}

.co-creation-page {
  min-height: 100vh;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
  color: var(--co-purple);
  background: #fff;
}

.co-creation-brand {
  min-height: 64px;
  padding: max(6px, env(safe-area-inset-top)) 18px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.co-creation-brand > img { width: 104px; height: 52px; object-fit: contain; }
.co-creation-brand > p { margin: 0; color: #514b5e; font-size: 12px; font-weight: 400; line-height: 1.5; }
.co-creation-scroll { padding: 0 10px 20px; }
.co-creation-panel { margin-top: 10px; border: 1px solid var(--co-line); border-radius: 18px; background: #fff; }

.co-creation-hero {
  position: relative;
  min-height: 221px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8f1, #f1edff);
}

.co-creation-hero > .co-creation-image-frame { position: absolute; inset: 0; }
.co-creation-hero .co-creation-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.co-creation-hero-foreground { position: absolute; left: 0; bottom: 0; width: 61%; height: 82px; object-fit: cover; object-position: left bottom; mask-image: linear-gradient(90deg, #000 0%, #000 78%, transparent 100%); }
.co-creation-hero-mask { position: absolute; z-index: 1; inset: 0 auto 0 0; width: 72%; background: linear-gradient(90deg, #fff8f1 0%, #fff8f1 76%, rgba(255,248,241,.92) 84%, rgba(255,248,241,0) 100%); }
.co-creation-hero-copy { position: relative; z-index: 2; width: 64%; padding: 43px 0 18px 15px; }
.co-creation-hero-copy > span { display: inline-flex; min-height: 25px; padding: 0 10px; align-items: center; border-radius: 999px; color: #fff; background: var(--co-brand-purple); font-size: 12px; font-weight: 700; }
.co-creation-hero-copy h1 { margin: 9px 0 0; font-size: 29px; line-height: 1.28; letter-spacing: -1.3px; }
.co-creation-hero-copy h1 strong { display: block; color: var(--co-orange); font-size: 25px; white-space: nowrap; }
.co-creation-hero-copy p { margin: 9px 0 0; color: #514b5e; font-size: 12px; line-height: 1.5; }

.co-creation-section-heading { min-height: 54px; padding: 8px 14px; display: flex; align-items: center; gap: 9px; }
.co-creation-section-heading > i { width: 6px; height: 24px; flex: none; border-radius: 4px; background: var(--co-orange); }
.co-creation-section-heading > div { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 1; }
.co-creation-section-heading h2 { margin: 0; color: var(--co-purple); font-size: 20px; line-height: 1.25; }
.co-creation-section-heading p { margin: 0; color: #817da6; font-size: 12px; line-height: 1.4; text-align: right; }

.co-creation-steps { margin: 0; padding: 0 8px 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; list-style: none; }
.co-creation-steps li { position: relative; min-width: 0; min-height: 200px; overflow: visible; border: 1px solid #f0edf2; border-radius: 13px; text-align: center; background: linear-gradient(180deg, #fff8ee, #fff 84%); }
.co-creation-steps li > .co-creation-image-frame { display: block; height: 130px; overflow: hidden; border-radius: 12px 12px 0 0; }
.co-creation-steps img { width: 100%; height: 100%; object-fit: cover; }
.co-creation-steps li > div { min-height: 30px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.co-creation-steps li > div span { width: 23px; height: 23px; flex: none; border-radius: 50%; color: #fff; background: var(--co-brand-purple); font-size: 14px; font-weight: 800; line-height: 23px; }
.co-creation-steps b { font-size: 14px; white-space: nowrap; }
.co-creation-steps p { margin: 1px 5px 8px; color: var(--co-muted); font-size: 12px; line-height: 1.35; }
.co-creation-steps li:not(:last-child)::after { content: ""; position: absolute; z-index: 3; top: 62px; right: -6px; width: 9px; height: 9px; border-top: 2px solid var(--co-brand-purple); border-right: 2px solid var(--co-brand-purple); transform: rotate(45deg); background: #fff; }

.co-creation-roles .co-creation-section-heading h2 { font-size: 16px; }
.co-creation-role-grid { padding: 0 8px 9px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.co-creation-role { position: relative; min-width: 0; min-height: 238px; padding-bottom: 50px; overflow: hidden; border-radius: 13px; background: #fff9ef; }
.co-creation-role--creator { background: #f8f5ff; }
.co-creation-role--referrer { background: #fff8f3; }
.co-creation-role > .co-creation-image-frame { display: block; height: 90px; overflow: hidden; }
.co-creation-role img { width: 100%; height: 100%; object-fit: cover; }
.co-creation-role-copy { padding: 8px 8px 0; }
.co-creation-role h3 { margin: 0 0 5px; color: var(--co-purple); font-size: 17px; line-height: 1.15; }
.co-creation-role p { margin: 0; color: var(--co-muted); font-size: 12px; line-height: 1.45; }
.co-creation-role button { position: absolute; right: 8px; bottom: 8px; left: 8px; min-height: 44px; padding: 0 8px; border: 1.5px solid var(--co-orange); border-radius: 23px; color: var(--co-orange); background: rgba(255,255,255,.9); font-size: 14px; font-weight: 700; }
.co-creation-role--creator button { color: var(--co-brand-purple); border-color: var(--co-brand-purple); }
.co-creation-role button span { margin-left: 3px; font-size: 21px; vertical-align: -1px; }

.co-creation-image-frame { position: relative; background: linear-gradient(135deg, #fff1e7, #f2eeff); }
.co-creation-image-frame > img { position: relative; z-index: 1; display: block; }
.co-creation-image-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #7a6aca; font-size: 12px; font-weight: 700; }
.co-creation-image-frame.is-unavailable > img { display: none; }
.co-creation-hero-foreground.is-unavailable { display: none; }

.co-group-topbar { min-height: 56px; padding: max(6px, env(safe-area-inset-top)) 12px 4px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; background: #fff; }
.co-group-topbar button { width: 44px; height: 44px; border: 0; color: #1026ac; background: transparent; font-size: 38px; line-height: 1; }
.co-group-topbar h1 { margin: 0; color: #0d1f9f; font-size: 24px; line-height: 1.2; text-align: center; }
.co-group-scroll { padding: 0 10px 20px; }
.co-group-hero { height: 207px; overflow: hidden; border-radius: 16px; background: #fff7ed; }
.co-group-hero .co-creation-image-frame,
.co-group-hero img { display: block; width: 100%; height: 100%; }
.co-group-hero img { object-fit: cover; }
.co-group-heading { min-height: 48px; padding: 6px 13px; display: flex; align-items: center; gap: 9px; }
.co-group-heading i { width: 6px; height: 24px; flex: none; border-radius: 4px; background: var(--co-orange); }
.co-group-heading h2 { margin: 0; color: #0d1f9f; font-size: 21px; line-height: 1.2; }
.co-group-activities { padding: 5px 7px 9px; }
.co-group-activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.co-group-activity-grid article { min-width: 0; min-height: 91px; padding: 7px; display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 9px; overflow: hidden; border: 1px solid var(--co-line); border-radius: 15px; }
.co-group-activity-grid .co-creation-image-frame { width: 76px; height: 77px; overflow: hidden; border-radius: 12px; }
.co-group-activity-grid img { width: 100%; height: 100%; object-fit: cover; }
.co-group-activity-grid h3 { margin: 0 0 5px; color: #1022a2; font-size: 16px; line-height: 1.1; white-space: nowrap; }
.co-group-activity-grid p { margin: 0; color: #5d5a94; font-size: 12px; line-height: 1.4; }
.co-group-scan { padding: 5px 11px 9px; }
.co-group-scan-card { min-height: 142px; padding: 8px 10px; display: grid; grid-template-columns: 126px 1fr; align-items: center; gap: 8px; border: 1px solid var(--co-line); border-radius: 16px; }
.co-group-qr-frame { position: relative; width: 112px; height: 112px; display: grid; place-items: center; overflow: hidden; color: #6f6991; background: #f8f5ff; font-size: 11px; line-height: 1.5; text-align: center; }
.co-group-qr-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.co-group-qr-frame > span { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; }
.co-group-qr-frame.is-unavailable img { display: none; }
.co-group-scan-card h3 { margin: 0 0 6px; color: #1022a2; font-size: 16px; line-height: 1.25; }
.co-group-scan-card p { margin: 0 0 12px; color: #5d5a94; font-size: 12px; line-height: 1.4; }
.co-group-scan-card a { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 24px; color: #fff; background: linear-gradient(90deg, #ff5b0d, #ff4813); font-size: 15px; font-weight: 700; text-decoration: none; }
.co-group-unavailable { min-height: 142px; padding: 24px; display: grid; place-items: center; align-content: center; border: 1px dashed #d9d4ed; border-radius: 16px; text-align: center; background: #faf8ff; }
.co-group-unavailable b { color: #1022a2; font-size: 18px; }
.co-group-unavailable p { margin: 8px 0 0; color: #69658e; font-size: 13px; line-height: 1.55; }
.co-group-tip { position: relative; min-height: 68px; margin-top: 9px; display: flex; align-items: center; overflow: hidden; border-radius: 14px; background: linear-gradient(90deg, #fff5e9, #fffaf4); }
.co-group-tip > .co-creation-image-frame:first-child { width: 56px; height: 58px; margin-left: 9px; flex: none; }
.co-group-tip > .co-creation-image-frame:last-child { position: absolute; right: 6px; bottom: 5px; width: 88px; height: 56px; }
.co-group-tip img { width: 100%; height: 100%; object-fit: cover; }
.co-group-tip > div { z-index: 1; margin-left: 4px; }
.co-group-tip h3 { margin: 0 0 2px; color: #1022a2; font-size: 16px; }
.co-group-tip p { max-width: 220px; margin: 0; color: #5d5a94; font-size: 12px; line-height: 1.35; }

@media (max-width: 389px) {
  .co-creation-brand { padding-inline: 14px; }
  .co-creation-scroll { padding-inline: 8px; }
  .co-creation-hero { min-height: 210px; }
  .co-creation-hero-copy { width: 70%; padding-left: 12px; }
  .co-creation-hero-copy h1 { font-size: 26px; }
  .co-creation-hero-copy h1 strong { font-size: 22px; }
  .co-creation-section-heading { padding-inline: 9px; }
  .co-creation-section-heading > div { display: block; }
  .co-creation-section-heading p { margin-top: 3px; text-align: left; }
  .co-creation-steps { gap: 5px; padding-inline: 5px; }
  .co-creation-steps li { min-height: 196px; }
  .co-creation-steps li > .co-creation-image-frame { height: 124px; }
  .co-creation-steps li > div { gap: 3px; }
  .co-creation-steps li > div span { width: 21px; height: 21px; font-size: 12px; line-height: 21px; }
  .co-creation-steps b { font-size: 12px; }
  .co-creation-steps p { margin-inline: 3px; }
  .co-creation-role-grid { gap: 6px; padding-inline: 5px; }
  .co-creation-role { min-height: 252px; }
  .co-creation-role-copy { padding-inline: 6px; }
  .co-creation-role h3 { font-size: 16px; }
  .co-creation-role button { right: 6px; left: 6px; font-size: 12px; }
  .co-creation-role--family button { padding-inline: 3px; font-size: 11px; white-space: nowrap; }
  .co-creation-role--family button span { margin-left: 1px; font-size: 16px; }
  .co-group-scroll { padding-inline: 8px; }
  .co-group-hero { height: 184px; }
  .co-group-activity-grid article { grid-template-columns: 64px 1fr; gap: 6px; }
  .co-group-activity-grid .co-creation-image-frame { width: 64px; height: 68px; }
  .co-group-activity-grid h3 { font-size: 14px; }
  .co-group-activity-grid p { font-size: 11px; }
  .co-group-scan-card { grid-template-columns: 112px 1fr; padding-inline: 7px; }
  .co-group-qr-frame { width: 104px; height: 104px; }
  .co-group-tip p { max-width: 180px; }
}
