@font-face {
  font-family: 'CustomFont';
  src: url('Custom-Font.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: #fff;
}

#frame {
  position: absolute;
  top: 20px; bottom: 20px; left: 20px; right: 20px;
  border: 1px solid black;
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#top-bar {
  position: absolute;
  top: 0; left: 0; right: 0; height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  font-family: 'CustomFont', Courier New, monospace;
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
  color: black;
}

#top-bar > div {
  pointer-events: auto;
}

#content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: ew-resize; /* ⇔ */
  position: relative;
  overflow: hidden;
  padding: 7px;
}

#content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  outline: none;
touch-action: manipulation;
}

#registry {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: white;
  overflow-y: auto;
  font-family: 'CustomFont', Courier New, monospace;
  font-size: 14px;
  z-index: 3;
}

#registry-top-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.hidden {
  display: none;
}

#registry-list div {
  position: relative;
  padding: 10px 10px 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  width: 100%;
}

#registry-list div strong {
  min-width: 30px;
  display: inline-block;
}

#registry-list .number {
  min-width: 30px;
  cursor: pointer;
}

#registry-list .title {
  flex: 1;
}

#registry-list .square {
  margin-left: auto;
  margin-right: 5px; /* 👈 add this */
  cursor: pointer;
}

#registry-list .text {
  flex-basis: 100%; /* forces to new line in flex */
  margin-left: 35px; /* adjust as needed */
  margin-top: 3px;
  word-break: break-word;
  overflow-wrap: break-word;
}

#registry-list div::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  background: black;
}

#registry-list div.active::after {
  height: 4px;
  background: black;
}

.bio-section {
  position: relative;
  padding: 10px 10px 10px 20px;
  margin-top: 20px;
  display: flex;
  gap: 50px;
  font-weight: normal;
}

.bio-section strong {
  min-width: 50px;
  flex-shrink: 0;
  font-weight: normal;
}

.bio-section span {
  flex: 1;
}

.bio-section:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 1px;
  background: black;
}

/* Only square link gets pointer cursor */
#registry-list .square-link {
  cursor: pointer;
}