.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #000;
  /* Bulmaのis-black相当 */
  color: white;
  padding: 0 0 0 5px;
}

#nav-toggle {
  display: none;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
  /* アイテム間のスペース */
}

.nav-item {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  padding: 0.5rem;
}

.nav-item-text {
  margin-left: 0.5rem;
  font-size: 12px;
}

.nav-box {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
  position: static;
  visibility: visible;
  width: auto;
  height: auto;
}

.nav-box .nav-item {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  font-size: 12px;
  background: none;
  transition-duration: .25s;
}

@media (max-width: 768px) {
  #nav-toggle {
    opacity: 0;
  }

  #nav-toggle:checked~.nav-box {
    visibility: visible;
    left: auto;
    right: 0;
  }

  .nav-btn {
    display: flex;
    align-items: center;
    position: fixed;
    right: 20px;
    width: 26px;
    height: 26px;

    cursor: pointer;
    z-index: 1;
  }

  .nav-btn>span,
  .nav-btn>span::before,
  .nav-btn>span::after {
    display: block;
    position: absolute;

    width: 100%;
    height: 2px;

    background-color: white;
    transition-duration: .25s;
  }

  .nav-btn>span::before {
    content: '';
    top: -8px;
  }

  .nav-btn>span::after {
    content: '';
    top: 8px;
  }

  .nav-box {
    display: block;
    position: fixed;
    visibility: hidden;
    top: 0;
    right: -100%;
    width: 80vw;
    max-width: 320px;
    height: 100%;
    padding: 60px 0 32px 0;
    background-color: white;
    transition-duration: .25s;
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-box li {
    margin-bottom: 8px;
    text-align: left;
  }

  .nav-box .nav-item {
    padding: 14px 28px;
    color: #222;
    border-radius: 8px;
    font-size: 15px;
    font-weight: normal;
    margin: 0 16px;
  }

  .nav-box .nav-item:hover {
    background: #e3eaf2;
    color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
  }

  .nav-box .nav-item i {
    min-width: 20px;
    font-size: 18px;
    color: #1976d2;
  }

  .nav-box .nav-item-text {
    font-size: 15px;
    color: #333;
    margin-left: 0.5rem;
    letter-spacing: 0.02em;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    z-index: 900;
    transition: opacity 0.2s;
  }

  #nav-toggle:checked~.nav-overlay {
    display: block;
  }
}