body {
  margin: 0;
  background: #121010;
  font-family: "MS Gothic", "Meiryo", "Yu Gothic", "Hiragino Kaku Gothic Pro", sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  color: white;
  padding: 4em;
  text-align: center;
  flex-shrink: 0; /* fixed height from padding */
  background: #121010; /* optional */
}

.middle-section {
  display: flex;
  flex-grow: 1; /* fill remaining vertical space */
  min-height: 0; /* allow flex children to shrink properly */
}

.left-sidebar {
  /*width: 200px;*/
  padding: 0;
  background: #121010;
  flex-shrink: 0;
  overflow-y: auto; /* optional for scrolling if needed */
}

.nav-buttons {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.nav-buttons li {
  margin-bottom: 20px;
}

.center-column {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0; /* prevent overflow */
  min-height: 0; /* prevent overflow */
}

.titlebar {
  padding: 0;
  background: #f5aa3f;
  flex-shrink: 0; /* fixed height from content */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1em;
}

#titletext::after {
  content: "...";
  animation: dots 1.5s steps(3, end) infinite;
  display: inline-block;
  width: 1.2em; /* prevent layout jump */
  overflow: hidden;
  vertical-align: bottom;
}

@keyframes dots {
  0%, 20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%, 100% {
    content: "...";
  }
}

.right-sidebar {
  /*box-sizing: border-box;*/
  /*width: 200px;*/
  padding: 1em;
  color: white;
  flex-shrink: 0;
  background: #121010;
  /*overflow-y: auto; optional */
}

main {
  flex-grow: 1;
  position: relative; /* keep marquee inside */
  padding: 0;
  min-height: 0; /* important to allow flex to shrink */
  overflow: hidden; /* prevent overflow */
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.marquee {
  overflow: hidden;
  display: flex;
  line-height: 20px;
  position: absolute;
  width: 100%;
  bottom: -5px;
  z-index: 1;
}

.marquee span {
  white-space: nowrap;
}

.pipi {
  position: absolute;
  left: 5px;
  bottom: 0;
  z-index: 2;
}