/* The actor and activity share the same composition in the shell's board slot. */
#activity-root .gh-surface {
  width: min(100%, 1260px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.85fr);
  grid-template-areas: "buno activity" "buno feedback";
  align-content: center;
  align-items: center;
  column-gap: clamp(14px, 2vw, 32px);
}

#activity-root .gh-actor-header {
  grid-area: buno;
  display: flex;
  flex-direction: column;
  max-height: none;
  gap: 0;
}

#activity-root .gh-hero {
  display: block;
  width: min(100%, 290px);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(0 12px 9px #3b2a2445);
}

#activity-root .gh-task {
  max-width: 23ch;
  text-align: center;
  font-size: clamp(17px, 2.2vw, 25px);
  font-weight: 500;
}

#activity-root .gh-task,
#activity-root .gh-feedback:not(:empty) {
  color: #243a42;
  background: #fff4d9;
  border: 1px solid #b98347;
  border-radius: 14px;
  padding: 8px 15px;
}

.gh-content { grid-area: activity; }
.gh-feedback { grid-area: feedback; justify-self: center; }

.summer-model {
  --sample-size: clamp(39px, 5.8svh, 66px);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  gap: 4px;
  padding: 6px 16px;
  background: #fff6e2;
  border: 2px solid #cf9d62;
  border-radius: 15px;
  box-shadow: inset 0 0 0 3px #fffaf1, 0 4px 0 #75513826;
}

.summer-model:has(> img:nth-of-type(5)) {
  --sample-size: clamp(29px, 3.8svh, 44px);
}

.summer-model > img {
  width: var(--sample-size) !important;
  height: var(--sample-size) !important;
}

.bag-zones {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.3vw, 22px);
}

