/* Keep the project invitation and the two browsing controls on one reading line. */
#theater #project-footer {
  --footer-ink: #f0eee8;
  --footer-label: #c4c7be;
  --footer-tone: var(--join-foot);
  --entry-metal: color-mix(in srgb, var(--wash) 42%, #b7bab5);
  --step-face: color-mix(in srgb,var(--footer-tone) 88%,var(--footer-ink));
  --step-edge: color-mix(in srgb,var(--footer-tone) 46%,var(--footer-ink));
  display: grid;
  grid-template: "previous entry next" auto / minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 0 clamp(14px,3vw,52px);
  padding: clamp(12px,1.65vw,24px) max(clamp(16px,3.4vw,56px),calc((100% - 1110px)/2));
  margin: 0;
  background: linear-gradient(var(--footer-tone),var(--join-nav) 65%,var(--join-studio));
  color: var(--footer-ink);
  border: 0;
  height: auto;
  touch-action: pan-y;
}
#theater:is([data-project="vesper"],[data-project="food"]) #project-footer {
  --footer-ink: #252b25;
  --footer-label: #485049;
  --entry-metal: #686b5a;
  padding-bottom: clamp(29px,3vw,43px);
  background: linear-gradient(to top,var(--join-studio),color-mix(in srgb,var(--footer-tone) 68%,var(--join-studio)) 9px,var(--footer-tone) 25px);
}
#theater #project-footer #scene-entry {
  grid-area: entry;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
}
#theater #project-footer #plate-open {
  grid-area: auto;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: clamp(9px,1vw,15px);
  min-height: 52px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px clamp(14px,1.7vw,26px);
  margin: 0;
  color: var(--footer-ink);
  background: none;
  border: 0;
  border-radius: 0;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  cursor: var(--press,pointer);
}
#theater #project-footer #plate-open::before {
  content: "";
  display: block;
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent, var(--entry-metal) 28% 70%, transparent) top / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, var(--entry-metal) 40% 60%, transparent) bottom / 100% 1px no-repeat,
    radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--entry-metal) 16%,transparent),transparent 78%);
  opacity: .65;
}
#theater #plate-open .entry-mark { display: block; width: 26px; height: 26px; object-fit: contain; flex: none; }
#theater[data-project="meridian"] #plate-open { --entry-metal: #aaa59a; }
#theater[data-project="meridian"] #plate-open .entry-mark { width: clamp(36px, 3vw, 46px); height: auto; }
#theater #plate-open .entry-amp { font: italic 400 28px/1 var(--serif); }
#theater #plate-open [hidden] { display: none; }
#theater #plate-open .entry-action {
  color: inherit;
  text-transform: none;
  font: 400 clamp(19px,1.65vw,27px)/1.16 var(--serif);
  letter-spacing: -.024em;
  text-wrap: balance;
}
#theater #project-footer button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  justify-self: start;
  width: min(100%,12.5rem);
  min-width: 0;
  max-width: 100%;
  min-height: 62px;
  box-sizing: border-box;
  gap: 3px;
  margin: 0;
  padding: 9px clamp(12px,1.3vw,19px);
  color: var(--footer-ink);
  background: linear-gradient(165deg,color-mix(in srgb,var(--step-face) 94%,white),var(--step-face) 60%);
  border: 1px solid var(--step-edge);
  border-radius: 6px;
  text-align: left;
  box-shadow: inset 0 1px rgb(255 255 255 / .10), 0 2px 4px rgb(0 0 0 / .14);
  transition: none;
}
#theater #back-project { grid-area: previous; }
#theater #project-footer #next-project { grid-area: next; align-items: flex-end; justify-self: end; text-align: right; }
#theater #project-footer .step-heading {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  color: var(--footer-ink);
  font: 650 clamp(16px,1.1vw,18px)/1.2 var(--sans);
  letter-spacing: 0;
}
#theater #project-footer .step-heading::before {
  content: "";
  flex: none;
  width: 1.95em;
  height: .9em;
  background: url("nav-chevron.svg") center / contain no-repeat;
}
#theater #back-project .step-heading::before {transform: scaleX(-1); --arrow-travel: -3px;}
#theater #next-project .step-heading {flex-direction: row-reverse}
#theater #project-footer button:active {
  box-shadow: inset 0 1px 3px rgb(0 0 0 / .22);
}
#theater #project-footer button b {
  align-self: auto;
  color: color-mix(in srgb,var(--footer-ink) 72%,var(--footer-label));
  font: 500 clamp(13px,.98vw,15px)/1.25 var(--sans);
  letter-spacing: 0;
  text-decoration: none;
  text-wrap: balance;
}
#theater #project-footer #project-position { display: none; }
#theater #project-footer :is(button,#plate-open):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (hover: hover) {
  #theater #project-footer #plate-open:hover::before { opacity: 1; }
  #theater #project-footer button:hover {
    border-color: var(--footer-ink);
    background: color-mix(in srgb,var(--step-face) 97%,var(--footer-ink));
  }
  #theater #project-footer button:hover b {text-decoration:none}
}
#theater #project-footer #plate-open:active::before { opacity: .38; }
@media (max-width: 740px), (pointer: coarse) {
  #theater #project-footer {
    grid-template: "entry entry entry" auto "previous position next" auto / minmax(0,1fr) auto minmax(0,1fr);
    padding-inline: clamp(10px,3vw,24px);
    gap: 9px clamp(5px,1.8vw,14px);
  }
  #theater #project-footer #plate-open { min-height: 48px; }
  #theater #project-footer #project-position {
    grid-area: position;
    display: grid;
    place-content: center;
    min-width: 60px;
    min-height: 44px;
    padding: 0;
    color: var(--footer-label);
    font: 400 11px/1.2 var(--sans);
    font-variant-numeric: tabular-nums;
  }
  #theater #project-footer #project-position::after { content: none; }
}
@media (max-width: 520px) {
  #theater #project-footer button {
    align-self: stretch;
    justify-content: flex-start;
    width:100%;
    padding:8px clamp(7px,2vw,11px);
  }
  #theater #project-footer button b {min-block-size:2lh;line-height:1.22}
}
@media (forced-colors: active) {
  #theater #project-footer #plate-open { border: 1px solid LinkText; color: LinkText; }
  #theater #project-footer button :is(small,b), #theater #project-footer #project-position { color: ButtonText; }
  #theater #project-footer button {background:ButtonFace;border:1px solid ButtonText}
  #theater #project-footer .step-heading {color:ButtonText}
  #theater #project-footer .step-heading::before {background:ButtonText;mask:url("nav-chevron.svg") center / contain no-repeat;forced-color-adjust:none}
  #theater #project-footer :is(button,#plate-open):focus-visible { outline-color: Highlight; }
}

