body.portal .wrap { max-width: 76rem; }
#portal { overflow-anchor: none; }
.portal-title {
  margin: 1.6rem 0 0;
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.portal .tools {
  position: sticky;
  top: 3.2rem;
  z-index: 4;
  background: var(--paper);
  margin: 1.25rem -1.35rem 2.4rem;
  padding: 0.75rem 1.35rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
}
.tools div { display: flex; flex-wrap: wrap; gap: 0.85rem 1.1rem; }
.tools button {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
}
.tools button[aria-pressed="true"] { color: var(--ink); }

.group { margin: 0 0 3.5rem; }
.stack-row {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  column-gap: 0.55rem;
  align-items: stretch;
}
.spine {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 1rem;
  padding: 0.85rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  box-sizing: border-box;
}
.spine-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 1px calc(100% - 14px);
  background-position: left 7px;
}
.spine-line::before,
.spine-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-right: 0;
}
.spine-line::before {
  top: 0;
  border-bottom: 0;
  border-radius: 7px 0 0 0;
}
.spine-line::after {
  bottom: 0;
  border-top: 0;
  border-radius: 0 0 0 7px;
}
.spine-name {
  position: sticky;
  top: var(--spine-top, 8.5rem);
  z-index: 1;
  display: flex;
  justify-content: center;
  height: max-content;
  pointer-events: none;
}
.spine-text {
  writing-mode: sideways-lr;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  background: var(--paper);
  padding: 0.45rem 0;
}
.spine:hover,
.spine:focus-visible { color: var(--ink); }
.group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin: 0 0 0.9rem;
  padding: 0 0 0.45rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.group-name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.count {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.stack { display: flex; flex-direction: column; gap: 2.75rem; }
.group:not(.open) .stack-row,
.group:not(.open) .stack,
.group:not(.open) .frame.face,
.group:not(.open) .frame.face .crop {
  height: 8.5rem;
  min-height: 8.5rem;
  max-height: 8.5rem;
}
@media (min-width: 641px) {
  .group:not(.open) .stack-row,
  .group:not(.open) .stack,
  .group:not(.open) .frame.face,
  .group:not(.open) .frame.face .crop {
    height: 20rem;
    min-height: 20rem;
    max-height: 20rem;
  }
}
.group:not(.open) .frame.face {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.group:not(.open) .frame.face .crop {
  flex: 1 1 auto;
  aspect-ratio: auto;
}
.group:not(.open) .frame.face .crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.frame {
  margin: 0;
  padding: 0.55rem 0.55rem 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
}
.frame.face { cursor: pointer; }
.frame img,
.frame .shot {
  display: block;
  width: 100%;
  height: auto;
}
.frame .shot img { width: 100%; height: auto; }
.frame.face .crop {
  position: relative;
  overflow: hidden;
  aspect-ratio: 6 / 1;
}
.frame.face .crop img {
  width: 100%;
  height: auto;
  max-height: none;
}
.frame.face .crop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78%;
  background: linear-gradient(to bottom, rgba(243, 243, 241, 0) 0%, var(--paper) 72%);
  pointer-events: none;
}
.frame.face .veil {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0 0.85rem 0.7rem;
  pointer-events: none;
}
.frame.face figcaption { opacity: 0.34; }
.frame.face .expand {
  display: inline-block;
  margin: 0.55rem 0 0;
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  opacity: 1;
}
.frame figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.5rem;
  align-items: start;
  margin: 0.85rem 0.35rem 0;
}
.frame .aside {
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
}
.frame .when {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}
.frame .tags {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.intro {
  max-width: 40rem;
  margin: 1.15rem 0 0.2rem;
}
.intro p { margin: 0 0 0.95rem; }
.frame h3 {
  margin: 0;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.links, .empty {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.links { display: flex; gap: 1.25rem; }
.links a {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  text-decoration: none;
}
.links a:hover { color: var(--ink); }
.empty { margin-top: 0.8rem; }

.construction {
  max-width: 44rem;
}
.construction h1 {
  margin: 2.2rem 0 0.4rem;
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: -0.03em;
}
.construction .lead { margin: 0 0 1.4rem; color: var(--muted); }
.construction figure { margin: 0; }
.construction img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

@media (max-width: 640px) {
  .group-name { font-size: 1.35rem; }
  .frame { padding: 0.4rem 0.4rem 0.85rem; }
  .stack { gap: 1.75rem; }
}