.bag-zone,
.pool-zone {
  --zone-title: clamp(19px, 2.15vw, 30px);
  --title-space: calc(1.1 * var(--zone-title) + 11px);
  background: transparent var(--prop) center bottom / 100% calc(100% - var(--title-space)) no-repeat;
  min-height: 0;
  padding: 0 7% 25px;
  box-shadow: none;
  filter: drop-shadow(0 6px 5px #3b2a242e);
}

.bag-zone { --prop: url('open-beach-bag.webp'); }
.pool-zone { --prop: url('teal-beach-towel.webp'); }
.bag-zone::before { content: none; }

.bag-zone > h2,
.pool-zone > h2 {
  width: fit-content;
  margin: 0 auto clamp(14px, 3svh, 30px);
  padding: 2px 14px;
  border: 1px solid #b98347;
  border-radius: 10px;
  background: #fff4d9;
  font-size: var(--zone-title);
  line-height: 1.1;
  color: #173e54;
}

.shell-items {
  --shell-row: clamp(60px, 10.2svh, 116px);
  --shell-size: clamp(65px, 14svh, 132px);
  --shell-columns: 4;
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 0;
  min-height: calc(2 * var(--shell-row));
}

.shell-items:has(> :nth-child(5)) { --shell-size: var(--shell-row); }
.shell-items:has(> :nth-child(9)) { --shell-columns: 5; }
.shell-items:has(> :nth-child(11)) { --shell-columns: 6; }

.shell-items:not(:has(> :nth-child(4))) {
  --shell-columns: 3;
}

.gh-content .shell-piece {
  flex: 0 0 auto;
  width: min(var(--shell-size), calc(100% / var(--shell-columns)));
  min-height: 44px !important;
  height: min(var(--shell-size), max(44px, calc(100cqw / var(--shell-columns) + 8px)));
  max-height: none;
  aspect-ratio: auto;
}

.gh-content .shell-piece img,
.summer-model > img {
  filter: drop-shadow(0 3px 2px #51312b3d);
}

@media (orientation: portrait), (max-width: 740px) {
  #activity-root .gh-surface {
    width: min(100%, 490px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "buno" "activity" "feedback";
    row-gap: 6px;
  }

  #activity-root .gh-actor-header { flex-direction: row; justify-content: center; gap: 8px; }
  #activity-root .gh-hero { width: clamp(110px, 34vw, 172px); }
  #activity-root .gh-task { text-align: left; }
  .bag-zones { grid-template-columns: minmax(0, 1fr); }
  .shell-items {
    --shell-row: clamp(46px, (100svh - 770px) / 3.2, 96px);
    --shell-size: min(clamp(70px, 14svh, 132px), 2 * var(--shell-row));
  }
  .summer-model { padding: 4px 12px; }
  .summer-model:has(> img:nth-of-type(5)) {
    --sample-size: min(clamp(30px, 3.8svh, 38px), (100vw - 86px) / 8);
  }
  .summer-model:not(:has(> img:nth-of-type(5))) .model-label {
    width: auto;
    margin-inline-end: 4px;
  }
}

@media (orientation: portrait) and (max-height: 800px) {
  #activity-root .gh-surface { row-gap: 3px; }
  #activity-root .gh-hero { width: 110px; }
  #activity-root .gh-feedback:not(:empty) { margin-top: 0; padding-block: 5px; }
  .bag-zones { gap: 8px; }
  .bag-zone, .pool-zone { padding-bottom: 17px; }
  .bag-zone > h2, .pool-zone > h2 { margin-bottom: 14px; }
  .shell-items { --shell-row: 46px; --shell-size: 70px; }
  .summer-model { --sample-size: 34px; }
  .summer-model:has(> img:nth-of-type(5)) { --sample-size: 24px; }
  .summer-model .model-label { width: auto; margin-right: 5px; }
}

@media (orientation: portrait) and (max-width: 350px) {
  .bag-zone, .pool-zone { padding-inline: 4%; }
  .shell-items { --shell-row: clamp(46px, (100svh - 755px) / 3.3, 87px); }
  .summer-model:has(> img:nth-of-type(5)) .model-label {
    width: 100%;
    margin-inline: 0;
  }
}

@media (orientation: portrait) and (max-width: 350px) and (max-height: 800px) {
  #activity-root .gh-hero { width: 90px; }
  .bag-zone, .pool-zone { padding-bottom: 14px; }
}

@media (orientation: landscape) and (max-height: 700px) {
  .shell-items { --shell-row: 48px; }
}

@media (orientation: landscape) and (max-height: 450px) {
  #activity-root .gh-surface { grid-template-columns: minmax(0, 1fr) minmax(0, 4fr); }
  #activity-root .gh-task,
  #activity-root .gh-feedback:not(:empty) { padding: 4px 9px; }
  #activity-root .gh-hero { width: min(100%, 146px); }
  .bag-zone, .pool-zone { padding: 0 6% 19px; }
  .bag-zone > h2, .pool-zone > h2 { margin-bottom: 14px; }
  .bag-zones { margin-top: 6px; }
  .shell-items { --shell-size: 58px; }
  .summer-model { --sample-size: 30px; }
  .summer-model:has(> img:nth-of-type(5)) { --sample-size: 25px; }
}

@media (orientation: landscape) and (max-width: 780px) and (max-height: 450px) {
  #activity-root .gh-surface {
    width: min(100%, 740px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "buno" "activity" "feedback";
    row-gap: 0;
  }

  #activity-root .gh-actor-header { flex-direction: row; justify-content: center; gap: 10px; }
  #activity-root .gh-hero { width: 62px; }
  #activity-root .gh-task { max-width: none; }
  #activity-root .gh-content { padding-block: 0; }
  #activity-root .gh-feedback:not(:empty) { margin-top: 0; padding-block: 2px; }
  .bag-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 4px; }
  .bag-zone, .pool-zone { padding-bottom: 12px; }
  .bag-zone > h2, .pool-zone > h2 { margin-bottom: 12px; }
  .shell-items { --shell-row: 44px; }
  .summer-model { padding-block: 0; min-height: 32px; }
  .summer-model .model-label { width: auto; }
}