/* The central invitation opens the complete project. The outer keys turn previews. */
#works #theater #project-footer #plate-open {
  --entry-rim:color-mix(in srgb,var(--wash) 38%,#aaa28f);
  --entry-face:color-mix(in srgb,var(--wash) 12%,#1b1a19);
  display:inline-grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(9px,1vw,16px);
  padding:7px clamp(13px,1.4vw,23px) 7px 11px;min-height:62px;
  border:1px solid var(--entry-rim);border-radius:9px;
  background:linear-gradient(155deg,var(--entry-face),#161514 78%);
  box-shadow:inset 0 1px #ffffff15,0 3px 8px #0003;
  color:#f5efe3;
}
#works #theater #project-footer #plate-open::before {content:none;}
#works #plate-open .entry-copy {display:grid;min-width:0;gap:2px;overflow-wrap:anywhere;}
#works #plate-open .entry-copy small {
  color:#d9c59f;font:600 10px/1.2 var(--sans);letter-spacing:.14em;text-transform:uppercase;
}
#works #theater #project-footer #plate-open .entry-action {color:inherit;font-size:clamp(19px,1.55vw,25px);}
#works #plate-open .entry-direction {width:30px;margin-inline-start:2px;--arrow-travel:4px;}
#works #theater #project-footer #plate-open:is(:hover,:focus-visible) {
  border-color:#efdcad;background:linear-gradient(155deg,color-mix(in srgb,var(--entry-face) 84%,#a99b79),#201e1a 78%);
}
@media (forced-colors:active) {
  #works #theater #project-footer #plate-open {background:ButtonFace;border-color:LinkText;color:LinkText;}
  #works #plate-open .entry-copy small {color:ButtonText;}
}
