[hidden] {
  display: none !important;
}

.nav-toggle {
  display: none;
}

@media (max-width: 1024px) {
  body.nav-open {
    overflow: hidden;
  }

  .navbar {
    position: relative;
    align-items: center;
  }

  .nav-left {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
  }

  .logo {
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    border: 2px solid var(--border-color, #222222);
    background: #ffffff;
    color: var(--black, #222222);
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--black, #222222);
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .nav-toggle:hover {
    transform: translate(1px, 1px);
    box-shadow: 3px 3px 0px var(--black, #222222);
  }

  .nav-toggle-line {
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.nav-open .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-nav-panel {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 40px 24px;
    background: #ffffff;
    border-bottom: 2px solid var(--border-color, #222222);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.14);
    z-index: 150;
  }

  .mobile-nav-links,
  .mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav-links a,
  .mobile-nav-action {
    display: block;
    width: 100%;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--black, #222222);
    background: #ffffff;
    border: 2px solid var(--border-color, #222222);
    font-weight: 700;
    box-shadow: 4px 4px 0px var(--black, #222222);
  }

  .mobile-nav-links a[style*="--yellow"] {
    background: #ffffff;
    color: var(--yellow, #fcb900) !important;
    border-left: 4px solid var(--yellow, #fcb900);
  }

  .mobile-nav-action {
    text-align: center;
    background: var(--black, #222222);
    color: #ffffff;
  }
}

@media (max-width: 768px) {
  .navbar {
    min-height: 60px;
    align-items: center;
  }

  .nav-left,
  .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .nav-left {
    flex: 1;
    min-width: 0;
  }

  .logo {
    font-size: 15px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .nav-right .btn-write {
    display: none;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
    box-shadow: 3px 3px 0px var(--black, #222222);
  }

  .mobile-nav-panel {
    padding: 14px 16px 18px;
  }

  .mobile-nav-links a,
  .mobile-nav-action {
    padding: 12px 14px;
  }
}
