/* The header itself is the playground; its divider is the ground. */
.page-uxui .projects-wrap {
  padding: clamp(48px, 6vh, 76px) var(--layout-gutter) clamp(30px, 5vh, 64px);
  overflow: hidden;
}
.archive-heading {
  position: relative;
  display: block;
  height: clamp(180px, 26vh, 280px);
  flex: 0 0 auto;
  padding: 0;
  margin-bottom: 28px;
  border-bottom: 0;
}
.archive-heading::after { content: ''; position: absolute; left: 0; bottom: 0; width: 32%; height: 1px; background: rgba(255,107,0,.65); pointer-events: none; }
.archive-wordmark { position: absolute; top: 0; left: 0; margin: 0; }
.archive-heading .projects-hero-title { position: absolute; left: 0; bottom: 30px; margin: 0; }
.idea-game {
  position: absolute;
  inset: 0 0 0 32%;
  font-family: var(--font-ui);
  min-width: 0;
}
.idea-game-scene { position: absolute; inset: 22px 0 0; }
#ideaGameCanvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.idea-game-bar { position: absolute; z-index: 2; top: -10px; right: 0; display: flex; align-items: center; gap: 12px; }
.idea-game-pickups, .idea-game-level { color: var(--theme-muted); font-size: .75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.idea-game-level { color: var(--theme-orange-light); }
.idea-game-pickups > span { color: #82766b; font-size: .8rem; line-height: 1; padding: 4px 2px; }
.idea-game-pickups > .is-collected { color: var(--theme-orange-light); text-shadow: 0 0 8px rgba(255,107,0,.6); }
.idea-game button { font-family: var(--font-ui); -webkit-tap-highlight-color: transparent; }
.page-uxui .idea-game button:focus-visible { outline: 2px solid var(--theme-orange-light); outline-offset: -2px; box-shadow: none; }
/* The shared focus style adds a white box-shadow as well as an outline. */
#ideaGameCanvas,
#ideaGameCanvas:focus,
#ideaGameCanvas:focus-visible { outline: none; box-shadow: none; border-radius: 0; }
.idea-game:has(#ideaGameCanvas:focus-visible) #ideaGameHelp { color: var(--theme-orange-light); text-decoration: underline; text-underline-offset: 4px; }
.idea-game button:disabled { opacity: .35; }
.idea-game-reset, #ideaGamePause {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: 36px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--theme-muted);
  font-size: .75rem;
}
.idea-game-reset:hover, #ideaGamePause:hover { color: var(--theme-orange-light); }
.idea-game-prompt {
  position: absolute;
  z-index: 2;
  top: 26px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  padding: 0;
  text-align: right;
}
.idea-game-prompt[hidden] { display: none; }
.idea-game-prompt-title { display: none; }
.idea-game-prompt-copy { margin: 0; color: var(--theme-muted); font-size: .75rem; line-height: 1.5; }
.idea-game-play {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid rgba(255,107,0,.55);
  background: rgba(9,9,9,.6);
  color: var(--theme-orange-light);
  font-size: .8rem;
}
.idea-game-play:hover { background: var(--theme-orange); color: var(--theme-bg); }
.idea-game-bottom { position: absolute; z-index: 2; top: 34px; right: 0; display: none; flex-direction: column; align-items: flex-end; gap: 8px; }
.idea-game[data-mode="running"] .idea-game-bottom { display: flex; }
.idea-game-bottom > p { margin: 0; color: var(--theme-muted); font-size: .75rem; line-height: 1.5; }
.idea-game-controls { display: flex; gap: 6px; }
.idea-game-controls > button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 32px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(255,107,0,.3);
  color: var(--theme-orange-light);
  background: rgba(9,9,9,.6);
  font-size: .9rem;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.idea-game-controls > button span { font-size: .7rem; }
.idea-game-controls > button:hover, .idea-game-controls > button.is-pressed { background: var(--theme-orange); color: var(--theme-bg); }
.idea-game-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Only the project index scrolls; the title and left context stay in place. */
.project-archive { flex: 1 1 0; min-height: 0; align-items: stretch; }
.archive-context { display: flex; flex-direction: column; min-height: 0; padding-top: 36px; }
.archive-context .page-intro { margin: 0; }
.archive-context .page-intro-text { font-size: clamp(1.1rem, 2vw, 2rem); line-height: 1.45; }
.archive-entries { display: flex; flex-direction: column; min-height: 0; }
.archive-list-label { flex: 0 0 auto; padding-bottom: 20px; }
.archive-entries .projects-list {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  padding-right: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,107,0,.6) transparent;
  scrollbar-gutter: stable;
  scroll-padding: 8px;
}
.archive-entries .projects-list::-webkit-scrollbar { width: 3px; }
.archive-entries .projects-list::-webkit-scrollbar-thumb { background: rgba(255,107,0,.6); }
@media (max-width: 768px) {
  .page-uxui .projects-wrap { padding: 36px var(--layout-gutter) 28px; }
  .archive-heading { height: clamp(180px, 29svh, 230px); margin-bottom: 18px; }
  .archive-heading::after { display: none; }
  .archive-heading .projects-hero-title { top: 28px; bottom: auto; font-size: clamp(3.5rem,16vw,6rem); }
  .idea-game { inset: 0; }
  .idea-game-scene { inset: 70px 0 0; }
  .idea-game-bar { top: -9px; gap: 6px; }
  .idea-game-reset, #ideaGamePause { min-height: 36px; min-width: 32px; }
  .idea-game-reset > span { display: none; }
  .idea-game-prompt { top: -40px; }
  .idea-game-prompt-copy { font-size: .65rem; max-width: 16ch; }
  .idea-game-play { min-height: 36px; padding: 5px 9px; font-size: .7rem; }
  .idea-game-bottom { top: 36px; }
  .idea-game-bottom > p { display: none; }
  .idea-game-controls { gap: 4px; }
  .idea-game-controls > button { min-height: 40px; min-width: 40px; padding: 5px 8px; }
  .idea-game-controls > button span { display: none; }
  .project-archive { display: flex; flex-direction: column; gap: 14px; }
  .archive-context { flex: 0 0 auto; flex-direction: row; justify-content: space-between; align-items: start; gap: 16px; padding: 0; }
  .archive-context .page-intro { margin: 0; }
  .archive-context .page-intro-text { max-width: 40ch; font-size: .82rem; line-height: 1.4; }
  .archive-entries { flex: 1 1 0; }
  .archive-list-label { padding-bottom: 12px; }
  .archive-entries .projects-list { padding-right: 8px; }
}
@media (max-height: 650px) and (min-width: 769px) {
  .page-uxui .projects-wrap { padding-top: 36px; padding-bottom: 28px; }
  .archive-heading { height: 148px; margin-bottom: 18px; }
  .archive-heading .projects-hero-title { font-size: 7rem; bottom: 20px; }
  .archive-context { padding-top: 28px; }
  .archive-context .page-intro-text { font-size: 1.1rem; }
}
@media (max-height: 500px) and (max-width: 768px) {
  .page-uxui .projects-wrap { padding-top: 22px; padding-bottom: 20px; }
  .archive-heading { height: 148px; margin-bottom: 12px; }
  .archive-context { display: none; }
}
