:root {
  --topbar-h: 44px;
}

body {
  margin: 0;
  padding: var(--topbar-h) 24px 24px;
  overflow: hidden;
  font-family: monospace, sans-serif;
  line-height: 1.5;
  background: lightpink;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: auto 1fr;
  /* hamburger | ticker */
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: lightpink;
  border-bottom: 1px solid #000;
  z-index: 999;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.icon-btn {
  appearance: none;
  background: #fff;
  border: 1px solid #000;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.icon-btn svg {
  display: block;
  fill: currentColor;
}

.topbar-ticker {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  will-change: transform;
  animation: ticker-move 30s linear infinite;
  font-size: 0.85rem;
  line-height: var(--topbar-h);
}

@keyframes ticker-move {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.side-menu {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: 280px;
  background: #fff;
  border-right: 1px solid #000;
  transform: translateX(-100%);
  transition: transform 200ms ease-out;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.side-menu.is-open {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid #000;
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.side-menu-nav a {
  margin: 6px 0;
  text-decoration: none;
  color: #000;
  border: 1px solid #000;
  border-radius: 8px;
  background: #f8f8f8;
  padding: 8px 10px;
  text-align: left;
}

.side-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-out;
  z-index: 1000;
}

.side-menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.no-scroll {
  overflow: hidden;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0;
}

.iframe-container {
  position: relative;
  border: 1px solid #000;
  border-top: 0;
  display: flex;
  width: 30vw;
  flex-direction: column;
  background: #fff;
}

.iframe-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: lightpink;
  padding: 4px 8px;
  font-size: 0.875rem;
  text-align: right;
  z-index: 2;
  border-bottom: 1px solid #000;
}

.iframe-header a {
  color: #000;
  text-decoration: none;
}

.iframe-header a:hover {
  text-decoration: underline;
}

.iframe-container iframe {
  width: 100%;
  height: 600px;
  border: none;
  margin-top: 1.5em;
}

/* mobile */
@media (max-width: 768px) {
  :root {
    --topbar-h: 40px;
  }

  body {
    padding: var(--topbar-h) 12px 16px;
  }

  .ticker-track {
    font-size: 0.75rem;
  }

  .grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "forum"
      "wiki"
      "people";
    gap: 0;
  }

  .pane--forum {
    grid-area: forum;
  }

  .pane--wiki {
    grid-area: wiki;
  }

  .pane--people {
    grid-area: people;
  }

  .iframe-container {
    width: 100%;
    margin-top: 16px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.line-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.line-modal[aria-hidden="false"] {
  display: flex;
}

.line-modal-card {
  background: #fff;
  border: 1px solid #000;
  border-radius: 12px;
  width: min(640px, 92vw);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

.line-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #000;
  background: lightpink;
}

#lineInput {
  width: 100%;
  box-sizing: border-box;
  margin: 12px;
  padding: 10px;
  border: 1px solid #000;
  border-radius: 8px;
  font: inherit;
}

.line-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 12px;
}

#snake {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 100;
  pointer-events: none;
}